Add Heat Sink auto-fill given new SCB heat output

This commit is contained in:
Kevin Chang
2015-11-16 15:35:36 -08:00
parent 8bc100714f
commit db4303d3c8
2 changed files with 10 additions and 1 deletions

View File

@@ -548,7 +548,12 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
};
Ship.prototype.useUtility = function(group, rating, clobber) {
var component = Components.findHardpoint(group, 0, rating);
var component;
if (group == 'cm') {
component = Components.findHardpoint(group, 0, null, rating); //overload Rating as Name for countermeasures
} else {
component = Components.findHardpoint(group, 0, rating);
}
for (var i = this.hardpoints.length; i--; ) {
if ((clobber || !this.hardpoints[i].c) && !this.hardpoints[i].maxClass) {
this.use(this.hardpoints[i], component.id, component);