mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
fix power bug when swapping disabled components
This commit is contained in:
@@ -461,7 +461,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
var similarSlot = this.findInternalByGroup(component.grp);
|
var similarSlot = this.findInternalByGroup(component.grp);
|
||||||
// If another slot has an installed component with of the same type
|
// If another slot has an installed component with of the same type
|
||||||
if (!preventUpdate && similarSlot && similarSlot !== slot) {
|
if (!preventUpdate && similarSlot && similarSlot !== slot) {
|
||||||
this.updateStats(similarSlot, null, similarSlot.c, true); // Update stats but don't trigger a global update
|
this.updateStats(similarSlot, null, similarSlot.c);
|
||||||
similarSlot.id = similarSlot.c = null; // Empty the slot
|
similarSlot.id = similarSlot.c = null; // Empty the slot
|
||||||
similarSlot.discountedCost = 0;
|
similarSlot.discountedCost = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user