mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Minimize hardcoded logic for campaigns. Support for hota h3c's
This commit is contained in:
@@ -90,22 +90,9 @@ std::string StartInfo::getCampaignName() const
|
||||
return LIBRARY->generaltexth->allTexts[508];
|
||||
}
|
||||
|
||||
bool StartInfo::isRestorationOfErathiaCampaign() const
|
||||
bool StartInfo::restrictedGarrisonsForAI() const
|
||||
{
|
||||
constexpr std::array roeCampaigns = {
|
||||
"DATA/GOOD1",
|
||||
"DATA/EVIL1",
|
||||
"DATA/GOOD2",
|
||||
"DATA/NEUTRAL1",
|
||||
"DATA/EVIL2",
|
||||
"DATA/GOOD3",
|
||||
"DATA/SECRET1",
|
||||
};
|
||||
|
||||
if (!campState)
|
||||
return false;
|
||||
|
||||
return vstd::contains(roeCampaigns, campState->getFilename());
|
||||
return campState && campState->restrictedGarrisonsForAI();
|
||||
}
|
||||
|
||||
void LobbyInfo::verifyStateBeforeStart(bool ignoreNoHuman) const
|
||||
|
||||
Reference in New Issue
Block a user