From c41afc774d48169f11f34bcea1c1c67eaf96a473 Mon Sep 17 00:00:00 2001 From: marvin9257 <72580196+marvin9257@users.noreply.github.com> Date: Wed, 6 Nov 2024 08:12:12 -0600 Subject: [PATCH] fix: change DM label to level also expand rollClass definitions for active animations --- src/module/utils/TwodsixRollSettings.ts | 10 ++++++++-- static/templates/chat/throw-dialog.html | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/module/utils/TwodsixRollSettings.ts b/src/module/utils/TwodsixRollSettings.ts index 292fb66f8..dde17d2e8 100644 --- a/src/module/utils/TwodsixRollSettings.ts +++ b/src/module/utils/TwodsixRollSettings.ts @@ -97,7 +97,11 @@ export class TwodsixRollSettings { rollClass = "ShipWeapon"; } else { rollClass = "ShipAction"; - } + } ////NEED TO EXPAND TYPES HERE to INCLUDE SP + } else if (anItem.type === "spell") { + rollClass = "Spell"; + } else if (anItem.type === "psiAbility") { + rollClass = "PsionicAbility"; } else { rollClass = "Item"; } @@ -115,6 +119,7 @@ export class TwodsixRollSettings { this.rollMode = settings?.rollMode ?? game.settings.get('core', 'rollMode'); this.skillRoll = !!(settings?.skillRoll ?? aSkill); this.itemRoll = !!(anItem); + this.isPsionicAbility = this.itemRoll ? anItem.type === "psiAbility" : false; this.itemName = settings?.itemName ?? itemName; this.showRangeModifier = (game.settings.get('twodsix', 'rangeModifierType') !== 'none' && anItem?.type === "weapon" && settings?.rollModifiers?.rangeLabel) ?? false; this.showTargetModifier = Object.keys(TWODSIX.TARGET_DM).length > 1; @@ -144,7 +149,7 @@ export class TwodsixRollSettings { selectedSkill: aSkill?.uuid, skillLevelMax: settings?.rollModifiers?.skillLevelMax ?? undefined, armorModifier: settings?.rollModifiers?.armorModifier ?? 0, - armorLabel: settings?.rollModifiers?.armorLabel ?? "", + armorLabel: settings?.rollModifiers?.armorLabel ?? "" }; this.flags = { rollClass: rollClass, @@ -229,6 +234,7 @@ export class TwodsixRollSettings { showConditions: (game.settings.get('twodsix', 'useWoundedStatusIndicators') || game.settings.get('twodsix', 'useEncumbranceStatusIndicators')), showWounds: game.settings.get('twodsix', 'useWoundedStatusIndicators'), showEncumbered: game.settings.get('twodsix', 'useEncumbranceStatusIndicators'), + isPsionicAbility: this.isPsionicAbility }; const buttons = { diff --git a/static/templates/chat/throw-dialog.html b/static/templates/chat/throw-dialog.html index faee92257..7fec2a03d 100644 --- a/static/templates/chat/throw-dialog.html +++ b/static/templates/chat/throw-dialog.html @@ -49,7 +49,7 @@ {{/if}} {{#if itemRoll}}