mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 19:47:46 -07:00
[VDS] Ignore tokens when calculating color identity (#6532)
This commit is contained in:
parent
f7ffcc58fe
commit
af2995ba96
3 changed files with 7 additions and 7 deletions
|
|
@ -153,7 +153,7 @@ void DeckPreviewWidget::updateTagsVisibility(bool visible)
|
||||||
|
|
||||||
QString DeckPreviewWidget::getColorIdentity()
|
QString DeckPreviewWidget::getColorIdentity()
|
||||||
{
|
{
|
||||||
QStringList cardList = deckLoader->getDeck().deckList.getCardList();
|
QStringList cardList = deckLoader->getDeck().deckList.getCardList({DECK_ZONE_MAIN, DECK_ZONE_SIDE});
|
||||||
if (cardList.isEmpty()) {
|
if (cardList.isEmpty()) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -438,9 +438,9 @@ void DeckList::cleanList(bool preserveMetadata)
|
||||||
refreshDeckHash();
|
refreshDeckHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList DeckList::getCardList() const
|
QStringList DeckList::getCardList(const QSet<QString> &restrictToZones) const
|
||||||
{
|
{
|
||||||
auto nodes = tree.getCardNodes();
|
auto nodes = tree.getCardNodes(restrictToZones);
|
||||||
|
|
||||||
QStringList result;
|
QStringList result;
|
||||||
std::transform(nodes.cbegin(), nodes.cend(), std::back_inserter(result), [](auto node) { return node->getName(); });
|
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;
|
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;
|
QList<CardRef> result;
|
||||||
std::transform(nodes.cbegin(), nodes.cend(), std::back_inserter(result),
|
std::transform(nodes.cbegin(), nodes.cend(), std::back_inserter(result),
|
||||||
|
|
|
||||||
|
|
@ -221,8 +221,8 @@ public:
|
||||||
{
|
{
|
||||||
return tree.isEmpty() && metadata.isEmpty() && sideboardPlans.isEmpty();
|
return tree.isEmpty() && metadata.isEmpty() && sideboardPlans.isEmpty();
|
||||||
}
|
}
|
||||||
QStringList getCardList() const;
|
QStringList getCardList(const QSet<QString> &restrictToZones = {}) const;
|
||||||
QList<CardRef> getCardRefList() const;
|
QList<CardRef> getCardRefList(const QSet<QString> &restrictToZones = {}) const;
|
||||||
QList<const DecklistCardNode *> getCardNodes(const QSet<QString> &restrictToZones = {}) const;
|
QList<const DecklistCardNode *> getCardNodes(const QSet<QString> &restrictToZones = {}) const;
|
||||||
QList<const InnerDecklistNode *> getZoneNodes() const;
|
QList<const InnerDecklistNode *> getZoneNodes() const;
|
||||||
int getSideboardSize() const;
|
int getSideboardSize() const;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue