mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Fix PD/boost calculation
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#2.3.0
|
#2.3.0
|
||||||
* Add 2.3 diminishing returns on shield value
|
* Add 2.3 diminishing returns on shield value
|
||||||
* Make scan time visible on scanners where available
|
* 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
|
#2.2.19
|
||||||
* Power management panel now displays modules in descending order of power usage by default
|
* Power management panel now displays modules in descending order of power usage by default
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ export default class StandardSlotSection extends SlotSection {
|
|||||||
selected={currentMenu == st[4]}
|
selected={currentMenu == st[4]}
|
||||||
onChange={this.props.onChange}
|
onChange={this.props.onChange}
|
||||||
ship={ship}
|
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] = <StandardSlot
|
slots[6] = <StandardSlot
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ export default class ModuleSet {
|
|||||||
let pd = this.standard[4][0];
|
let pd = this.standard[4][0];
|
||||||
|
|
||||||
for (let p of this.standard[4]) {
|
for (let p of this.standard[4]) {
|
||||||
if (p.mass < pd.mass && p.engcap >= boostEnergy) {
|
if (p.mass < pd.mass && p.engcap > boostEnergy) {
|
||||||
pd = p;
|
pd = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default class Ship {
|
|||||||
*/
|
*/
|
||||||
canBoost() {
|
canBoost() {
|
||||||
return this.canThrust() && // Thrusters operational
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user