forked from OpenWF/SpaceNinjaServer
fix: logic error in addCrewShipHarness
This commit is contained in:
parent
526ce1529b
commit
d63bab1bf4
@ -855,7 +855,7 @@ const addCrewShipHarness = (
|
|||||||
typeName: string,
|
typeName: string,
|
||||||
inventoryChanges: IInventoryChanges = {}
|
inventoryChanges: IInventoryChanges = {}
|
||||||
): IInventoryChanges => {
|
): IInventoryChanges => {
|
||||||
if (inventory.CrewShips.length != 0) {
|
if (inventory.CrewShipHarnesses.length != 0) {
|
||||||
throw new Error("refusing to add CrewShipHarness because account already has one");
|
throw new Error("refusing to add CrewShipHarness because account already has one");
|
||||||
}
|
}
|
||||||
const index = inventory.CrewShipHarnesses.push({ ItemType: typeName }) - 1;
|
const index = inventory.CrewShipHarnesses.push({ ItemType: typeName }) - 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user