Power warning when at 100%

This commit is contained in:
Colin McLeod
2015-08-30 19:45:25 -07:00
parent ab18228131
commit 09e646ee95
2 changed files with 3 additions and 3 deletions

View File

@@ -292,12 +292,12 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
} else if (!slot.enabled) {
return 1; // Disabled
} else if (deployed && !slot.c.retractedOnly) { // Certain component (e.g. Detaild Surface scanner) are power only while retracted
return this.priorityBands[slot.priority].deployedSum > this.powerAvailable ? 2 : 3; // Offline : Online
return this.priorityBands[slot.priority].deployedSum >= this.powerAvailable ? 2 : 3; // Offline : Online
// Active hardpoints have no retracted status
} else if ((deployed && slot.c.retractedOnly) || (slot.cat === 1 && !slot.c.passive)) {
return 0; // No Status (Not possible)
}
return this.priorityBands[slot.priority].retractedSum > this.powerAvailable ? 2 : 3; // Offline : Online
return this.priorityBands[slot.priority].retractedSum >= this.powerAvailable ? 2 : 3; // Offline : Online
};
/**