diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js index bb3b17ae..dff4fed9 100755 --- a/app/js/controllers/controller-outfit.js +++ b/app/js/controllers/controller-outfit.js @@ -232,8 +232,8 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', ' updateState(Serializer.fromShip(ship.useCommon(rating))); }; - $scope.useHardpoint = function(group, mount) { - updateState(Serializer.fromShip(ship.useWeapon(group, mount))); + $scope.useHardpoint = function(group, mount, missile) { + updateState(Serializer.fromShip(ship.useWeapon(group, mount, missile))); }; $scope.useUtility = function(group, rating) { diff --git a/app/js/shipyard/factory-ship.js b/app/js/shipyard/factory-ship.js index caeb5d6d..faaf8f9f 100755 --- a/app/js/shipyard/factory-ship.js +++ b/app/js/shipyard/factory-ship.js @@ -557,17 +557,13 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength', return this; }; - Ship.prototype.useWeapon = function(group, mount) { + Ship.prototype.useWeapon = function(group, mount, missile) { var hps = this.hardpoints; for (var i = hps.length; i--; ) { if (hps[i].maxClass) { var size = hps[i].maxClass, component; do { - if (group == 'mr') { - component = Components.findHardpoint(group, size, null, null, 'F', mount); - } else { - component = Components.findHardpoint(group, size, null, null, mount); - } + component = Components.findHardpoint(group, size, null, null, mount, missile); if (component) { this.use(hps[i], component.id, component); break; diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html index cf0ff832..a9e35e13 100644 --- a/app/views/page-outfit.html +++ b/app/views/page-outfit.html @@ -284,8 +284,8 @@