ModVerificationInfo.h 787 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * ModVerificationInfo.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "CModVersion.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. struct ModVerificationInfo
  14. {
  15. /// human-readable mod name
  16. std::string name;
  17. /// version of the mod
  18. CModVersion version;
  19. /// CRC-32 checksum of the mod
  20. ui32 checksum = 0;
  21. /// parent mod ID, empty if root-level mod
  22. TModID parent;
  23. /// for serialization purposes
  24. bool impactsGameplay = true;
  25. template <typename Handler>
  26. void serialize(Handler & h, const int v)
  27. {
  28. h & name;
  29. h & version;
  30. h & checksum;
  31. h & parent;
  32. h & impactsGameplay;
  33. }
  34. };
  35. VCMI_LIB_NAMESPACE_END