diff --git a/module/sheets/base-actor-sheet.js b/module/sheets/base-actor-sheet.js index fff05d7..f42fbee 100644 --- a/module/sheets/base-actor-sheet.js +++ b/module/sheets/base-actor-sheet.js @@ -49,7 +49,9 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) { this.actor, ); + // Early return if this is a vehicle. if (this.actor.type === "vehicle") return context; + // Make it easy for the sheet handlebars to understand how to sort the skills. context.sortSkillsSetting = game.settings.get("deltagreen", "sortSkills"); @@ -173,6 +175,12 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) { this.actor.system.sortedCustomSkills = sortedCustomSkills; } + // Set sanity block per actor type. + context.sanityInputs = await foundry.applications.handlebars.renderTemplate( + `${DGActorSheet.TEMPLATE_PATH}/partials/sanity-${this.actor.type}.html`, + context, + ); + // Set title for Physical Attributes. context.physicalAttributesTitle = game.i18n.localize( "DG.Sheet.BlockHeaders.Attributes", diff --git a/module/templates.js b/module/templates.js index a8957d5..d83d158 100644 --- a/module/templates.js +++ b/module/templates.js @@ -11,6 +11,7 @@ export default async function preloadHandlebarsTemplates() { "systems/deltagreen/templates/actor/npc-limited-sheet.html", "systems/deltagreen/templates/dialog/modify-percentile-roll.html", "systems/deltagreen/templates/actor/vehicle-sheet.html", + "systems/deltagreen/templates/actor/partials/sanity-partial.html", "systems/deltagreen/templates/actor/partials/custom-skills-partial.html", "systems/deltagreen/templates/actor/partials/cv-partial.html", "systems/deltagreen/templates/actor/partials/help-and-licensing-partial.html", diff --git a/templates/actor/partials/sanity-agent.html b/templates/actor/partials/sanity-agent.html new file mode 100644 index 0000000..ff9d9db --- /dev/null +++ b/templates/actor/partials/sanity-agent.html @@ -0,0 +1,13 @@ + +/ +