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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user