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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user