From 1a1f66c6d3dc25148a7c495f9a3e2a37d05fa0fa Mon Sep 17 00:00:00 2001 From: jalensailin Date: Wed, 23 Jul 2025 19:14:06 -0400 Subject: [PATCH] set up vehicle sheet: notes tab, only showing HP, no vehicle-sheet.html --- lang/en.json | 1 + module/sheets/vehicle-sheet.js | 8 ++-- templates/actor/partials/notes-partial.html | 6 ++- templates/actor/parts/header.html | 42 +++++++++++---------- templates/actor/parts/notes-tab.html | 6 +++ 5 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 templates/actor/parts/notes-tab.html diff --git a/lang/en.json b/lang/en.json index 620f2bb..8058879 100644 --- a/lang/en.json +++ b/lang/en.json @@ -150,6 +150,7 @@ "DG.Navigation.NPC.skills": "Skills & Training", "DG.Navigation.NPC.gear": "Attacks & Abilities", "DG.Navigation.Vehicle.gear": "Gear", + "DG.Navigation.Vehicle.notes": "Notes", "DG.About.Changelog": "CHANGELOG (ONLINE)", "DG.About.Copyright": "Published by Arc Dream Publishing by arrangement with the Delta Green Partnership. The intellectual property known as Delta Green is a trademark and copyright owned by the Delta Green Partnership, who has licensed its use here.", diff --git a/module/sheets/vehicle-sheet.js b/module/sheets/vehicle-sheet.js index 28fbe66..6f2ae5c 100644 --- a/module/sheets/vehicle-sheet.js +++ b/module/sheets/vehicle-sheet.js @@ -8,6 +8,7 @@ export default class DGVehicleSheet extends DGActorSheet { initial: "gear", labelPrefix: "DG.Navigation.Vehicle", tabs: [ + { id: "notes" }, { id: "gear" }, { id: "about", icon: "fas fa-question-circle", label: "" }, ], @@ -16,10 +17,11 @@ export default class DGVehicleSheet extends DGActorSheet { /** @override */ static PARTS = /** @type {const} */ ({ - main: { - template: `${this.TEMPLATE_PATH}/vehicle-sheet.html`, - }, + header: this.BASE_PARTS.header, tabs: this.BASE_PARTS.tabs, + notes: { + template: `${this.TEMPLATE_PATH}/partials/notes-partial.html`, + }, gear: this.BASE_PARTS.gear, about: this.BASE_PARTS.about, }); diff --git a/templates/actor/partials/notes-partial.html b/templates/actor/partials/notes-partial.html index 9b86908..f7cd892 100644 --- a/templates/actor/partials/notes-partial.html +++ b/templates/actor/partials/notes-partial.html @@ -1,4 +1,8 @@ -
+
{{localize "DG.Sheet.BlockHeaders.PhysicalDescriptionNotes"}}
diff --git a/templates/actor/parts/header.html b/templates/actor/parts/header.html index d9bd858..1adbb5f 100644 --- a/templates/actor/parts/header.html +++ b/templates/actor/parts/header.html @@ -49,28 +49,30 @@ - {{!-- WP --}} -
- -
- - / -
-
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
+ {{#if (ne actor.type "vehicle") }} + {{!-- WP --}} +
+ +
+ + / +
+
{{numberFormat actor.system.wp.max decimals=0 sign=false}}
+
-
- {{!-- Sanity --}} - {{> "systems/deltagreen/templates/actor/partials/sanity-partial.html" }} + {{!-- Sanity --}} + {{> "systems/deltagreen/templates/actor/partials/sanity-partial.html" }} + {{/if}}
diff --git a/templates/actor/parts/notes-tab.html b/templates/actor/parts/notes-tab.html new file mode 100644 index 0000000..7a7a299 --- /dev/null +++ b/templates/actor/parts/notes-tab.html @@ -0,0 +1,6 @@ +
+ {{!-- This document is a wrapper around the notes partial. --}} + {{> "systems/deltagreen/templates/actor/partials/notes-partial.html" }} +