mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-21 12:06:49 +02:00
Fix incorrect identifiers format
This commit is contained in:
parent
eebc6fd625
commit
a3846f1b31
@ -390,7 +390,7 @@ CArtifact * CArtHandler::loadFromJson(const std::string & scope, const JsonNode
|
|||||||
JsonNode conf;
|
JsonNode conf;
|
||||||
conf.setMeta(scope);
|
conf.setMeta(scope);
|
||||||
|
|
||||||
VLC->objtypeh->loadSubObject(art->getJsonKey(), conf, Obj::ARTIFACT, art->getIndex());
|
VLC->objtypeh->loadSubObject(art->identifier, conf, Obj::ARTIFACT, art->getIndex());
|
||||||
|
|
||||||
if(!art->advMapDef.empty())
|
if(!art->advMapDef.empty())
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ std::string ObjectClass::getJsonKey() const
|
|||||||
|
|
||||||
std::string ObjectClass::getNameTextID() const
|
std::string ObjectClass::getNameTextID() const
|
||||||
{
|
{
|
||||||
return TextIdentifier("object", identifier, "name").get();
|
return TextIdentifier("object", modScope, identifier, "name").get();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ObjectClass::getNameTranslated() const
|
std::string ObjectClass::getNameTranslated() const
|
||||||
@ -246,10 +246,10 @@ ObjectClass * CObjectClassesHandler::loadFromJson(const std::string & scope, con
|
|||||||
if ( subMeta != "core")
|
if ( subMeta != "core")
|
||||||
logMod->warn("Object %s:%s.%s - attempt to load object with preset index! This option is reserved for built-in mod", subMeta, name, subData.first );
|
logMod->warn("Object %s:%s.%s - attempt to load object with preset index! This option is reserved for built-in mod", subMeta, name, subData.first );
|
||||||
size_t subIndex = subData.second["index"].Integer();
|
size_t subIndex = subData.second["index"].Integer();
|
||||||
loadSubObject(scope, subData.first, subData.second, obj, subIndex);
|
loadSubObject(subData.second.meta, subData.first, subData.second, obj, subIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
loadSubObject(scope, subData.first, subData.second, obj);
|
loadSubObject(subData.second.meta, subData.first, subData.second, obj);
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -553,7 +553,7 @@ bool AObjectTypeHandler::hasNameTextID() const
|
|||||||
|
|
||||||
std::string AObjectTypeHandler::getNameTextID() const
|
std::string AObjectTypeHandler::getNameTextID() const
|
||||||
{
|
{
|
||||||
return TextIdentifier("mapObject", getTypeName(), getJsonKey(), "name").get();
|
return TextIdentifier("mapObject", modScope, typeName, subTypeName, "name").get();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string AObjectTypeHandler::getNameTranslated() const
|
std::string AObjectTypeHandler::getNameTranslated() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user