Fix to unique internal components

This commit is contained in:
Colin McLeod
2015-05-08 21:40:40 -07:00
parent adc025e3d9
commit 9f91b55b6e
2 changed files with 2 additions and 2 deletions

View File

@@ -149,7 +149,7 @@ angular.module('shipyard').factory('Ship', ['Components', 'calcShieldStrength',
if (slot.id != id) { // Selecting a different component if (slot.id != id) { // Selecting a different component
var slotIndex = this.internal.indexOf(slot); var slotIndex = this.internal.indexOf(slot);
// Slot is an internal slot, is not being emptied, and the selected component group/type must be of unique // Slot is an internal slot, is not being emptied, and the selected component group/type must be of unique
if(slotIndex != -1 && component && (component.grp == 'sg' || component.grp || 'rf')) { if(slotIndex != -1 && component && (component.grp == 'sg' || component.grp == 'rf')) {
// Find another internal slot that already has this type/group installed // Find another internal slot that already has this type/group installed
var similarSlotIndex = this.findInternalByGroup(component.grp); var similarSlotIndex = this.findInternalByGroup(component.grp);
// If another slot has an installed component with of the same type // If another slot has an installed component with of the same type

View File

@@ -1,6 +1,6 @@
{ {
"name": "coriolis_shipyard", "name": "coriolis_shipyard",
"version": "0.3.0", "version": "0.3.1",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/cmmcleod/coriolis" "url": "https://github.com/cmmcleod/coriolis"