diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index ae8fdab..39e6f10 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -33,25 +33,19 @@ export default class DeltaGreenActorSheet extends foundry.appv1.sheets /** @override */ get template() { if (this.actor !== null) { - if (this.actor.type === "agent") { - if (!game.user.isGM && this.actor.limited) { - return "systems/deltagreen/templates/actor/limited-sheet.html"; - } - - // return `systems/deltagreen/templates/actor/${this.actor.data.type}-sheet.html`; - return `systems/deltagreen/templates/actor/actor-sheet.html`; + const actorIsLimited = !game.user.isGM && this.actor.limited; + switch (this.actor.type) { + case "agent": + return actorIsLimited ? "systems/deltagreen/templates/actor/limited-sheet.html" : "systems/deltagreen/templates/actor/actor-sheet.html"; + case "unnatural": + return `systems/deltagreen/templates/actor/unnatural-sheet.html`; // No limited sheet + case "npc": + return actorIsLimited ? "systems/deltagreen/templates/actor/npc-limited-sheet.html" : "systems/deltagreen/templates/actor/npc-sheet.html"; + case "vehicle": + return `systems/deltagreen/templates/actor/vehicle-sheet.html`; // No limited sheet + default: + return "systems/deltagreen/templates/actor/actor-sheet.html"; // No limited sheet } - if (this.actor.type === "unnatural") { - return `systems/deltagreen/templates/actor/unnatural-sheet.html`; - } - if (this.actor.type === "npc") { - return `systems/deltagreen/templates/actor/npc-sheet.html`; - } - if (this.actor.type === "vehicle") { - return `systems/deltagreen/templates/actor/vehicle-sheet.html`; - } - - return "systems/deltagreen/templates/actor/limited-sheet.html"; } return "systems/deltagreen/templates/actor/limited-sheet.html"; diff --git a/module/templates.js b/module/templates.js index 2e602fa..7d4fe12 100644 --- a/module/templates.js +++ b/module/templates.js @@ -9,6 +9,7 @@ export default async function preloadHandlebarsTemplates() { "systems/deltagreen/templates/actor/limited-sheet.html", "systems/deltagreen/templates/actor/unnatural-sheet.html", "systems/deltagreen/templates/actor/npc-sheet.html", + "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/custom-skills-partial.html", diff --git a/templates/actor/npc-limited-sheet.html b/templates/actor/npc-limited-sheet.html new file mode 100644 index 0000000..fc36c39 --- /dev/null +++ b/templates/actor/npc-limited-sheet.html @@ -0,0 +1,35 @@ +
+ + {{!-- Sheet Header --}} +
+ +
+ + {{!-- Name, Profession, Portrait --}} +
+ +
+
+

+
+
+

+
+
+
+
+ + {{!-- Sheet Tab Navigation --}} + + + {{!-- Sheet Body --}} +
+ {{!-- Biography Tab --}} +
+ {{> "systems/deltagreen/templates/actor/partials/cv-partial.html" }} +
+
+
+