mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
[Refactor] Pass around LoadedDeck instead of DeckLoader (#6422)
This commit is contained in:
parent
367507e054
commit
d6db21419c
44 changed files with 253 additions and 264 deletions
|
|
@ -60,13 +60,13 @@ void UtilityMenu::populatePredefinedTokensMenu()
|
|||
clear();
|
||||
setEnabled(false);
|
||||
predefinedTokens.clear();
|
||||
DeckLoader *_deck = player->getDeck();
|
||||
const DeckList &deckList = player->getDeck();
|
||||
|
||||
if (!_deck) {
|
||||
if (deckList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto tokenCardNodes = _deck->getDeckList()->getCardNodes({DECK_ZONE_TOKENS});
|
||||
auto tokenCardNodes = deckList.getCardNodes({DECK_ZONE_TOKENS});
|
||||
|
||||
if (!tokenCardNodes.isEmpty()) {
|
||||
setEnabled(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue