From 5d4ab6f2adc26e2ef575cdeec60fd2784457b3b1 Mon Sep 17 00:00:00 2001 From: felixlinker Date: Mon, 19 Aug 2019 19:15:47 +0200 Subject: [PATCH] Disabling guardian shield/module/hull reinforcement packages has an effect now Closes #523 --- src/app/shipyard/Calculations.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/shipyard/Calculations.js b/src/app/shipyard/Calculations.js index e0f396c3..83718991 100644 --- a/src/app/shipyard/Calculations.js +++ b/src/app/shipyard/Calculations.js @@ -400,7 +400,7 @@ export function shieldMetrics(ship, sys) { let shieldAddition = 0; if (ship) { for (const module of ship.internal) { - if (module && module.m && module.m.grp === 'gsrp') { + if (module && module.m && module.m.grp === 'gsrp' && module.enabled) { shieldAddition += module.m.getShieldAddition(); } } @@ -574,7 +574,7 @@ export function armourMetrics(ship) { // }; // Armour from HRPs and module armour from MRPs for (let slot of ship.internal) { - if (slot.m && (slot.m.grp === 'hr' || slot.m.grp === 'ghrp' || slot.m.grp == 'mahr')) { + if (slot.m && slot.enabled && (slot.m.grp === 'hr' || slot.m.grp === 'ghrp' || slot.m.grp == 'mahr')) { armourReinforcement += slot.m.getHullReinforcement(); // Hull boost for HRPs is applied against the ship's base armour armourReinforcement += ship.baseArmour * slot.m.getModValue('hullboost') / 10000; @@ -586,7 +586,7 @@ export function armourMetrics(ship) { hullThermDmg = hullThermDmg * (1 - slot.m.getThermalResistance()); hullCausDmg = hullCausDmg * (1 - slot.m.getCausticResistance()); } - if (slot.m && (slot.m.grp == 'mrp' || slot.m.grp == 'gmrp')) { + if (slot.m && slot.enabled && (slot.m.grp == 'mrp' || slot.m.grp == 'gmrp')) { moduleArmour += slot.m.getIntegrity(); moduleProtection = moduleProtection * (1 - slot.m.getProtection()); }