Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
fix power bug when swapping disabled components
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin McLeod committed Oct 8, 2015
1 parent fb7e913 commit 80d4b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/js/shipyard/factory-ship.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
var similarSlot = this.findInternalByGroup(component.grp);
// If another slot has an installed component with of the same type
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.discountedCost = 0;
}
Expand Down

0 comments on commit 80d4b6b

Please sign in to comment.