mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Add Heat Sink auto-fill given new SCB heat output
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -296,6 +296,10 @@
|
||||
<li class="c" ng-click="useUtility('sb','B')">B</li>
|
||||
<li class="c" ng-click="useUtility('sb','A')">A</li>
|
||||
</ul>
|
||||
<div class="select-group cap" translate="Heat Sink Launcher"></div>
|
||||
<ul>
|
||||
<li class="lc" ng-click="useUtility('cm','Heat Sink Launcher')" translate="Heat Sink LAuncher"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slot" ng-repeat="h in ship.hardpoints | filter:{maxClass: '0'}" ng-click="selectSlot($event, h)" context-menu="select('h', h, $event, 'empty')" ng-class="{selected: selectedSlot==h}">
|
||||
|
||||
Reference in New Issue
Block a user