feat: give additionalItems for weapons
All checks were successful
Build / build (20) (push) Successful in 38s
Build / build (18) (push) Successful in 1m5s
Build / build (22) (push) Successful in 1m10s
Build / build (18) (pull_request) Successful in 53s
Build / build (20) (pull_request) Successful in 1m3s
Build / build (22) (pull_request) Successful in 1m9s

This commit is contained in:
Sainan 2025-02-25 05:47:57 +01:00
parent c29bf6aab5
commit 963d138150

View File

@ -285,6 +285,11 @@ export const addItem = async (
const weapon = ExportWeapons[typeName]; const weapon = ExportWeapons[typeName];
if (weapon.totalDamage != 0) { if (weapon.totalDamage != 0) {
const inventoryChanges = addEquipment(inventory, weapon.productCategory, typeName); const inventoryChanges = addEquipment(inventory, weapon.productCategory, typeName);
if (weapon.additionalItems) {
for (const item of weapon.additionalItems) {
combineInventoryChanges(inventoryChanges, await addItem(inventory, item, 1));
}
}
updateSlots(inventory, InventorySlot.WEAPONS, 0, 1); updateSlots(inventory, InventorySlot.WEAPONS, 0, 1);
return { return {
InventoryChanges: { InventoryChanges: {