Add component group filtering for Orca special case internal slots

This commit is contained in:
Colin McLeod
2015-07-21 12:34:35 -07:00
parent 348339520d
commit 8946f9b97c
5 changed files with 66 additions and 31 deletions

View File

@@ -90,7 +90,8 @@ angular.module('shipyard').service('Components', ['lodash', 'ComponentsDB', 'Shi
*/
this.forShip = function(shipId) {
var ship = Ships[shipId];
return new ComponentSet(C, ship.minMassFilter || ship.properties.hullMass + 5, ship.slots.common, ship.slots.internal[0], ship.slots.hardpoints[0]);
var maxInternal = isNaN(ship.slots.internal[0]) ? ship.slots.internal[0].class : ship.slots.internal[0];
return new ComponentSet(C, ship.minMassFilter || ship.properties.hullMass + 5, ship.slots.common, maxInternal, ship.slots.hardpoints[0]);
};
}]);