From 96e09ab36ccac54291f492c2fcd85cc64e50f1f2 Mon Sep 17 00:00:00 2001 From: Felix Linker Date: Sun, 19 Aug 2018 15:41:27 +0200 Subject: [PATCH] Ship summary correctly calculates shield recovery/recharge time --- src/app/components/ShipSummaryTable.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/ShipSummaryTable.jsx b/src/app/components/ShipSummaryTable.jsx index 450c760e..b0d8d016 100644 --- a/src/app/components/ShipSummaryTable.jsx +++ b/src/app/components/ShipSummaryTable.jsx @@ -50,7 +50,7 @@ export default class ShipSummaryTable extends TranslatedComponent { const speedTooltip = canThrust ? 'TT_SUMMARY_SPEED' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL'; const canBoost = ship.canBoost(cargo, ship.fuelCapacity); const boostTooltip = canBoost ? 'TT_SUMMARY_BOOST' : canThrust ? 'TT_SUMMARY_BOOST_NONFUNCTIONAL' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL'; - const sgMetrics = Calc.shieldMetrics(ship, pips.sys || 2); + const sgMetrics = Calc.shieldMetrics(ship, pips.sys); const shipBoost = canBoost ? Calc.calcBoost(ship) : 'No Boost'; const armourMetrics = Calc.armourMetrics(ship); let shieldColour = 'blue'; @@ -149,8 +149,8 @@ export default class ShipSummaryTable extends TranslatedComponent { {int(ship && ship.shield > 0 ? ship.shield * ((1 / (1 - (ship.shieldExplRes)))) : 0)}{u.MJ} {int(ship && ship.shield > 0 ? ship.shield * ((1 / (1 - (ship.shieldKinRes)))) : 0)}{u.MJ} {int(ship && ship.shield > 0 ? ship.shield * ((1 / (1 - (ship.shieldThermRes)))) : 0)}{u.MJ} - {sgMetrics && sgMetrics.recover ? formats.time(sgMetrics.recover) : 0} - {sgMetrics && sgMetrics.recharge ? formats.time(sgMetrics.recharge) : 0} + {sgMetrics && sgMetrics.recover === Math.Inf ? translate('Never') : formats.time(sgMetrics.recover)} + {sgMetrics && sgMetrics.recharge === Math.Inf ? translate('Never') : formats.time(sgMetrics.recharge)}