1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Add mods fields into map header

This commit is contained in:
nordsoft 2023-04-12 02:14:22 +04:00
parent 94c6c0c262
commit 617a4385a2

View File

@ -18,6 +18,7 @@
#include "../int3.h"
#include "../GameConstants.h"
#include "../LogicalExpression.h"
#include "../CModHandler.h"
#include "CMapDefines.h"
VCMI_LIB_NAMESPACE_BEGIN
@ -294,6 +295,8 @@ public:
ui8 levels() const;
EMapFormat::EMapFormat version; /// The default value is EMapFormat::SOD.
std::map<TModID, CModInfo::Version> mods; /// set of mods required to play a map
si32 height; /// The default value is 72.
si32 width; /// The default value is 72.
bool twoLevel; /// The default value is true.
@ -322,6 +325,8 @@ public:
void serialize(Handler & h, const int Version)
{
h & version;
if(Version >= 821)
h & mods;
h & name;
h & description;
h & width;