Fix for refactored partials.

This commit is contained in:
Aaron Lutomski
2026-05-30 20:03:04 -07:00
parent 0364501a82
commit f4103500db
3 changed files with 28 additions and 4 deletions
+1 -3
View File
@@ -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`,
],
},
+15 -1
View File
@@ -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: {
+12
View File
@@ -19,10 +19,22 @@
</div>
<div class="profession">
<h2 class="profession">
{{#if (eq actor.type "vehicle") }}
<input name="system.shortDescription"
type="text"
value="{{actor.system.shortDescription}}"
placeholder="{{subnameInfoPlaceholder}}" />
{{else if (eq actor.type "unnatural") }}
<input name="system.shortDescription"
type="text"
value="{{actor.system.shortDescription}}"
placeholder="{{subnameInfoPlaceholder}}" />
{{else}}
<input name="system.biography.profession"
type="text"
value="{{actor.system.biography.profession}}"
placeholder="{{subnameInfoPlaceholder}}" />
{{/if}}
</h2>
</div>
</div>