diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js
index b4aa534..d8cc287 100644
--- a/module/actor/actor-sheet.js
+++ b/module/actor/actor-sheet.js
@@ -17,6 +17,7 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) {
position: { width: 750, height: 770 },
actions: {
itemAction: DeltaGreenActorSheet._onItemAction,
+ roll: DeltaGreenActorSheet._onRoll,
},
});
@@ -589,7 +590,6 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) {
if (!this.options.editable) return;
// Rollable abilities - bind to everything with the 'Rollable' class
- html.find(".rollable").click(this._onRoll.bind(this));
html.find(".rollable").contextmenu(this._onRoll.bind(this)); // this is for right-click, which triggers the roll modifier dialogue for most rolls
html.find(".toggle-untrained").click(() =>
@@ -1269,16 +1269,10 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) {
* @async
* @private
*/
- async _onRoll(event) {
- event.preventDefault();
- const element = event.currentTarget;
- const { dataset } = element;
-
- if (event && event.which === 2) {
- // probably don't want rolls to trigger from a middle mouse click so just kill it here
- return;
- }
+ static async _onRoll(event, target) {
+ if (target.classList.contains("not-rollable") || event.which === 3) return;
+ const { dataset } = target;
const item = this.actor.items.get(dataset.iid);
const rollOptions = {
rollType: dataset.rolltype,
diff --git a/templates/actor/partials/attributes-grid-partial.html b/templates/actor/partials/attributes-grid-partial.html
index 3d84e50..25aff6f 100644
--- a/templates/actor/partials/attributes-grid-partial.html
+++ b/templates/actor/partials/attributes-grid-partial.html
@@ -4,6 +4,7 @@
({{numberFormat statistic.x5 decimals=0 sign=false}}% )
diff --git a/templates/actor/partials/custom-skills-partial.html b/templates/actor/partials/custom-skills-partial.html
index bd7340b..a26a8a3 100644
--- a/templates/actor/partials/custom-skills-partial.html
+++ b/templates/actor/partials/custom-skills-partial.html
@@ -1,68 +1,95 @@
- {{#each actor.system.sortedCustomSkills as |skill|}}
-
- {{#if_eq type "typeSkill"}}
+ {{#each actor.system.sortedCustomSkills as |skill| }}
+ {{#if_eq type "typeSkill" }}
{{/if_eq}}
- {{#if_eq type "training"}}
+ {{#if_eq type "training" }}
-
-
- {{#if_not_eq (localize (concat 'DG.Attributes.' skill.key)) (concat "DG.Attributes." skill.key)}}
-
- {{else}}
- {{#if_not_eq (localize (concat 'DG.Skills.' skill.key)) (concat "DG.Skills." skill.key)}}
-