Skip to content

Commit

Permalink
fix: change DM label to level
Browse files Browse the repository at this point in the history
also expand rollClass definitions for active animations
  • Loading branch information
marvin9257 committed Nov 6, 2024
1 parent 4b32bcb commit c41afc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/module/utils/TwodsixRollSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand All @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion static/templates/chat/throw-dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{{/if}}
{{#if itemRoll}}
<div class="form-group">
<label>{{localize "TWODSIX.Chat.Roll.ItemModifier"}}
<label>{{#if isPsionicAbility}}{{localize "TWODSIX.Items.Psionics.Level"}}{{else}}{{localize "TWODSIX.Chat.Roll.ItemModifier"}}{{/if}}
<input type="number" name="rollModifiers.item" value="{{rollModifiers.item}}" placeholder="0" onClick="this.select();" style="width: 8ch;"/>
({{itemLabel}})
</label>
Expand Down

0 comments on commit c41afc7

Please sign in to comment.