added armor pack, updated skills pack, initial work on ship sheet, minor fixes, added options for spell cost to be drawn on roll

This commit is contained in:
2020-12-04 03:45:09 +01:00
parent 4cb6c390a4
commit c6cc01bb25
19 changed files with 354 additions and 80 deletions

View File

@@ -94,6 +94,38 @@ export class ItemSheetKH extends ItemSheet {
skillList.push(item)
}
}
this.position.width = 450;
this.position.height = 605;
break;
case "shipweapon":
// Load Skills Compendium skills
let skillList4
if(game.settings.get("kopparhavet", "gameSystem") === "hjaltarnas-tid") {
skillList4 = await game.packs.get("kopparhavet.skills-ht").getContent();
} else {
skillList4 = await game.packs.get("kopparhavet.skills").getContent();
}
for (let item of skillList4) {
if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item)
}
}
// Retrieve any created skills as well
for (let item of game.items.entities) {
if(item.data.type === "skill" && item.data.data.type.value === "combat") {
skillList.push(item)
}
}
this.position.width = 530;
this.position.height = 750;
break;
case "shiptalent":
this.position.width = 405;
this.position.height = 570;
break;
default:
this.position.width = 450;
this.position.height = 605;

View File

@@ -21,6 +21,8 @@ export class ItemKH extends Item {
itemData.isSpell = itemData.type === "spell";
itemData.isTalent = itemData.type === "talent";
itemData.isWeapon = itemData.type === "weapon";
itemData.isShipWeapon = itemData.type === "shipweapon";
itemData.isShipTalent = itemData.type === "shiptalent";
const html = await renderTemplate("systems/kopparhavet/templates/chat/item-card.html", itemData);
@@ -56,6 +58,8 @@ export class ItemKH extends Item {
itemData.isSpell = itemData.type === "spell";
itemData.isTalent = itemData.type === "talent";
itemData.isWeapon = itemData.type === "weapon";
itemData.isShipWeapon = itemData.type === "shipweapon";
itemData.isShipTalent = itemData.type === "shiptalent";
return itemData
}