mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-09 14:45:35 +00:00
Fix strip build bug, and update state
This commit is contained in:
@@ -142,12 +142,14 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
|
||||
* Strip ship to D-class and no other components.
|
||||
*/
|
||||
$scope.stripBuild = function() {
|
||||
ship.common.forEach(function(slot) {
|
||||
var id = slot.maxClass + 'D';
|
||||
ship.use(slot, id, Components.common(ship.common.indexOf(slot), id));
|
||||
});
|
||||
for (var i = 0, l = ship.common.length - 1; i < l; i++) { // All except Fuel Tank
|
||||
var id = ship.common[i].maxClass + 'D';
|
||||
ship.use(ship.common[i], id, Components.common(i, id));
|
||||
}
|
||||
ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); });
|
||||
ship.internal.forEach(function(slot) { ship.use(slot, null, null); });
|
||||
$scope.code = Serializer.fromShip(ship);
|
||||
updateState();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user