From 3f4c8119adcffa4fbb7620398913985ff499b40f Mon Sep 17 00:00:00 2001 From: supervj <64861570+supervj@users.noreply.github.com> Date: Fri, 4 Jun 2021 17:02:30 -0400 Subject: [PATCH] Fix Upgrade cost and some Starship actor sheet data updated data to be inline with new structure, but not seeing it transfer through. need to figure out why. --- module/actor/entity.js | 2 +- module/config.js | 11 +++++++++++ templates/actors/newActor/starship.html | 14 +++++++------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/module/actor/entity.js b/module/actor/entity.js index 530f1ce6..09d8ab95 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -386,7 +386,7 @@ export default class Actor5e extends Actor { data.attributes.cost.baseBuild = sizeData.buildBaseCost; data.attributes.workforce.minBuild = sizeData.buildMinWorkforce; data.attributes.workforce.max = data.attributes.workforce.minBuild * 5; - data.attributes.cost.baseUpgrade = SW5E.upgradeBaseCost[tiers]; + data.attributes.cost.baseUpgrade = SW5E.baseUpgradeCost[tiers]; data.attributes.cost.multUpgrade = sizeData.upgrdCostMult; data.attributes.workforce.minUpgrade = sizeData.upgrdMinWorkforce; // push to derived since based on attributes diff --git a/module/config.js b/module/config.js index c62ebb6a..5c072bde 100644 --- a/module/config.js +++ b/module/config.js @@ -663,6 +663,17 @@ SW5E.powerDieTypes = [1, "d4", "d6", "d8", "d10", "d12"]; /* -------------------------------------------- */ + +/** + * Enumerate the upgrade costs as they apply to starships in the SW5E system based on Tier. + * @type {Array.} + */ + +SW5E.baseUpgradeCost = [0, 3900, 77500, 297000, 620000, 1150000]; + +/* -------------------------------------------- */ + + /** * Enumerate the base stat and feature settings for starships based on size. * @type {Array.} diff --git a/templates/actors/newActor/starship.html b/templates/actors/newActor/starship.html index 3f64ddf2..c1369cb3 100644 --- a/templates/actors/newActor/starship.html +++ b/templates/actors/newActor/starship.html @@ -89,7 +89,7 @@ - {{!-- NPC Sheet Body --}} + {{!-- Starship Sheet Body --}}
@@ -170,12 +170,12 @@ {{localize "SW5E.DmgRed"}}: @@ -273,7 +273,7 @@ {{localize "SW5E.PowerDieAlloc"}} {{localize "SW5E.PowerDie"}}: +

{{localize "SW5E.StarshipmodPl"}}