fix: put house version railjack components into the salvage array #1654
@ -408,8 +408,19 @@ export const addItem = async (
|
||||
const meta = ExportCustoms[typeName];
|
||||
let inventoryChanges: IInventoryChanges;
|
||||
if (meta.productCategory == "CrewShipWeaponSkins") {
|
||||
inventoryChanges = addCrewShipWeaponSkin(inventory, typeName);
|
||||
// Add to raw salvage. It needs to be identified to get stats and then be moved into the CrewShipWeaponSkins proper.
|
||||
const rawSalvageChanges = [
|
||||
{
|
||||
ItemType: typeName,
|
||||
ItemCount: quantity
|
||||
}
|
||||
];
|
||||
addCrewShipRawSalvage(inventory, rawSalvageChanges);
|
||||
inventoryChanges = { CrewShipRawSalvage: rawSalvageChanges };
|
||||
} else {
|
||||
if (quantity != 1) {
|
||||
throw new Error(`unexpected acquisition quantity of WeaponSkins: got ${quantity}, expected 1`);
|
||||
}
|
||||
inventoryChanges = addSkin(inventory, typeName);
|
||||
}
|
||||
if (meta.additionalItems) {
|
||||
@ -1083,6 +1094,7 @@ export const addSkin = (
|
||||
return inventoryChanges;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const addCrewShipWeaponSkin = (
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
typeName: string,
|
||||
|
Loading…
x
Reference in New Issue
Block a user