mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -07:00
Allow tokens to consider providerIds. (#6075)
Tokens created through Ctrl + T use the pinned printing, if available. Tokens created through a related card menu use a token from the same set, if available. Took 2 hours 25 minutes Took 10 seconds Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
3a42354efd
commit
f2cbdae829
5 changed files with 36 additions and 9 deletions
|
|
@ -458,6 +458,12 @@ bool CardDatabase::isPreferredPrinting(const CardRef &cardRef) const
|
|||
return cardRef.providerId == getPreferredPrintingProviderId(cardRef.name);
|
||||
}
|
||||
|
||||
ExactCard CardDatabase::getCardFromSameSet(const QString &cardName, const PrintingInfo &otherPrinting) const
|
||||
{
|
||||
PrintingInfo relatedPrinting = getSpecificPrinting(cardName, otherPrinting.getSet()->getCorrectedShortName(), "");
|
||||
return ExactCard(guessCard({cardName}).getCardPtr(), relatedPrinting);
|
||||
}
|
||||
|
||||
void CardDatabase::refreshCachedReverseRelatedCards()
|
||||
{
|
||||
for (const CardInfoPtr &card : cards)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue