fix: handle acquisition of modular weapon parts
All checks were successful
Build / build (18) (push) Successful in 40s
Build / build (22) (push) Successful in 54s
Build / build (20) (push) Successful in 1m13s
Build / build (18) (pull_request) Successful in 39s
Build / build (20) (pull_request) Successful in 54s
Build / build (22) (pull_request) Successful in 1m12s
All checks were successful
Build / build (18) (push) Successful in 40s
Build / build (22) (push) Successful in 54s
Build / build (20) (push) Successful in 1m13s
Build / build (18) (pull_request) Successful in 39s
Build / build (20) (pull_request) Successful in 54s
Build / build (22) (pull_request) Successful in 1m12s
This commit is contained in:
parent
1351e73961
commit
7397b55c3c
@ -322,7 +322,6 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
if (typeName in ExportWeapons) {
|
if (typeName in ExportWeapons) {
|
||||||
const weapon = ExportWeapons[typeName];
|
const weapon = ExportWeapons[typeName];
|
||||||
// Many non-weapon items are "Pistols" in Public Export, so some duck typing is needed.
|
|
||||||
if (weapon.totalDamage != 0) {
|
if (weapon.totalDamage != 0) {
|
||||||
const inventoryChanges = addEquipment(inventory, weapon.productCategory, typeName);
|
const inventoryChanges = addEquipment(inventory, weapon.productCategory, typeName);
|
||||||
updateSlots(inventory, InventorySlot.WEAPONS, 0, 1);
|
updateSlots(inventory, InventorySlot.WEAPONS, 0, 1);
|
||||||
@ -332,6 +331,20 @@ export const addItem = async (
|
|||||||
WeaponBin: { count: 1, platinum: 0, Slots: -1 }
|
WeaponBin: { count: 1, platinum: 0, Slots: -1 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
// Modular weapon parts
|
||||||
|
const miscItemChanges = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addMiscItems(inventory, miscItemChanges);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
MiscItems: miscItemChanges
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (typeName in creditBundles) {
|
if (typeName in creditBundles) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user