|
@@ -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);
|
|
|
- }
|
|
|
});
|
|
|
}
|
|
|
|