From 3df3567728c5fe99042ee6b778445c8a293eb06c Mon Sep 17 00:00:00 2001 From: jalensailin Date: Tue, 24 Jun 2025 19:55:50 -0400 Subject: [PATCH] =?UTF-8?q?add=20gear=20tab=20=20(ne=C3=A9=20equipment-par?= =?UTF-8?q?tial)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor/actor-sheet.js | 3 + module/templates.js | 1 - .../actor/partials/equipment-partial.html | 316 -------------- templates/actor/parts/gear-tab.html | 386 ++++++++++++++++++ 4 files changed, 389 insertions(+), 317 deletions(-) delete mode 100644 templates/actor/partials/equipment-partial.html create mode 100644 templates/actor/parts/gear-tab.html diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 08a0641..7508727 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -55,6 +55,9 @@ export default class DeltaGreenActorSheet extends DGSheetMixin(ActorSheetV2) { motivations: { template: `${this.TEMPLATE_PATH}/actor/parts/motivations-tab.html`, }, + gear: { + template: `${this.TEMPLATE_PATH}/actor/parts/gear-tab.html`, + }, }); /* -------------------------------------------- */ diff --git a/module/templates.js b/module/templates.js index b69083d..176e85f 100644 --- a/module/templates.js +++ b/module/templates.js @@ -13,7 +13,6 @@ export default async function preloadHandlebarsTemplates() { "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", - "systems/deltagreen/templates/actor/partials/equipment-partial.html", "systems/deltagreen/templates/actor/partials/attributes-grid-partial.html", ]); } diff --git a/templates/actor/partials/equipment-partial.html b/templates/actor/partials/equipment-partial.html deleted file mode 100644 index 6045445..0000000 --- a/templates/actor/partials/equipment-partial.html +++ /dev/null @@ -1,316 +0,0 @@ -{{!-- EQUIPMENT/ATTACKS/ABILITES SECTION USED ON ALL ACTOR SHEETS --}} -{{!-- WEAPONS/ATTACKS --}} -
- -
- {{localize 'DG.Gear.Weapons'}} -
- -
    - -
  1. -
    - {{#if actor.system.settings.sorting.weaponSortAlphabetical}} - - {{else}} - - {{/if}} -
    - - - {{localize 'DG.Gear.Name'}} - - - {{localize 'DG.Gear.DamageOrLethality'}} - {{localize 'DG.Gear.ArmorPiercing'}} - -
  2. - - {{#each actor.weapons as |item id|}} - -
  3. - -
    - - - - - -

    - {{item.name}} -

    - - - - - -
    - -
    - - - - {{#if item.system.lethality}} - {{#if item.system.isLethal}} - - {{else}} - - {{/if}} - {{/if}} - - {{#unless item.system.isLethal}} - - {{toUpperCase item.system.damage}}{{#if_eq item.system.skill 'unarmed_combat'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.system.skill 'melee_weapons'}}{{actor.system.statistics.str.meleeDamageBonusFormula}}{{/if_eq}} - - - {{/unless}} - - {{#if item.system.isLethal}} - - {{item.system.lethality}}% - - - {{/if}} - - - - {{item.system.armorPiercing}} - -
    - - -
    - -
  4. - - {{/each}} - -
- -
- -{{!-- ARMOR/DEFENSE --}} -
- -
- {{localize 'DG.Gear.Armor'}} -
- -
    - -
  1. - -
    - {{#if actor.system.settings.sorting.armorSortAlphabetical}} - - {{else}} - - {{/if}} -
    -
    {{localize 'DG.Gear.Name'}}
    - {{localize 'DG.Gear.ArmorRating'}} - {{localize 'DG.Gear.Equipped'}} - - -
  2. - - {{#each actor.armor as |item id|}} - -
  3. - -
    - -

    {{item.name}}

    - - {{item.system.protection}} - - - {{#if item.system.equipped}} - - {{else}} - - {{/if}} - - -
    - - -
    - -
  4. - - {{/each}} - -
-
- -{{!-- OTHER GEAR/MISC --}} - -
- -
- {{localize 'DG.Gear.OtherGear'}} -
- -
    - -
  1. - -
    - {{#if actor.system.settings.sorting.gearSortAlphabetical}} - - {{else}} - - {{/if}} -
    - -
    {{localize 'DG.Gear.Name'}}
    - - {{localize 'DG.Gear.Equipped'}} - - - -
  2. - - {{#each actor.gear as |item id|}} - -
  3. - -
    - -

    {{item.name}}

    - - - - {{#if item.system.equipped}} - - {{else}} - - {{/if}} - - - -
    - - -
    - -
  4. - - {{/each}} - -
- -
- -{{#if showHyperGeometrySection}} - -{{!-- TOMES --}} - -
- -
- {{localize 'DG.Gear.Tomes'}} -
- -
    - -
  1. - -
    - {{#if actor.system.settings.sorting.tomeSortAlphabetical}} - - {{else}} - - {{/if}} -
    - -
    {{localize 'DG.Tomes.Name'}}
    - - - -
  2. - - {{#each actor.tomes as |item id|}} - -
  3. - -
    - -

    {{#if item.system.revealed}}{{item.name}}{{else}}???{{#if (playerHasGamemasterPrivileges)}} ({{item.name}}){{/if}}{{/if}}

    - -
    - - -
    - -
  4. - - {{/each}} - -
- -
- -{{!-- RITUALS --}} - -
- -
- {{localize 'DG.Gear.Rituals'}} -
- -
    - -
  1. - -
    - {{#if actor.system.settings.sorting.ritualSortAlphabetical}} - - {{else}} - - {{/if}} -
    - -
    {{localize 'DG.Ritual.Name'}}
    - - - -
  2. - - {{#each actor.rituals as |item id|}} - -
  3. - -
    - -

    {{#if item.system.revealed}}{{item.name}}{{else}}???{{#if (playerHasGamemasterPrivileges)}} ({{item.name}}){{/if}}{{/if}}

    - -
    - - -
    - -
  4. - - {{/each}} - -
- -
- -{{/if}} \ No newline at end of file diff --git a/templates/actor/parts/gear-tab.html b/templates/actor/parts/gear-tab.html new file mode 100644 index 0000000..871685d --- /dev/null +++ b/templates/actor/parts/gear-tab.html @@ -0,0 +1,386 @@ +{{!-- EQUIPMENT/ATTACKS/ABILITES SECTION USED ON ALL ACTOR SHEETS --}} +{{!-- WEAPONS/ATTACKS --}} +
+ +
+
+ {{localize 'DG.Gear.Weapons'}} +
+ +
    +
  1. +
    + {{#if actor.system.settings.sorting.weaponSortAlphabetical }} + + {{else}} + + {{/if}} +
    + + + {{localize 'DG.Gear.Name'}} + + + {{localize 'DG.Gear.DamageOrLethality'}} + {{localize 'DG.Gear.ArmorPiercing'}} + +
  2. + + {{#each actor.weapons as |item id| }} +
  3. +
    + + +

    {{item.name}}

    + + + +
    +
    + + + {{#if item.system.lethality }} + {{#if item.system.isLethal }} + + + + {{else}} + + + + {{/if}} + {{/if}} + + {{#unless item.system.isLethal}} + + {{toUpperCase item.system.damage}} + {{#if_eq item.system.skill 'unarmed_combat' }} + {{actor.system.statistics.str.meleeDamageBonusFormula}} + {{/if_eq}} + {{#if_eq item.system.skill 'melee_weapons' }} + {{actor.system.statistics.str.meleeDamageBonusFormula}} + {{/if_eq}} + + + {{/unless}} + + {{#if item.system.isLethal }} + + {{item.system.lethality}}% + + + {{/if}} + + + + {{item.system.armorPiercing}} + + +
  4. + {{/each}} +
+
+ + {{!-- ARMOR/DEFENSE --}} +
+
+ {{localize 'DG.Gear.Armor'}} +
+
    +
  1. + +
    + {{#if actor.system.settings.sorting.armorSortAlphabetical }} + + + + {{else}} + + + + {{/if}} +
    +
    + {{localize 'DG.Gear.Name'}} +
    + {{localize 'DG.Gear.ArmorRating'}} + {{localize 'DG.Gear.Equipped'}} + + +
  2. + + {{#each actor.armor as |item id| }} + +
  3. + +
    + +
    + +

    {{item.name}}

    + + {{item.system.protection}} + + + {{#if item.system.equipped }} + + {{else}} + + {{/if}} + + + +
  4. + {{/each}} +
+
+ + {{!-- OTHER GEAR/MISC --}} + +
+
+ {{localize 'DG.Gear.OtherGear'}} +
+ +
    +
  1. +
    + {{#if actor.system.settings.sorting.gearSortAlphabetical }} + + {{else}} + + {{/if}} +
    + +
    {{localize 'DG.Gear.Name'}}
    + + {{localize 'DG.Gear.Equipped'}} + + +
  2. + + {{#each actor.gear as |item id| }} +
  3. +
    + +
    + +

    {{item.name}}

    + + + {{#if item.system.equipped }} + + {{else}} + + {{/if}} + + +
    + + +
    +
  4. + {{/each}} +
+
+ + {{#if showHyperGeometrySection }} + {{!-- TOMES --}} +
+ +
+ {{localize 'DG.Gear.Tomes'}} +
+ +
    + +
  1. + +
    + {{#if actor.system.settings.sorting.tomeSortAlphabetical }} + + + + + {{else}} + + + + + {{/if}} +
    + +
    {{localize 'DG.Tomes.Name'}}
    + + + +
  2. + + {{#each actor.tomes as |item id| }} + +
  3. + +
    + +
    + +

    + {{#if item.system.revealed }} + {{item.name}} + {{else}} + ??? + {{#if (playerHasGamemasterPrivileges) }} + ({{item.name}}) + {{/if}} + {{/if}} +

    + +
    + + +
    + +
  4. + + {{/each}} + +
+ +
+ + {{!-- RITUALS --}} +
+ +
+ {{localize 'DG.Gear.Rituals'}} +
+ +
    + +
  1. + +
    + {{#if actor.system.settings.sorting.ritualSortAlphabetical }} + + + + {{else}} + + + + {{/if}} +
    + +
    {{localize 'DG.Ritual.Name'}}
    + + + +
  2. + + {{#each actor.rituals as |item id| }} + +
  3. + +
    + +
    + +

    + {{#if item.system.revealed }} + {{item.name}} + {{else}} + ??? + {{#if (playerHasGamemasterPrivileges) }} + ({{item.name}}) + {{/if}} + {{/if}} +

    + +
    + + +
    + +
  4. + + {{/each}} + +
+ +
+ {{/if}} +