mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 22:55:35 +00:00
Add armor autofill, prevent internal fill clobber
This commit is contained in:
@@ -255,7 +255,9 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
|
||||
$scope.fillWithCargo = function() {
|
||||
ship.internal.forEach(function(slot) {
|
||||
var id = Components.findInternalId('cr', slot.maxClass, 'E');
|
||||
ship.use(slot, id, Components.internal(id));
|
||||
if (!slot.c) {
|
||||
ship.use(slot, id, Components.internal(id));
|
||||
}
|
||||
});
|
||||
updateState(Serializer.fromShip(ship));
|
||||
};
|
||||
@@ -273,6 +275,16 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
|
||||
updateState(Serializer.fromShip(ship));
|
||||
};
|
||||
|
||||
$scope.fillWithArmor = function() {
|
||||
ship.internal.forEach(function(slot) {
|
||||
var id = Components.findInternalId('hr', slot.maxClass, 'D');
|
||||
if (!slot.c) {
|
||||
ship.use(slot, id, Components.internal(id));
|
||||
}
|
||||
});
|
||||
updateState(Serializer.fromShip(ship));
|
||||
};
|
||||
|
||||
/**
|
||||
* Fill all internal slots with Cargo Racks, and optmize internal components.
|
||||
* Hardpoints are not altered.
|
||||
|
||||
Reference in New Issue
Block a user