Fixed ship listing "nothing" actions as available
This commit is contained in:
parent
d3e12fa8e1
commit
0b327fec26
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue