diff --git a/module/sheets/agent-sheet.js b/module/sheets/agent-sheet.js index ba9ccc8..80d0142 100644 --- a/module/sheets/agent-sheet.js +++ b/module/sheets/agent-sheet.js @@ -111,10 +111,8 @@ export default class DGAgentSheet extends AgentSheetBase { `${this.TEMPLATE_PATH}/partials/agent-special-training-row-partial.html`, `${this.TEMPLATE_PATH}/partials/custom-skills-partial-agent.html`, `${this.TEMPLATE_PATH}/partials/bonds-section-partial.html`, - `${this.TEMPLATE_PATH}/partials/weapons-section-partial.html`, - `${this.TEMPLATE_PATH}/partials/armor-section-partial.html`, + ...this.GEAR_SECTION_PARTIALS, `${this.TEMPLATE_PATH}/partials/injuries-section-partial.html`, - `${this.TEMPLATE_PATH}/partials/other-gear-section-partial.html`, `${this.TEMPLATE_PATH}/partials/notes-partial.html`, ], }, diff --git a/module/sheets/base-actor-sheet.js b/module/sheets/base-actor-sheet.js index a9d80fb..f895f58 100644 --- a/module/sheets/base-actor-sheet.js +++ b/module/sheets/base-actor-sheet.js @@ -39,7 +39,20 @@ export default class DGActorSheet extends ComposedActorSheetBase { /** @override - Singular reference to the actor templates path */ static TEMPLATE_PATH = /** @type {const} */ (`${super.TEMPLATE_PATH}/actor`); - /** Holds base/shared parts of sheets for subclasses to reference. */ + /** Gear tab section partials shared by NPC/unnatural/vehicle gear tabs and agent combat tab. */ + static get GEAR_SECTION_PARTIALS() { + return [ + `${this.TEMPLATE_PATH}/partials/weapons-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/armor-section-partial.html`, + `${this.TEMPLATE_PATH}/partials/other-gear-section-partial.html`, + ]; + } + + /** + * Base/shared sheet parts for subclasses. + * ApplicationV2: every template referenced via {@code {{> "path"}}} in a PART's render + * tree must be listed in that PART's {@code templates} array. + */ static BASE_PARTS = /** @type {const} */ ({ header: { template: `${this.TEMPLATE_PATH}/parts/header.html`, @@ -62,6 +75,7 @@ export default class DGActorSheet extends ComposedActorSheetBase { }, gear: { template: `${this.TEMPLATE_PATH}/parts/gear-tab.html`, + templates: this.GEAR_SECTION_PARTIALS, scrollable: [""], }, about: { diff --git a/templates/actor/parts/header.html b/templates/actor/parts/header.html index 8606def..4c0c773 100644 --- a/templates/actor/parts/header.html +++ b/templates/actor/parts/header.html @@ -19,10 +19,22 @@

+ {{#if (eq actor.type "vehicle") }} + + {{else if (eq actor.type "unnatural") }} + + {{else}} + {{/if}}