From 8b96ad97d380d4308ca05e3d739b78b647de812c Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 29 Nov 2023 18:40:55 +0100 Subject: [PATCH] added missing tag --- src/arkhamdb/DeckImporterMain.ttslua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/arkhamdb/DeckImporterMain.ttslua b/src/arkhamdb/DeckImporterMain.ttslua index b839bfb3..90d564d9 100644 --- a/src/arkhamdb/DeckImporterMain.ttslua +++ b/src/arkhamdb/DeckImporterMain.ttslua @@ -154,6 +154,7 @@ function deckSpawned(deck, playerColor) local player = Player[playmatApi.getPlayerColor(playerColor)] local handPos = player.getHandTransform(1).position -- Only one hand zone per player local deckCards = deck.getData().ContainedObjects + -- Process in reverse order so taking cards out doesn't upset the indexing for i = #deckCards, 1, -1 do local cardMetadata = JSON.decode(deckCards[i].GMNotes) or { } @@ -161,6 +162,11 @@ function deckSpawned(deck, playerColor) deck.takeObject({ index = i - 1, position = handPos, flip = true, smooth = true}) end end + + -- add the "PlayerCard" tag to the deck + if deck and deck.type == "Deck" and deck.getQuantity() > 1 then + deck.addTag("PlayerCard") + end end -- Converts the Raven Quill's selections from card IDs to card names. This could be more elegant