1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix string ID's road/river/terrains

This commit is contained in:
Ivan Savenko
2023-02-13 00:07:28 +02:00
parent acdb8d6e06
commit 190368e419
6 changed files with 36 additions and 23 deletions

View File

@@ -21,12 +21,13 @@ class DLL_LINKAGE RoadType : public EntityT<RoadId>
{
friend class RoadTypeHandler;
std::string identifier;
std::string modScope;
RoadId id;
public:
int32_t getIndex() const override { return id.getNum(); }
int32_t getIconIndex() const override { return 0; }
std::string getJsonKey() const override { return identifier;}
std::string getJsonKey() const override;
void registerIcons(const IconRegistar & cb) const override {}
RoadId getId() const override { return id;}
void updateFrom(const JsonNode & data) {};
@@ -44,6 +45,7 @@ public:
{
h & tilesFilename;
h & identifier;
h & modScope;
h & id;
h & movementCost;
}