From d0eae6424147ac3af940976b9770b675bdbfc1d4 Mon Sep 17 00:00:00 2001 From: supervj <64861570+supervj@users.noreply.github.com> Date: Sun, 2 May 2021 00:53:46 -0400 Subject: [PATCH] Created Starship size as "class" This will be used to automatically upgrade Tier and Dice. Need to build in logic still --- module/templates.js | 4 +- sw5e.js | 2 +- template.json | 19 ++++++ templates/items/starship.html | 122 ++++++++++++++++++++++++++++++++++ 4 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 templates/items/starship.html diff --git a/module/templates.js b/module/templates.js index bd98cf47..a27bdf71 100644 --- a/module/templates.js +++ b/module/templates.js @@ -14,12 +14,12 @@ export const preloadHandlebarsTemplates = async function() { "systems/sw5e/templates/actors/oldActor/parts/actor-inventory.html", "systems/sw5e/templates/actors/oldActor/parts/actor-features.html", "systems/sw5e/templates/actors/oldActor/parts/actor-powerbook.html", - "systems/sw5e/templates/actors/oldActor/parts/actor-notes.html", + "systems/sw5e/templates/actors/oldActor/parts/actor-notes.html", "systems/sw5e/templates/actors/newActor/parts/swalt-biography.html", "systems/sw5e/templates/actors/newActor/parts/swalt-core.html", "systems/sw5e/templates/actors/newActor/parts/swalt-crew.html", - "systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html", + "systems/sw5e/templates/actors/newActor/parts/swalt-active-effects.html", "systems/sw5e/templates/actors/newActor/parts/swalt-features.html", "systems/sw5e/templates/actors/newActor/parts/swalt-inventory.html", "systems/sw5e/templates/actors/newActor/parts/swalt-force-powerbook.html", diff --git a/sw5e.js b/sw5e.js index 17c4e249..e412f4f3 100644 --- a/sw5e.js +++ b/sw5e.js @@ -136,7 +136,7 @@ Hooks.once("init", function() { }); Items.unregisterSheet("core", ItemSheet); Items.registerSheet("sw5e", ItemSheet5e, { - types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starshipfeature', 'starshipmod', 'venture'], + types: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'class', 'power', 'feat', 'species', 'backpack', 'archetype', 'classfeature', 'background', 'fightingmastery', 'fightingstyle', 'lightsaberform', 'deployment', 'deploymentfeature', 'starship', 'starshipfeature', 'starshipmod', 'venture'], makeDefault: true, label: "SW5E.SheetClassItem" }); diff --git a/template.json b/template.json index 04b56318..1e4066f5 100644 --- a/template.json +++ b/template.json @@ -624,6 +624,7 @@ "loot", "power", "species", + "starship", "starshipfeature", "starshipmod", "tool", @@ -815,6 +816,11 @@ "conditions": "" } }, + "starshipDescription": { + "description": { + "value": "" + } + }, "starshipEquipment": { "capx": { "value": null @@ -993,6 +999,19 @@ "formula": null } }, + "starship": { + "templates": ["starshipDescription"], + "size": "", + "tier": 0, + "hullDice": "d6", + "hullDiceStart": 1, + "hullDiceUsed": 0, + "shldDice": "d6", + "shldDiceStart": 1, + "shldDiceUsed": 0, + "pwrDice": "1", + "source": "SotG" + }, "starshipfeature": { "templates": ["itemDescription", "activatedEffect", "action"], "size": "med", diff --git a/templates/items/starship.html b/templates/items/starship.html new file mode 100644 index 00000000..1ced5c4c --- /dev/null +++ b/templates/items/starship.html @@ -0,0 +1,122 @@ +