mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG
This commit is contained in:
commit
ccb475b699
@ -688,7 +688,19 @@ void CTownHandler::loadObject(std::string scope, std::string name, const JsonNod
|
||||
JsonNode config = data["town"]["mapObject"];
|
||||
config["faction"].String() = object->identifier;
|
||||
config["faction"].meta = scope;
|
||||
if (config.meta.empty())// MODS COMPATIBILITY FOR 0.96
|
||||
config.meta = scope;
|
||||
VLC->objtypeh->loadSubObject(object->identifier, config, index, object->index);
|
||||
|
||||
// MODS COMPATIBILITY FOR 0.96
|
||||
auto & advMap = data["town"]["adventureMap"];
|
||||
if (!advMap.isNull())
|
||||
{
|
||||
logGlobal->warnStream() << "Outdated town mod. Will try to generate valid templates out of fort";
|
||||
JsonNode config;
|
||||
config["animation"] = advMap["castle"];
|
||||
VLC->objtypeh->getHandlerFor(index, object->index)->addTemplate(config);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -717,15 +729,6 @@ void CTownHandler::loadObject(std::string scope, std::string name, const JsonNod
|
||||
config["faction"].String() = object->identifier;
|
||||
config["faction"].meta = scope;
|
||||
VLC->objtypeh->loadSubObject(object->identifier, config, index, object->index);
|
||||
|
||||
// MODS COMPATIBILITY FOR 0.96
|
||||
auto & advMap = data["town"]["adventureMap"];
|
||||
if (!advMap["fort"].isNull())
|
||||
{
|
||||
JsonNode config;
|
||||
config["appearance"] = advMap["fort"];
|
||||
VLC->objtypeh->getHandlerFor(index, object->index)->addTemplate(config);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user