1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Validate mod.json as json5 instead of strict json since Android launcher

no longer exists
This commit is contained in:
Ivan Savenko 2024-06-19 18:26:25 +00:00
parent 2b7131cfea
commit 4e9feca8d4

View File

@ -226,10 +226,7 @@ void CModHandler::loadOneMod(std::string modName, const std::string & parent, co
if(CResourceHandler::get("initial")->existsResource(CModInfo::getModFile(modFullName))) if(CResourceHandler::get("initial")->existsResource(CModInfo::getModFile(modFullName)))
{ {
JsonParsingSettings settings; CModInfo mod(modFullName, modSettings[modName], JsonNode(CModInfo::getModFile(modFullName)));
settings.mode = JsonParsingSettings::JsonFormatMode::JSON; // TODO: remove once Android launcher with its strict parser is gone
CModInfo mod(modFullName, modSettings[modName], JsonNode(CModInfo::getModFile(modFullName), settings));
if (!parent.empty()) // this is submod, add parent to dependencies if (!parent.empty()) // this is submod, add parent to dependencies
mod.dependencies.insert(parent); mod.dependencies.insert(parent);