fix: put house version railjack components into the salvage array #1654

Merged
Sainan merged 3 commits from raw-rj-skins into main 2025-04-15 18:11:13 -07:00
Showing only changes of commit 952370f4a0 - Show all commits

View File

@ -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,