From 5937843be8fbfb6e0edc90d946bb61d1b8c3ffb8 Mon Sep 17 00:00:00 2001 From: Cmdr McDonald Date: Thu, 2 Mar 2017 14:37:03 +0000 Subject: [PATCH] Fix PD/boost calculation --- ChangeLog.md | 1 + src/app/components/StandardSlotSection.jsx | 2 +- src/app/shipyard/ModuleSet.js | 2 +- src/app/shipyard/Ship.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5c61f749..b9f3638f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,7 @@ #2.3.0 * Add 2.3 diminishing returns on shield value * Make scan time visible on scanners where available + * Update power distributor able-to-boost calculation to take fractional MJ values in to account #2.2.19 * Power management panel now displays modules in descending order of power usage by default diff --git a/src/app/components/StandardSlotSection.jsx b/src/app/components/StandardSlotSection.jsx index 54cdf08e..59ed2234 100644 --- a/src/app/components/StandardSlotSection.jsx +++ b/src/app/components/StandardSlotSection.jsx @@ -170,7 +170,7 @@ export default class StandardSlotSection extends SlotSection { selected={currentMenu == st[4]} onChange={this.props.onChange} ship={ship} - warning={m => m instanceof Module ? m.getEnginesCapacity() < ship.boostEnergy : m.engcap < ship.boostEnergy} + warning={m => m instanceof Module ? m.getEnginesCapacity() <= ship.boostEnergy : m.engcap <= ship.boostEnergy} />; slots[6] = = boostEnergy) { + if (p.mass < pd.mass && p.engcap > boostEnergy) { pd = p; } } diff --git a/src/app/shipyard/Ship.js b/src/app/shipyard/Ship.js index bfccca8c..145b850d 100755 --- a/src/app/shipyard/Ship.js +++ b/src/app/shipyard/Ship.js @@ -135,7 +135,7 @@ export default class Ship { */ canBoost() { return this.canThrust() && // Thrusters operational - this.boostEnergy <= this.standard[4].m.getEnginesCapacity(); // PD capacitor is sufficient for boost + this.standard[4].m.getEnginesCapacity() > this.boostEnergy; // PD capacitor is sufficient for boost } /**