mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Better handle the TK set used for tokens
Let oracle add a basic TK set in cards.xml Unify all the code previously using the string literal “TK”
This commit is contained in:
parent
8542d875d3
commit
ac43fa23b9
4 changed files with 9 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include <QImageReader>
|
||||
|
||||
const int CardDatabase::versionNeeded = 3;
|
||||
const char* CardDatabase::TOKENS_SETNAME = "TK";
|
||||
|
||||
static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardSet *set)
|
||||
{
|
||||
|
|
@ -791,7 +792,7 @@ CardInfo *CardDatabase::getCardFromMap(CardNameMap &cardMap, const QString &card
|
|||
return cardMap.value(cardName);
|
||||
else if (createIfNotFound) {
|
||||
CardInfo *newCard = new CardInfo(this, cardName, true);
|
||||
newCard->addToSet(getSet("TK"));
|
||||
newCard->addToSet(getSet(CardDatabase::TOKENS_SETNAME));
|
||||
cardMap.insert(cardName, newCard);
|
||||
return newCard;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue