From b91b6a69ad575be20b561371cd93c50c6e2e797a Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 8 Sep 2021 13:03:02 -0400 Subject: [PATCH] Correctly place subtitle in `subname` field --- strange_eons_to_arkhamdb.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/strange_eons_to_arkhamdb.js b/strange_eons_to_arkhamdb.js index 8b53fb4..35a4198 100644 --- a/strange_eons_to_arkhamdb.js +++ b/strange_eons_to_arkhamdb.js @@ -31,11 +31,6 @@ if (Component.settings.get('Slot2') != 'None') { slot += '. ' + renameSlot(Component.settings.get('Slot2')); } -var card_name = Component.getName(); -if (Component.settings.get('Subtitle') != '') { - card_name += ': ' + Component.settings.get('Subtitle'); -} - const tag_replacements = { "": String(Component.getName()), "": "[guardian]", @@ -105,7 +100,7 @@ var card_data = { health: parseInt(Component.settings.get('Stamina')) || null, illustrator: String(Component.settings.get('Artist')), is_unique: Component.settings.getBoolean('Unique'), - name: substitute_tags(String(card_name)), + name: substitute_tags(String(Component.getName())), pack_code: pack_code, position: parseInt(Component.settings.get('CollectionNumber')) || null, quantity: 2, // TODO @@ -125,6 +120,11 @@ var card_data = { xp: parseInt(Component.settings.get('Level')) || null, }; +var subtitle = Component.settings.get('Subtitle'); +if (subtitle && subtitle != '') { + card_data.subname = subtitle; +} + if (Component.settings.get('CardClass2') != 'None') { card_data.faction2_code = String(Component.settings.get('CardClass2')).toLowerCase(); }