mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Handle display when summary values show thrusters disabled but current mass keeps them enabled
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#2.3.5
|
#2.3.5
|
||||||
* Ensure that hidden blueprint effects are applied when a blueprint is selected
|
* Ensure that hidden blueprint effects are applied when a blueprint is selected
|
||||||
|
* Handle display when summary values show thrusters disabled but current mass keeps them enabled
|
||||||
|
|
||||||
#2.3.4
|
#2.3.4
|
||||||
* Fix crash when removing the special effect from a module
|
* Fix crash when removing the special effect from a module
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ export default class Movement extends TranslatedComponent {
|
|||||||
<path d="M342 450l.4 1.5-16.2 10.7-.4-.2-3.5-13 .3-.3L342 450zm-14.3 7.6l7.7-5-9.2-.6 1.5 5.6z"/>
|
<path d="M342 450l.4 1.5-16.2 10.7-.4-.2-3.5-13 .3-.3L342 450zm-14.3 7.6l7.7-5-9.2-.6 1.5 5.6z"/>
|
||||||
|
|
||||||
// Speed
|
// Speed
|
||||||
<text x="470" y="30" strokeWidth='0'>{formats.int(ship.calcSpeed(eng, fuel, cargo, boost))}m/s</text>
|
<text x="470" y="30" strokeWidth='0'>{ship.canThrust(cargo, fuel) ? formats.int(ship.calcSpeed(eng, fuel, cargo, boost)) + 'm/s' : '-'}</text>
|
||||||
// Pitch
|
// Pitch
|
||||||
<text x="355" y="410" strokeWidth='0'>{formats.int(ship.calcPitch(eng, fuel, cargo, boost))}°/s</text>
|
<text x="355" y="410" strokeWidth='0'>{ship.canThrust(cargo, fuel) ? formats.int(ship.calcPitch(eng, fuel, cargo, boost)) + '°/s' : '-'}</text>
|
||||||
// Roll
|
// Roll
|
||||||
<text x="450" y="110" strokeWidth='0'>{formats.int(ship.calcRoll(eng, fuel, cargo, boost))}°/s</text>
|
<text x="450" y="110" strokeWidth='0'>{ship.canThrust(cargo, fuel) ? formats.int(ship.calcRoll(eng, fuel, cargo, boost)) + '°/s' : '-'}</text>
|
||||||
// Yaw
|
// Yaw
|
||||||
<text x="160" y="430" strokeWidth='0'>{formats.int(ship.calcYaw(eng, fuel, cargo, boost))}°/s</text>
|
<text x="160" y="430" strokeWidth='0'>{ship.canThrust(cargo, fuel) ? formats.int(ship.calcYaw(eng, fuel, cargo, boost)) + '°/s' : '-'}</text>
|
||||||
</svg>
|
</svg>
|
||||||
</span>);
|
</span>);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ export default class ShipSummaryTable extends TranslatedComponent {
|
|||||||
const sgClassNames = cn({ warning: shieldGenerator && !ship.shield, muted: !shieldGenerator });
|
const sgClassNames = cn({ warning: shieldGenerator && !ship.shield, muted: !shieldGenerator });
|
||||||
const sgTooltip = shieldGenerator ? 'TT_SUMMARY_SHIELDS' : 'TT_SUMMARY_SHIELDS_NONFUNCTIONAL';
|
const sgTooltip = shieldGenerator ? 'TT_SUMMARY_SHIELDS' : 'TT_SUMMARY_SHIELDS_NONFUNCTIONAL';
|
||||||
const timeToDrain = Calc.timeToDrainWep(ship, 4);
|
const timeToDrain = Calc.timeToDrainWep(ship, 4);
|
||||||
const canThrust = ship.canThrust(cargo, fuel);
|
const canThrust = ship.canThrust(cargo, ship.fuelCapacity);
|
||||||
const speedTooltip = canThrust ? 'TT_SUMMARY_SPEED' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL';
|
const speedTooltip = canThrust ? 'TT_SUMMARY_SPEED' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL';
|
||||||
const canBoost = ship.canBoost(cargo, fuel);
|
const canBoost = ship.canBoost(cargo, ship.fuelCapacity);
|
||||||
const boostTooltip = canBoost ? 'TT_SUMMARY_BOOST' : canThrust ? 'TT_SUMMARY_BOOST_NONFUNCTIONAL' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL';
|
const boostTooltip = canBoost ? 'TT_SUMMARY_BOOST' : canThrust ? 'TT_SUMMARY_BOOST_NONFUNCTIONAL' : 'TT_SUMMARY_SPEED_NONFUNCTIONAL';
|
||||||
|
|
||||||
return <div id='summary'>
|
return <div id='summary'>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export const terms = {
|
|||||||
PHRASE_EFFECTIVE_SDPS_ARMOUR: 'SDPS against armour',
|
PHRASE_EFFECTIVE_SDPS_ARMOUR: 'SDPS against armour',
|
||||||
|
|
||||||
TT_SUMMARY_SPEED: 'With full fuel tank and 4 pips to ENG',
|
TT_SUMMARY_SPEED: 'With full fuel tank and 4 pips to ENG',
|
||||||
TT_SUMMARY_SPEED_NONFUNCTIONAL: 'Thrusters powered off or over maximum mass',
|
TT_SUMMARY_SPEED_NONFUNCTIONAL: 'Thrusters powered off or over maximum mass with full fuel and cargo loads',
|
||||||
TT_SUMMARY_BOOST: 'With full fuel tank and 4 pips to ENG',
|
TT_SUMMARY_BOOST: 'With full fuel tank and 4 pips to ENG',
|
||||||
TT_SUMMARY_BOOST_NONFUNCTIONAL: 'Power distributor not able to supply enough power to boost',
|
TT_SUMMARY_BOOST_NONFUNCTIONAL: 'Power distributor not able to supply enough power to boost',
|
||||||
TT_SUMMARY_SHIELDS: 'Raw shield strength, including boosters',
|
TT_SUMMARY_SHIELDS: 'Raw shield strength, including boosters',
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export default class Ship {
|
|||||||
* @return {Number} Pitch
|
* @return {Number} Pitch
|
||||||
*/
|
*/
|
||||||
calcPitch(eng, fuel, cargo, boost) {
|
calcPitch(eng, fuel, cargo, boost) {
|
||||||
return Calc.calcPitch(this.unladenMass + fuel + cargo, this.pitch, this.standard[1].m, this.pipSpeed, eng, this.topBoost / this.topSpeed, boost);
|
return Calc.calcPitch(this.unladenMass + fuel + cargo, this.pitch, this.standard[1].m, this.pipSpeed, eng, this.boost / this.speed, boost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,7 +210,7 @@ export default class Ship {
|
|||||||
* @return {Number} Roll
|
* @return {Number} Roll
|
||||||
*/
|
*/
|
||||||
calcRoll(eng, fuel, cargo, boost) {
|
calcRoll(eng, fuel, cargo, boost) {
|
||||||
return Calc.calcRoll(this.unladenMass + fuel + cargo, this.roll, this.standard[1].m, this.pipSpeed, eng, this.topBoost / this.topSpeed, boost);
|
return Calc.calcRoll(this.unladenMass + fuel + cargo, this.roll, this.standard[1].m, this.pipSpeed, eng, this.boost / this.speed, boost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,7 +222,7 @@ export default class Ship {
|
|||||||
* @return {Number} Yaw
|
* @return {Number} Yaw
|
||||||
*/
|
*/
|
||||||
calcYaw(eng, fuel, cargo, boost) {
|
calcYaw(eng, fuel, cargo, boost) {
|
||||||
return Calc.calcYaw(this.unladenMass + fuel + cargo, this.yaw, this.standard[1].m, this.pipSpeed, eng, this.topBoost / this.topSpeed, boost);
|
return Calc.calcYaw(this.unladenMass + fuel + cargo, this.yaw, this.standard[1].m, this.pipSpeed, eng, this.boost / this.speed, boost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user