1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

replace RESOURCE_NAMES where possible

This commit is contained in:
Laserlicht
2025-09-14 20:43:53 +02:00
parent 81c64ce54f
commit a54a1f8b8d
17 changed files with 76 additions and 49 deletions

View File

@@ -37,6 +37,7 @@
#include "entities/faction/CFaction.h"
#include "entities/hero/CHero.h"
#include "entities/hero/CHeroClass.h"
#include "entities/ResourceTypeHandler.h"
#include "mapObjectConstructors/AObjectTypeHandler.h"
#include "constants/StringConstants.h"
#include "texts/CGeneralTextHandler.h"
@@ -628,7 +629,7 @@ si32 GameResID::decode(const std::string & identifier)
std::string GameResID::encode(const si32 index)
{
return GameConstants::RESOURCE_NAMES[index];
return LIBRARY->resourceTypeHandler->getById(index)->getJsonKey();
}
si32 BuildingTypeUniqueID::decode(const std::string & identifier)