mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Improve serialization of IDs from mods, so they are resolved correctly after all mods are loaded.
This commit is contained in:
@@ -459,11 +459,19 @@ class FactionID : public BaseForID<FactionID, int32_t>
|
||||
DLL_LINKAGE static const FactionID CONFLUX;
|
||||
DLL_LINKAGE static const FactionID NEUTRAL;
|
||||
|
||||
///json serialization helpers
|
||||
static si32 decode(const std::string & identifier);
|
||||
static si32 decode(const std::string& identifier);
|
||||
static std::string encode(const si32 index);
|
||||
static std::string scope();
|
||||
};
|
||||
|
||||
class TerrainID
|
||||
{
|
||||
//Dummy class used only for serialization
|
||||
public:
|
||||
static si32 decode(const std::string & identifier);
|
||||
static std::string encode(const si32 index);
|
||||
static std::string scope();
|
||||
};
|
||||
|
||||
class BuildingID
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user