mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05: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.
|
* Strip ship to D-class and no other components.
|
||||||
*/
|
*/
|
||||||
$scope.stripBuild = function() {
|
$scope.stripBuild = function() {
|
||||||
ship.common.forEach(function(slot) {
|
for (var i = 0, l = ship.common.length - 1; i < l; i++) { // All except Fuel Tank
|
||||||
var id = slot.maxClass + 'D';
|
var id = ship.common[i].maxClass + 'D';
|
||||||
ship.use(slot, id, Components.common(ship.common.indexOf(slot), id));
|
ship.use(ship.common[i], id, Components.common(i, id));
|
||||||
});
|
}
|
||||||
ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); });
|
ship.hardpoints.forEach(function(slot) { ship.use(slot, null, null); });
|
||||||
ship.internal.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