From 04dbcb2db95c46312ed7dc63a803dad390a53385 Mon Sep 17 00:00:00 2001 From: jalensailin Date: Tue, 24 Jun 2025 19:24:04 -0400 Subject: [PATCH] break out motivations tab --- module/actor/actor-sheet.js | 3 + templates/actor/parts/motivations-tab.html | 117 +++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 templates/actor/parts/motivations-tab.html diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 06b19ce..08a0641 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -52,6 +52,9 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { `${this.TEMPLATE_PATH}/actor/partials/attributes-grid-partial.html`, ], }, + motivations: { + template: `${this.TEMPLATE_PATH}/actor/parts/motivations-tab.html`, + }, }); /* -------------------------------------------- */ diff --git a/templates/actor/parts/motivations-tab.html b/templates/actor/parts/motivations-tab.html new file mode 100644 index 0000000..cba7585 --- /dev/null +++ b/templates/actor/parts/motivations-tab.html @@ -0,0 +1,117 @@ +{{!-- Psychological Tab (formerly 'Mental', formerly 'Motivations') --}} +
+
+ {{localize "DG.Sheet.BlockHeaders.BreakingPointAndAdaptations"}} +
+
+
+ + + {{localize 'DG.Mental.Reset'}} +
+ +
+

{{localize 'DG.Mental.SanityLossIncidentsLabel'}}

+
+ + + + + + + + + + + + + + + +
+
+
+ +
+ {{localize "DG.Sheet.BlockHeaders.MotivationsAndDisorders"}} +
+ +
+
    + +
  1. +
    {{localize 'DG.Mental.Motivations'}}
    +
    {{localize 'DG.Mental.Disorders'}}
    + +
  2. + + {{#each actor.items as |item id| }} + {{#if_eq item.type 'motivation' }} + +
  3. +

    + {{item.name}} +

    + + {{#if item.system.crossedOut }} +

    {{item.system.disorder}}

    + {{/if}} + +
    + + +
    +
  4. + + {{/if_eq}} + {{/each}} +
+
+