fix: put house version railjack components into the salvage array #1654
@ -408,8 +408,19 @@ export const addItem = async (
|
|||||||
const meta = ExportCustoms[typeName];
|
const meta = ExportCustoms[typeName];
|
||||||
let inventoryChanges: IInventoryChanges;
|
let inventoryChanges: IInventoryChanges;
|
||||||
if (meta.productCategory == "CrewShipWeaponSkins") {
|
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 {
|
} else {
|
||||||
|
if (quantity != 1) {
|
||||||
|
throw new Error(`unexpected acquisition quantity of WeaponSkins: got ${quantity}, expected 1`);
|
||||||
|
}
|
||||||
inventoryChanges = addSkin(inventory, typeName);
|
inventoryChanges = addSkin(inventory, typeName);
|
||||||
}
|
}
|
||||||
if (meta.additionalItems) {
|
if (meta.additionalItems) {
|
||||||
@ -1083,6 +1094,7 @@ export const addSkin = (
|
|||||||
return inventoryChanges;
|
return inventoryChanges;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const addCrewShipWeaponSkin = (
|
const addCrewShipWeaponSkin = (
|
||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
typeName: string,
|
typeName: string,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user