diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 2ef9ae8..f739094 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -9,7 +9,7 @@ import { const { ActorSheetV2 } = foundry.applications.sheets; -/** * @extends {ActorSheetV2} */ +/** @extends {DGSheetMixin(ActorSheetV2)} */ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { /** @override */ static DEFAULT_OPTIONS = /** @type {const} */ ({ @@ -34,8 +34,8 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { }); static PARTS = /** @type {const} */ ({ - main: { - template: `systems/${DG.ID}/templates/actor/actor-sheet.html`, + header: { + template: `${this.TEMPLATE_PATH}/actor/parts/header.html`, }, tabs: { template: `templates/generic/tab-navigation.hbs`, // From FoundryVTT diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index efb6bc1..dcbc0b5 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -1,336 +1,320 @@
- - {{!-- Sheet Header --}} -
- -
- {{!--

DELTA GREEN

--}} - {{!-- Name, Profession, Portrait --}} -
- -
-
-

-
-
-

-
-
-
- -
- - {{!-- HP --}} -
- -
- - / - -
-
{{numberFormat actor.system.health.max decimals=0 sign=false}}
-
-
-
- - {{!-- WP --}} -
- -
- - / - -
-
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
-
-
-
- - {{!-- Sanity --}} -
- -
- - {{#if (keepSanityPrivate)}} - - / -
-
{{numberFormat actor.system.sanity.max decimals=0 sign=false}}
-
- {{/if}} - - {{#unless (keepSanityPrivate)}} - - - / -
-
{{numberFormat actor.system.sanity.max decimals=0 sign=false}}
-
- - {{/unless}} -
-
-
+ {{!-- Sheet Body --}} +
+ {{!-- Skills Tab --}} +
+
+ {{localize "DG.Sheet.BlockHeaders.SkillsAndTraining"}}
-
- - {{!-- Sheet Body --}} -
- - {{!-- Skills Tab --}} -
-
- {{localize "DG.Sheet.BlockHeaders.SkillsAndTraining"}} -
- -
- {{#each actor.system.sortedSkills as |skill key|}} -
- - - {{#if_eq skill.key 'ritual' }} - - {{#if (keepSanityPrivate)}} - - - {{/if}} - - {{#unless (keepSanityPrivate)}} - - - {{/unless}} - - {{/if_eq}} - - {{#if_not_eq skill.key 'ritual' }} - - - {{/if_not_eq}} - -
- {{/each}} -
- - {{!-- Custom Skills and Special Training --}} -
- {{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html" actorType="agent"}} -
+
+ {{#each actor.system.sortedSkills as |skill key| }} +
+ + + {{#if_eq skill.key 'ritual' }} + {{#if (keepSanityPrivate) }} + + + {{/if}} + {{#unless (keepSanityPrivate)}} + + + {{/unless}} + {{/if_eq}} + {{#if_not_eq skill.key 'ritual' }} + + + {{/if_not_eq}} +
+ {{/each}} +
+{{!-- Custom Skills and Special Training --}} +
{{> "systems/deltagreen/templates/actor/partials/custom-skills-partial.html" actorType="agent"}}
+
+{{!-- Physical Statistics like STR, CON, etc. --}} +
+
+ {{localize "DG.Sheet.BlockHeaders.Attributes"}} +
+ {{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="agent"}} +
+
+ {{localize "DG.Sheet.BlockHeaders.Injuries"}} +
+
+
+ + +
+
+ + + {{#if actor.system.physical.exhausted }} + + + {{/if}} +
+
+ + + + +
+
+
+{{!-- 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'}}
    + - - {{!-- Physical Statistics like STR, CON, etc. --}} -
    - -
    - {{localize "DG.Sheet.BlockHeaders.Attributes"}} -
    - - {{> "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html" actorType="agent"}} - -
    -
    - {{localize "DG.Sheet.BlockHeaders.Injuries"}} -
    - -
    -
    - - -
    -
    - - - - - {{#if actor.system.physical.exhausted }} - - - - - {{/if}} -
    -
    - - - - -
    +
  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}} +
+
+
+{{!-- GEAR Tab --}} +
+ {{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }} +
+{{!-- PERSONAL (Biography) Tab --}} +
+
+ {{localize "DG.Sheet.BlockHeaders.PersonalInfoCV"}} +
+ {{> "systems/deltagreen/templates/actor/partials/cv-partial.html" }} +
+{{!-- Bonds Tab --}} +
+
+ {{localize "DG.Sheet.BlockHeaders.BondsRelationshipsContacts"}} +
+
+
    +
  1. +
    +
    - - {{!-- 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}} -
    -
    +
    +
    {{localize 'DG.Bonds.Name'}}
    +
    {{localize 'DG.Bonds.Relationship'}}
    +
    {{localize 'DG.Bonds.Score'}}
    + - - {{!-- GEAR Tab --}} -
    - {{> "systems/deltagreen/templates/actor/partials/equipment-partial.html" }} -
    - - {{!-- PERSONAL (Biography) Tab --}} -
    -
    - {{localize "DG.Sheet.BlockHeaders.PersonalInfoCV"}} +
  2. + {{#each actor.items as |item id| }} + {{#if_eq item.type 'bond' }} +
  3. + +
    +
    - {{> "systems/deltagreen/templates/actor/partials/cv-partial.html" }} -
- - {{!-- Bonds Tab --}} -
-
- {{localize "DG.Sheet.BlockHeaders.BondsRelationshipsContacts"}} +

{{item.name}}

+ {{item.system.relationship}} + {{item.system.score}} +
+ +
- -
-
    -
  1. - -
    -
    -
    {{localize 'DG.Bonds.Name'}}
    -
    {{localize 'DG.Bonds.Relationship'}}
    -
    {{localize 'DG.Bonds.Score'}}
    - -
  2. - - {{#each actor.items as |item id|}} - {{#if_eq item.type 'bond'}} - -
  3. - -
    -

    {{item.name}}

    - {{item.system.relationship}} - {{item.system.score}} -
    - - -
    -
  4. - - {{/if_eq}} - {{/each}} -
- -
- {{localizeWithFallback 'DG.Generic.CheckDamagedBondsBoxUntilNextHomeScene' 'Check a damaged Bond's box until the next Home scene ends.' }} -
- -
-
- - {{!-- About Tab --}} -
- - {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} - -
- -
+ + {{/if_eq}} + {{/each}} + +
+ {{localizeWithFallback 'DG.Generic.CheckDamagedBondsBoxUntilNextHomeScene' 'Check a damaged Bond's box until the next Home scene ends.' }} +
+ + +{{!-- About Tab --}} +
+ {{> "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html" }} +
+
- diff --git a/templates/actor/parts/header.html b/templates/actor/parts/header.html new file mode 100644 index 0000000..beb219f --- /dev/null +++ b/templates/actor/parts/header.html @@ -0,0 +1,101 @@ +
+
+ {{!-- Name, Profession, Portrait --}} +
+ +
+
+

+ +

+
+
+

+ +

+
+
+
+
+ {{!-- HP --}} +
+ +
+ + / +
+
{{numberFormat actor.system.health.max decimals=0 sign=false}}
+
+
+
+ {{!-- WP --}} +
+ +
+ + / +
+
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
+
+
+
+ {{!-- Sanity --}} +
+ +
+ {{#if (keepSanityPrivate) }} + + / +
+
{{numberFormat actor.system.sanity.max decimals=0 sign=false}}
+
+ {{/if}} + {{#unless (keepSanityPrivate)}} + + / +
+
{{numberFormat actor.system.sanity.max decimals=0 sign=false}}
+
+ {{/unless}} +
+
+
+
+