From 22092ad6ffe3c0fb09f1c67c0e525f564f732a84 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 17 Oct 2024 15:51:39 +0200 Subject: [PATCH] improved code --- src/accessories/CardBackEnhancer.ttslua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/accessories/CardBackEnhancer.ttslua b/src/accessories/CardBackEnhancer.ttslua index 0dc02054..5effbc19 100644 --- a/src/accessories/CardBackEnhancer.ttslua +++ b/src/accessories/CardBackEnhancer.ttslua @@ -54,13 +54,8 @@ function processCard(cardData) return false end - local newBack - if tags.PlayerCard then - newBack = CARD_BACK_URL.PlayerCard - elseif tags.ScenarioCard then - newBack = CARD_BACK_URL.ScenarioCard - end - + -- get correct back URL depending on tag + local newBack = tags.PlayerCard and CARD_BACK_URL.PlayerCard or CARD_BACK_URL.ScenarioCard local customDeckId, customDeckData = next(cardData["CustomDeck"]) -- if this card already has the correct back settings