free up inventory bin slot
All checks were successful
Build / build (push) Successful in 1m23s
Build / build (pull_request) Successful in 1m28s

This commit is contained in:
Sainan 2025-04-16 01:16:49 +02:00
parent 920bb45eb5
commit 8d6bd17bc4

View File

@ -51,6 +51,9 @@ export const sellController: RequestHandler = async (req, res) => {
if (payload.Items.Hoverboards) { if (payload.Items.Hoverboards) {
requiredFields.add(InventorySlot.SPACESUITS); requiredFields.add(InventorySlot.SPACESUITS);
} }
if (payload.Items.CrewShipWeapons) {
requiredFields.add(InventorySlot.RJ_COMPONENT_AND_ARMAMENTS);
}
const inventory = await getInventory(accountId, Array.from(requiredFields).join(" ")); const inventory = await getInventory(accountId, Array.from(requiredFields).join(" "));
// Give currency // Give currency
@ -166,6 +169,7 @@ export const sellController: RequestHandler = async (req, res) => {
combineInventoryChanges(inventoryChanges, { MiscItems: miscItemChanges }); combineInventoryChanges(inventoryChanges, { MiscItems: miscItemChanges });
inventory.CrewShipWeapons.splice(index, 1); inventory.CrewShipWeapons.splice(index, 1);
freeUpSlot(inventory, InventorySlot.RJ_COMPONENT_AND_ARMAMENTS);
} }
}); });
} }