diff --git a/src/core/Ship.spec.ts b/src/core/Ship.spec.ts index 9f2a22c..5f016c7 100644 --- a/src/core/Ship.spec.ts +++ b/src/core/Ship.spec.ts @@ -51,6 +51,11 @@ module TS.SpaceTac.Specs { equipment.action = new MoveAction(equipment); slot.attach(equipment); + slot = ship.addSlot(SlotType.Weapon); + equipment = new Equipment(); + equipment.slot = slot.type; + slot.attach(equipment); + actions = ship.getAvailableActions(); expect(actions.length).toBe(2); expect(actions[0].code).toEqual("move"); diff --git a/src/core/Ship.ts b/src/core/Ship.ts index f7a75ae..9b6cb38 100644 --- a/src/core/Ship.ts +++ b/src/core/Ship.ts @@ -162,7 +162,7 @@ module TS.SpaceTac { if (this.alive) { this.slots.forEach((slot: Slot) => { - if (slot.attached && slot.attached.action) { + if (slot.attached && slot.attached.action && slot.attached.action.code != "nothing") { actions.push(slot.attached.action); } });