From 2c015d8f8f5bf8621bbd98426ad880b73cc64a14 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Fri, 7 Oct 2022 16:51:03 +0200 Subject: [PATCH] Managev9/v10 + search button --- modules/pegasus-actor.js | 9 ++++++++- templates/vehicle-sheet.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index 2b22b16..8c01d7a 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -15,7 +15,7 @@ const __statBuild = [ //{ modules: ["vehiclehull"], field: "pc", itemfield: "vms", subfield: "avgnrg" }, //{ modules: ["powercoremodule"], field: "pc", itemfield: "nrg", subfield: "avgnrg" }, { modules: ["vehiclehull", "mobilitymodule"], itemfield: "man", field: "man", additionnal1: "turningarc45" }, - { modules: ["powercoremodule"], field: "pc", itemfield: "pc", additionnal1: "curnrg", additionnal2: "maxnrg" }, + { modules: ["powercoremodule"], field: "pc", itemfield: "pc" }, { modules: ["mobilitymodule"], field: "mr", itemfield: "mr" }, { modules: ["propulsionmodule"], field: "ad", itemfield: "ad" }, { modules: ["combatmodule"], field: "fc", itemfield: "fc" }, @@ -2369,6 +2369,13 @@ export class PegasusActor extends Actor { return false } } + // NRG max management + if (item.type == "powercoremodule" ) { + if (this.system.statistics.pc.maxnrg != item.system.nrg ) { + this.update( {'system.statistics.pc.maxnrg': item.system.nrg }) + } + } + // Cargo management if (__isVehicleCargo[item.type]) { let capacity = this.getCurrentCargoCapacity() diff --git a/templates/vehicle-sheet.html b/templates/vehicle-sheet.html index 7b8b01f..6bc9d7f 100644 --- a/templates/vehicle-sheet.html +++ b/templates/vehicle-sheet.html @@ -540,7 +540,7 @@ {{weapon.system.location}} {{weapon.system.dmg}} {{weapon.system.aoe}} - {{weapon.system.turrent}} + {{weapon.system.turret}} {{weapon.system.nrg}}