mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 14:33:22 +00:00
Fix to calculate boost when engcap changes
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
* Fix issue where new module added to a slot did not reset its enabled status
|
* Fix issue where new module added to a slot did not reset its enabled status
|
||||||
* Show integrity value for relevant modules
|
* Show integrity value for relevant modules
|
||||||
* Reset old modification values when a new roll is applied
|
* Reset old modification values when a new roll is applied
|
||||||
|
* Ensure that boost value is set correctly when modifications to power distributor enable/disable boost
|
||||||
|
|
||||||
#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
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import * as d3 from 'd3';
|
|||||||
const CORIOLIS_COLOURS = [ '#FF8C0D', '#1FB0FF', '#519032', '#D5420D' ];
|
const CORIOLIS_COLOURS = [ '#FF8C0D', '#1FB0FF', '#519032', '#D5420D' ];
|
||||||
const LABEL_COLOUR = '#FFFFFF';
|
const LABEL_COLOUR = '#FFFFFF';
|
||||||
|
|
||||||
var margin = {top: 10, right: 0, bottom: 0, left: 50};
|
var margin = {top: 10, right: 0, bottom: 0, left: 55};
|
||||||
|
|
||||||
const ASPECT = 1;
|
const ASPECT = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -553,6 +553,10 @@ export default class Ship {
|
|||||||
} else if (name === 'wepcap' || name === 'weprate') {
|
} else if (name === 'wepcap' || name === 'weprate') {
|
||||||
m.setModValue(name, value, sentfromui);
|
m.setModValue(name, value, sentfromui);
|
||||||
this.recalculateTtd();
|
this.recalculateTtd();
|
||||||
|
} else if (name === 'engcap') {
|
||||||
|
m.setModValue(name, value, sentfromui);
|
||||||
|
// Might have resulted in a change in boostability
|
||||||
|
this.updateMovement();
|
||||||
} else {
|
} else {
|
||||||
// Generic
|
// Generic
|
||||||
m.setModValue(name, value, sentfromui);
|
m.setModValue(name, value, sentfromui);
|
||||||
@@ -1247,6 +1251,7 @@ export default class Ship {
|
|||||||
* @return {this} The ship instance (for chaining operations)
|
* @return {this} The ship instance (for chaining operations)
|
||||||
*/
|
*/
|
||||||
updateMovement() {
|
updateMovement() {
|
||||||
|
console.log('updateMovement()');
|
||||||
this.speeds = Calc.speed(this.unladenMass + this.fuelCapacity, this.speed, this.standard[1].m, this.pipSpeed);
|
this.speeds = Calc.speed(this.unladenMass + this.fuelCapacity, this.speed, this.standard[1].m, this.pipSpeed);
|
||||||
this.topSpeed = this.speeds[4];
|
this.topSpeed = this.speeds[4];
|
||||||
this.topBoost = this.canBoost() ? this.speeds[4] * this.boost / this.speed : 0;
|
this.topBoost = this.canBoost() ? this.speeds[4] * this.boost / this.speed : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user