mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-26 03:14:44 -08:00
[VDS] Ignore tokens when calculating color identity (#6532)
This commit is contained in:
@@ -153,7 +153,7 @@ void DeckPreviewWidget::updateTagsVisibility(bool visible)
|
||||
|
||||
QString DeckPreviewWidget::getColorIdentity()
|
||||
{
|
||||
QStringList cardList = deckLoader->getDeck().deckList.getCardList();
|
||||
QStringList cardList = deckLoader->getDeck().deckList.getCardList({DECK_ZONE_MAIN, DECK_ZONE_SIDE});
|
||||
if (cardList.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -438,9 +438,9 @@ void DeckList::cleanList(bool preserveMetadata)
|
||||
refreshDeckHash();
|
||||
}
|
||||
|
||||
QStringList DeckList::getCardList() const
|
||||
QStringList DeckList::getCardList(const QSet<QString> &restrictToZones) const
|
||||
{
|
||||
auto nodes = tree.getCardNodes();
|
||||
auto nodes = tree.getCardNodes(restrictToZones);
|
||||
|
||||
QStringList result;
|
||||
std::transform(nodes.cbegin(), nodes.cend(), std::back_inserter(result), [](auto node) { return node->getName(); });
|
||||
@@ -448,9 +448,9 @@ QStringList DeckList::getCardList() const
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<CardRef> DeckList::getCardRefList() const
|
||||
QList<CardRef> DeckList::getCardRefList(const QSet<QString> &restrictToZones) const
|
||||
{
|
||||
auto nodes = tree.getCardNodes();
|
||||
auto nodes = tree.getCardNodes(restrictToZones);
|
||||
|
||||
QList<CardRef> result;
|
||||
std::transform(nodes.cbegin(), nodes.cend(), std::back_inserter(result),
|
||||
|
||||
@@ -221,8 +221,8 @@ public:
|
||||
{
|
||||
return tree.isEmpty() && metadata.isEmpty() && sideboardPlans.isEmpty();
|
||||
}
|
||||
QStringList getCardList() const;
|
||||
QList<CardRef> getCardRefList() const;
|
||||
QStringList getCardList(const QSet<QString> &restrictToZones = {}) const;
|
||||
QList<CardRef> getCardRefList(const QSet<QString> &restrictToZones = {}) const;
|
||||
QList<const DecklistCardNode *> getCardNodes(const QSet<QString> &restrictToZones = {}) const;
|
||||
QList<const InnerDecklistNode *> getZoneNodes() const;
|
||||
int getSideboardSize() const;
|
||||
|
||||
Reference in New Issue
Block a user