Adding a way to mark decks as "locked" based on options requirements (option on or off). Can be used for example to lock a deck until a specific set is not unlocked. Works for both player decks (could be used for premade?) and AI decks.

This commit is contained in:
wagic.the.homebrew
2011-05-06 06:40:00 +00:00
parent efad3f652f
commit 7beb958067
5 changed files with 57 additions and 21 deletions
+6 -1
View File
@@ -698,7 +698,6 @@ MTGDeck::MTGDeck(const char * config_file, MTGAllCards * _allcards, int meta_onl
meta_id = atoi(meta_name.substr(4).c_str());
wagic::ifstream file(config_file);
std::string s;
if (file)
{
while (std::getline(file, s))
@@ -726,6 +725,12 @@ MTGDeck::MTGDeck(const char * config_file, MTGAllCards * _allcards, int meta_onl
meta_AIHints.push_back(s.substr(found + 5));
continue;
}
found = s.find("UNLOCK:");
if (found != string::npos)
{
meta_unlockRequirements = s.substr(found + 7);
continue;
}
continue;
}
if (meta_only) break;