mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Fix persist power bug
This commit is contained in:
@@ -70,19 +70,21 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
this.useBulkhead(comps.bulkheads || 0, true);
|
this.useBulkhead(comps.bulkheads || 0, true);
|
||||||
this.cargoScoop.priority = priorities? priorities[0] * 1 : 0;
|
this.cargoScoop.priority = priorities? priorities[0] * 1 : 0;
|
||||||
this.cargoScoop.enabled = enabled? enabled[0] * 1 : true;
|
this.cargoScoop.enabled = enabled? enabled[0] * 1 : true;
|
||||||
|
|
||||||
if (this.cargoScoop.enabled) {
|
if (this.cargoScoop.enabled) {
|
||||||
bands[this.cargoScoop.priority].retracted += this.cargoScoop.c.power;
|
bands[this.cargoScoop.priority].retracted += this.cargoScoop.c.power;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < cl; i++) {
|
for(i = 0; i < cl; i++) {
|
||||||
common[i].enabled = enabled? enabled[i] * 1 : true;
|
common[i].enabled = enabled? enabled[i + 1] * 1 : true;
|
||||||
common[i].priority = priorities? priorities[i] * 1 : 0;
|
common[i].priority = priorities? priorities[i + 1] * 1 : 0;
|
||||||
common[i].type = 'SYS';
|
common[i].type = 'SYS';
|
||||||
this.use(common[i], comps.common[i], Components.common(i, comps.common[i]), true);
|
this.use(common[i], comps.common[i], Components.common(i, comps.common[i]), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
common[1].type = 'ENG'; // Thrusters
|
common[1].type = 'ENG'; // Thrusters
|
||||||
common[2].type = 'ENG'; // FSD
|
common[2].type = 'ENG'; // FSD
|
||||||
|
cl++; // Increase accounting for Cargo Scoop
|
||||||
|
|
||||||
for(i = 0, l = comps.hardpoints.length; i < l; i++) {
|
for(i = 0, l = comps.hardpoints.length; i < l; i++) {
|
||||||
hps[i].enabled = enabled? enabled[cl + i] * 1 : true;
|
hps[i].enabled = enabled? enabled[cl + i] * 1 : true;
|
||||||
|
|||||||
Reference in New Issue
Block a user