diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 8ad614b..e8ab8de 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -27,6 +27,7 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { toggleBondDamage: DeltaGreenActorSheet._toggleBondDamage, clearBondDamage: DeltaGreenActorSheet._clearBondDamage, toggleItemSortMode: DeltaGreenActorSheet._toggleItemSortMode, + toggleShowUntrained: DeltaGreenActorSheet._toggleShowUntrained, }, }); @@ -762,6 +763,12 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { }); } + static toggleShowUntrained() { + const targetProp = "system.showUntrainedSkills"; + const currentVal = foundry.utils.getProperty(this.actor, targetProp); + this.actor.update({ [targetProp]: !currentVal }); + } + /** @override */ activateListeners(html) { super.activateListeners(html); @@ -772,12 +779,6 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { // Rollable abilities - bind to everything with the 'Rollable' class 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(() => - this.actor.update({ - "system.showUntrainedSkills": !this.actor.system.showUntrainedSkills, - }), - ); - // Macro for toggling an item's equipped state html .find(".equipped-item") diff --git a/templates/actor/npc-sheet.html b/templates/actor/npc-sheet.html index 60584ad..70cac45 100644 --- a/templates/actor/npc-sheet.html +++ b/templates/actor/npc-sheet.html @@ -1,67 +1,113 @@ -
+ {{!-- Sheet Header --}}
- +
- + {{!-- Name, Profession, Portrait --}}
- +
-

+

+ +

-

+

+ +

- +
- + {{!-- HP --}}
- -
- - / - -
-
{{numberFormat actor.system.health.max decimals=0 sign=false}}
-
+ +
+ + / + +
+
{{numberFormat actor.system.health.max decimals=0 sign=false}}
+
{{!-- WP --}}
- -
- - / - -
-
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
-
+ +
+ + / + +
+
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
+
{{!-- Sanity --}}
- -
- - {{localize 'DG.NPCSheet.BreakPointAbbreviation'}}: - -
+ +
+ + {{localize 'DG.NPCSheet.BreakPointAbbreviation'}}: + +
{{!-- Physical Statistics like STR, CON, etc. --}}
- {{localize "DG.Sheet.BlockHeaders.Statistics"}} + {{localize "DG.Sheet.BlockHeaders.Statistics"}}
{{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="npc"}} @@ -73,9 +119,9 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -83,45 +129,58 @@ {{!-- Descriptions/Notes/Skills Tab --}}
-
+
- {{#each actor.system.sortedSkills as |skill key|}} - - {{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency)}} -
- - - - -
+ {{#each actor.system.sortedSkills as |skill key| }} + + {{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency) }} +
+ + + + +
{{/if}} {{/each}}

-
- {{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}} -
+
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}}

{{localize 'DG.UnnaturalSheet.NotesLabel'}} @@ -131,19 +190,18 @@ {{editor enrichedDescription target="system.notes" engine="prosemirror" button=true owner=owner editable=editable}}
- +
- + {{!-- GEAR --}}
{{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }}
- {{!-- About Tab --}} -
- {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} -
+ {{!-- About Tab --}} +
+ {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} +
- diff --git a/templates/actor/unnatural-sheet.html b/templates/actor/unnatural-sheet.html index 758cdf6..368a895 100644 --- a/templates/actor/unnatural-sheet.html +++ b/templates/actor/unnatural-sheet.html @@ -1,63 +1,101 @@ -
+ {{!-- Sheet Header --}}
- +
- + {{!-- Name, Profession, Portrait --}}
- +
-

+

+ +

-

+

+ +

- +
- + {{!-- HP --}}
- -
- - / - -
+ +
+ + / + +
{{!-- WP --}}
- -
- - / - -
+ +
+ + / + +
{{!-- Sanity Damage --}}
- +
- - / - + + / +
- - {{!-- Physical Statistics like STR, CON, etc. --}}
- {{localize "DG.Sheet.BlockHeaders.Statistics"}} + {{localize "DG.Sheet.BlockHeaders.Statistics"}}
- + {{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="unnatural"}}
@@ -67,9 +105,9 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -77,45 +115,59 @@ {{!-- Descriptions/Notes/Skills Tab --}}
-
+
- {{#each actor.system.sortedSkills as |skill key|}} - - {{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency)}} -
- - - - -
+ {{#each actor.system.sortedSkills as |skill key| }} + + {{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency) }} +
+ + + + +
{{/if}} {{/each}}

-
- {{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}} -
+
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html"}}

{{localize 'DG.UnnaturalSheet.NotesLabel'}} @@ -125,19 +177,18 @@ {{editor enrichedDescription target="system.notes" engine="prosemirror" button=true owner=owner editable=editable}}
- +
- + {{!-- GEAR --}}
{{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }}
- {{!-- About Tab --}} -
- {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} -
+ {{!-- About Tab --}} +
+ {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} +
-