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

IdentifierStorage is now separate handler in VLC

This commit is contained in:
Ivan Savenko
2023-08-25 22:36:00 +03:00
parent c8a6cd74cc
commit 7e27ac7073
8 changed files with 34 additions and 55 deletions

View File

@@ -277,7 +277,7 @@ void CObjectClassesHandler::loadObject(std::string scope, std::string name, cons
{
auto * object = loadFromJson(scope, data, name, objects.size());
objects.push_back(object);
VLC->modh->getIdentifiers().registerObject(scope, "object", name, object->id);
VLC->identifiersHandler->registerObject(scope, "object", name, object->id);
}
void CObjectClassesHandler::loadObject(std::string scope, std::string name, const JsonNode & data, size_t index)
@@ -285,7 +285,7 @@ void CObjectClassesHandler::loadObject(std::string scope, std::string name, cons
auto * object = loadFromJson(scope, data, name, index);
assert(objects[(si32)index] == nullptr); // ensure that this id was not loaded before
objects[static_cast<si32>(index)] = object;
VLC->modh->getIdentifiers().registerObject(scope, "object", name, object->id);
VLC->identifiersHandler->registerObject(scope, "object", name, object->id);
}
void CObjectClassesHandler::loadSubObject(const std::string & identifier, JsonNode config, si32 ID, si32 subID)