Ensure any equipment incompatibility refs are enforced (#362)
Regardless of the order of loadingmaster
parent
364b68d1e9
commit
f999fe8658
|
@ -156,6 +156,14 @@ this.equipmentAdded = function(equip)
|
|||
}
|
||||
}
|
||||
}
|
||||
var eq_dict = this.$equipmentEnabled;
|
||||
var eqIncompatible;
|
||||
for (eqKey in eq_dict) {
|
||||
eqIncompatible = EquipmentInfo.infoForKey(eqKey).incompatibleEquipment;
|
||||
if (eqIncompatible && eqIncompatible.indexOf(equip) >= 0) {
|
||||
player.ship.removeEquipment(eqKey);
|
||||
}
|
||||
}
|
||||
this.$equipmentEnabled[equip] = 1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue