mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-11 16:53:02 +00:00
Merge pull request #120 from sf302/master
Heat Sink Launcher utility auto-fill
This commit is contained in:
@@ -547,8 +547,8 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
Ship.prototype.useUtility = function(group, rating, clobber) {
|
Ship.prototype.useUtility = function(group, rating, name, clobber) {
|
||||||
var component = Components.findHardpoint(group, 0, rating);
|
var component = Components.findHardpoint(group, 0, rating, name);
|
||||||
for (var i = this.hardpoints.length; i--; ) {
|
for (var i = this.hardpoints.length; i--; ) {
|
||||||
if ((clobber || !this.hardpoints[i].c) && !this.hardpoints[i].maxClass) {
|
if ((clobber || !this.hardpoints[i].c) && !this.hardpoints[i].maxClass) {
|
||||||
this.use(this.hardpoints[i], component.id, component);
|
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','B')">B</li>
|
||||||
<li class="c" ng-click="useUtility('sb','A')">A</li>
|
<li class="c" ng-click="useUtility('sb','A')">A</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="select-group cap" translate="Heat Sink Launcher"></div>
|
||||||
|
<ul>
|
||||||
|
<li class="lc" ng-click="useUtility('cm',null,'Heat Sink Launcher')" translate="Heat Sink Launcher"></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</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}">
|
<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