diff --git a/css/deltagreen.css b/css/deltagreen.css
index 9aed516..09cf6e2 100644
--- a/css/deltagreen.css
+++ b/css/deltagreen.css
@@ -1133,3 +1133,16 @@ input.item-sheet-short-input {
min-height: 300px;
resize: none;
}
+
+.weapon-name-flexcontainer {
+ display: flex;
+ justify-content: flex-start;
+ flex-direction: row;
+ column-gap: 10px;
+}
+
+.weapon-name-flexitem {
+ flex: content;
+ align-self: flex-start;
+ text-align: left;
+}
diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js
index 96c14a2..146e247 100644
--- a/module/actor/actor-sheet.js
+++ b/module/actor/actor-sheet.js
@@ -15,7 +15,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["deltagreen", "sheet", "actor"],
template: "systems/deltagreen/templates/actor/actor-sheet.html",
- width: 700,
+ width: 750,
height: 770,
tabs: [
{
@@ -61,9 +61,9 @@ export default class DeltaGreenActorSheet extends ActorSheet {
const data = super.getData();
// Prepare items.
- if (this.actor.type === "agent") {
- this._prepareCharacterItems(data);
- }
+ //if (this.actor.type === "agent") {
+ this._prepareCharacterItems(data);
+ //}
// Make it easy for the sheet handlebars to understand how to sort the skills.
data.sortSkillsSetting = game.settings.get("deltagreen", "sortSkills");
@@ -146,6 +146,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
// Initialize containers.
const armor = [];
const weapons = [];
+ const gear = [];
// Iterate through items, allocating to containers
// let totalWeight = 0;
@@ -157,12 +158,27 @@ export default class DeltaGreenActorSheet extends ActorSheet {
// Append to weapons.
else if (i.type === "weapon") {
weapons.push(i);
+ } else if (i.type === "gear") {
+ gear.push(i);
}
}
+ armor.sort(function (a, b) {
+ return a.sort - b.sort;
+ });
+
+ weapons.sort(function (a, b) {
+ return a.sort - b.sort;
+ });
+
+ gear.sort(function (a, b) {
+ return a.sort - b.sort;
+ });
+
// Assign and return
actorData.armor = armor;
actorData.weapons = weapons;
+ actorData.gear = gear;
}
// Can add extra buttons to form header here if necessary
diff --git a/module/templates.js b/module/templates.js
index feb7415..bf9efc8 100644
--- a/module/templates.js
+++ b/module/templates.js
@@ -14,5 +14,6 @@ export default async function preloadHandlebarsTemplates() {
"systems/deltagreen/templates/dialog/modify-percentile-roll.html",
"systems/deltagreen/templates/actor/vehicle-sheet.html",
"systems/deltagreen/templates/actor/help-and-licensing-partial.html",
+ "systems/deltagreen/templates/actor/equipment-partial.html",
]);
}
diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html
index c482281..21f8734 100644
--- a/templates/actor/actor-sheet.html
+++ b/templates/actor/actor-sheet.html
@@ -104,15 +104,18 @@
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
>
{{localizeWithFallback (concat "DG.Skills." key) skill.label }}
+
{{#if_eq key 'ritual' }}
+
{{#if (keepSanityPrivate)}}
{{/if}}
+
{{#unless (keepSanityPrivate)}}
{{/if_not_eq}}
+
{{/each}}
@@ -148,7 +153,7 @@
- {{localize (concat 'DG.Attributes.' key)}}
+ {{localize (concat 'DG.Attributes.' key)}}
({{numberFormat statistic.x5 decimals=0 sign=false}}%)
@@ -283,167 +288,7 @@
{{!-- GEAR Tab --}}
-
-
-
- {{localize 'DG.Gear.Weapons'}}
-
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'weapon'}}
-
-
-
-
-
- {{item.name}}
-
-
-
-
- {{#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}}
-
- {{#if item.system.lethality}}
- -
- {{#if item.system.isLethal}}
-
- {{else}}
-
- {{/if}}
- {{/if}}
-
-
- {{item.system.armorPiercing}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
- {{localize 'DG.Gear.Armor'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'armor'}}
-
-
-
- {{item.name}}
- {{item.system.protection}}
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
-
- {{localize 'DG.Gear.OtherGear'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
-
- {{#if_eq item.type 'gear'}}
-
-
-
- {{item.name}}
-
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
+ {{> "systems/deltagreen/templates/actor/equipment-partial.html" }}
{{!-- PERSONAL (Biography) Tab --}}
diff --git a/templates/actor/custom-skills-partial.html b/templates/actor/custom-skills-partial.html
index f51eb43..10fbb52 100644
--- a/templates/actor/custom-skills-partial.html
+++ b/templates/actor/custom-skills-partial.html
@@ -6,6 +6,7 @@
{{/if_eq}}
+
{{#each actor.system.typedSkills as |skill key|}}
{{/each}}
+
{{#each specialTraining as |training|}}
{{training.name}} ({{training.attribute}}, {{training.targetNumber}}%)
+
{{/each}}
+
\ No newline at end of file
diff --git a/templates/actor/equipment-partial.html b/templates/actor/equipment-partial.html
new file mode 100644
index 0000000..9d8b137
--- /dev/null
+++ b/templates/actor/equipment-partial.html
@@ -0,0 +1,192 @@
+
+{{!-- WEAPONS/ATTACKS --}}
+
+
+
+ {{localize 'DG.Gear.Weapons'}}
+
+
+
+
+
+
+ {{#each actor.weapons as |item id|}}
+
+
+
+
+
+
+
+
+
+
+ {{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}}
+
+
+
+
+
+ {{/each}}
+
+
+
+
+
+{{!-- ARMOR/DEFENSE --}}
+
+
+
+ {{localize 'DG.Gear.Armor'}}
+
+
+
+
+
+
+ {{#each actor.armor as |item id|}}
+
+
+
+
+
+ {{item.name}}
+
+ {{item.system.protection}}
+
+
+ {{#if item.system.equipped}}
+
+ {{else}}
+
+ {{/if}}
+
+
+
+
+
+
+ {{/each}}
+
+
+
+
+{{!-- OTHER GEAR/MISC --}}
+
+
+
+
+ {{localize 'DG.Gear.OtherGear'}}
+
+
+
+
+
+
+ {{#each actor.gear as |item id|}}
+
+
+
+
+
+ {{item.name}}
+
+
+
+ {{#if item.system.equipped}}
+
+ {{else}}
+
+ {{/if}}
+
+
+
+
+
+
+
+ {{/each}}
+
+
+
+
\ No newline at end of file
diff --git a/templates/actor/npc-sheet.html b/templates/actor/npc-sheet.html
index f0d1bd1..0a65a48 100644
--- a/templates/actor/npc-sheet.html
+++ b/templates/actor/npc-sheet.html
@@ -144,169 +144,7 @@
{{!-- GEAR --}}
-
-
-
- {{localize 'DG.Gear.Weapons'}}
-
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'weapon'}}
-
-
-
-
-
- {{item.name}}
-
-
-
- {{#unless item.system.isLethal}}
-
- {{toUpperCase item.system.damage}}
-
- {{/unless}}
-
- {{#if item.system.isLethal}}
- {{formatLethality item.system.lethality}}
- {{/if}}
-
- {{#if item.system.lethality}}
- -
- {{#if item.system.isLethal}}
-
- {{else}}
-
- {{/if}}
- {{/if}}
-
-
-
- {{item.system.armorPiercing}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
- {{localize 'DG.Gear.Armor'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'armor'}}
-
-
-
- {{item.name}}
- {{item.system.protection}}
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
-
- {{localize 'DG.Gear.OtherGear'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'gear'}}
-
-
-
-
- {{item.name}}
-
-
-
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
+ {{> "systems/deltagreen/templates/actor/equipment-partial.html" }}
{{!-- About Tab --}}
diff --git a/templates/actor/unnatural-sheet.html b/templates/actor/unnatural-sheet.html
index b218063..c13ef57 100644
--- a/templates/actor/unnatural-sheet.html
+++ b/templates/actor/unnatural-sheet.html
@@ -137,168 +137,7 @@
{{!-- GEAR --}}
-
-
-
- {{localize 'DG.Gear.Weapons'}}
-
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'weapon'}}
-
-
-
-
-
- {{item.name}}
-
-
-
- {{#unless item.system.isLethal}}
-
- {{toUpperCase item.system.damage}}
-
- {{/unless}}
-
- {{#if item.system.isLethal}}
- {{formatLethality item.system.lethality}}
- {{/if}}
-
- {{#if item.system.lethality}}
- -
- {{#if item.system.isLethal}}
-
- {{else}}
-
- {{/if}}
- {{/if}}
-
-
- {{item.system.armorPiercing}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
- {{localize 'DG.Gear.Armor'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'armor'}}
-
-
-
- {{item.name}}
- {{item.system.protection}}
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
-
-
-
- {{localize 'DG.Gear.OtherGear'}}
-
-
-
-
-
- {{#each actor.items as |item id|}}
- {{#if_eq item.type 'gear'}}
-
-
-
-
- {{item.name}}
-
-
-
-
-
- {{#if item.system.equipped}}
-
- {{else}}
-
- {{/if}}
-
-
-
-
-
-
- {{/if_eq}}
- {{/each}}
-
-
-
+ {{> "systems/deltagreen/templates/actor/equipment-partial.html" }}
{{!-- About Tab --}}