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

Support for defining new campaign regions in mods, for hota h3c

This commit is contained in:
Ivan Savenko
2025-05-30 18:27:54 +03:00
parent 1ea2ce7959
commit a842dfb3c4
27 changed files with 677 additions and 477 deletions

View File

@@ -288,8 +288,6 @@ CGeneralTextHandler::CGeneralTextHandler():
}
}
while (parser.endLine() && !text.empty());
scenariosCountPerCampaign.push_back(region);
}
}
}
@@ -306,15 +304,6 @@ int32_t CGeneralTextHandler::pluralText(const int32_t textIndex, const int32_t c
return textIndex + 1;
}
size_t CGeneralTextHandler::getCampaignLength(size_t campaignID) const
{
assert(campaignID < scenariosCountPerCampaign.size());
if(campaignID < scenariosCountPerCampaign.size())
return scenariosCountPerCampaign[campaignID];
return 0;
}
std::string CGeneralTextHandler::getPreferredLanguage()
{
assert(!settings["general"]["language"].String().empty());