Added weapons packs, ship sheet

This commit is contained in:
2020-12-04 20:34:13 +01:00
parent c6cc01bb25
commit 1a24e7facf
12 changed files with 214 additions and 24 deletions

View File

@@ -72,6 +72,8 @@ export class ActorSheetKH extends ActorSheet {
const gear = [];
const spells = [];
const attacks = [];
const shipweapons = [];
const shiptalents = [];
// Iterate through items, allocating to containers
for (let i of sheetData.items) {
@@ -96,6 +98,10 @@ export class ActorSheetKH extends ActorSheet {
spells.push(i);
} else if (i.type === "adversaryAttack") {
attacks.push(i);
} else if (i.type === "shiptalent") {
shiptalents.push(i);
} else if (i.type === "shipweapon") {
shipweapons.push(i);
}
}
@@ -109,8 +115,11 @@ export class ActorSheetKH extends ActorSheet {
actorData.gear = gear;
actorData.spells = spells;
actorData.attacks = attacks;
actorData.shiptalents = shiptalents;
actorData.shipweapons = shipweapons;
}
/* -------------------------------------------- */
/** @override */

View File

@@ -108,6 +108,8 @@ function preloadHandlebarsTemplates() {
"systems/kopparhavet/templates/parts/actor/skills.html",
"systems/kopparhavet/templates/parts/actor/talent.html",
"systems/kopparhavet/templates/parts/shared/modifications.html",
"systems/kopparhavet/templates/parts/actor/ship-main.html",
"systems/kopparhavet/templates/parts/actor/ship-combat.html",
];
return loadTemplates(templatePaths);
}
@@ -134,6 +136,8 @@ function preloadHandlebarsTemplatesHT() {
"systems/kopparhavet/templates/parts/actor/ht-skills.html",
"systems/kopparhavet/templates/parts/actor/talent.html",
"systems/kopparhavet/templates/parts/shared/modifications.html",
"systems/kopparhavet/templates/parts/actor/ship-main.html",
"systems/kopparhavet/templates/parts/actor/ship-combat.html",
];
return loadTemplates(templatePaths);
}