add options show tokens
you can display tokens in editor (show tokens and choose 0 manacost) but you can't add them, useful for tracking missing images...
This commit is contained in:
@@ -295,8 +295,15 @@ void WSrcCards::validate()
|
||||
updateCounts();
|
||||
if (!filtersRoot) return;
|
||||
for (size_t t = 0; t < cards.size(); t++)
|
||||
{//don't add tokens or negative id
|
||||
if (matchesFilters(cards[t]) && (cards[t]->getId() > 0) && (cards[t]->getRarity() != Constants::RARITY_T)) validated.push_back(t);
|
||||
{
|
||||
if(!options[Options::SHOWTOKENS].number)
|
||||
{//don't add tokens or negative id
|
||||
if (matchesFilters(cards[t]) && (cards[t]->getId() > 0) && (cards[t]->getRarity() != Constants::RARITY_T)) validated.push_back(t);
|
||||
}
|
||||
else
|
||||
{//show but you cant add
|
||||
if (matchesFilters(cards[t])) validated.push_back(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,8 +398,15 @@ WSrcUnlockedCards::WSrcUnlockedCards(float delay) :
|
||||
}
|
||||
|
||||
for (it = ac->collection.begin(); it != ac->collection.end(); it++)
|
||||
{//no tokens or negative id's
|
||||
if (it->second && unlocked[it->second->setId] && (it->second->getId() > 0) && (it->second->getRarity() != Constants::RARITY_T)) cards.push_back(it->second);
|
||||
{
|
||||
if(!options[Options::SHOWTOKENS].number)
|
||||
{//dont show tokens & negative id's
|
||||
if (it->second && unlocked[it->second->setId] && (it->second->getId() > 0) && (it->second->getRarity() != Constants::RARITY_T)) cards.push_back(it->second);
|
||||
}
|
||||
else
|
||||
{//show but you cant add
|
||||
if (it->second && unlocked[it->second->setId]) cards.push_back(it->second);
|
||||
}
|
||||
}
|
||||
if (unlocked)
|
||||
{
|
||||
@@ -416,10 +430,21 @@ int WSrcDeck::loadMatches(MTGDeck * deck)
|
||||
for (it = deck->cards.begin(); it != deck->cards.end(); it++)
|
||||
{
|
||||
MTGCard * c = deck->getCardById(it->first);
|
||||
if (c && matchesFilters(c) && (c->getId() > 0) && (c->getRarity() != Constants::RARITY_T))
|
||||
{
|
||||
Add(c, it->second);
|
||||
count++;
|
||||
if(!options[Options::SHOWTOKENS].number)
|
||||
{//dont show tokens & negative id's
|
||||
if (c && matchesFilters(c) && (c->getId() > 0) && (c->getRarity() != Constants::RARITY_T))
|
||||
{
|
||||
Add(c, it->second);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{//show but you cant add
|
||||
if (c && matchesFilters(c))
|
||||
{
|
||||
Add(c, it->second);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
validate();
|
||||
|
||||
Reference in New Issue
Block a user