fix: put acquired house version railjack armaments into raw salvage
All checks were successful
Build / build (push) Successful in 51s
Build / build (pull_request) Successful in 1m26s

This commit is contained in:
Sainan 2025-04-16 19:15:23 +02:00
parent 379e83a764
commit 1f38af473a
3 changed files with 26 additions and 9 deletions

8
package-lock.json generated
View File

@ -18,7 +18,7 @@
"morgan": "^1.10.0", "morgan": "^1.10.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"typescript": "^5.5", "typescript": "^5.5",
"warframe-public-export-plus": "^0.5.55", "warframe-public-export-plus": "^0.5.56",
"warframe-riven-info": "^0.1.2", "warframe-riven-info": "^0.1.2",
"winston": "^3.17.0", "winston": "^3.17.0",
"winston-daily-rotate-file": "^5.0.0" "winston-daily-rotate-file": "^5.0.0"
@ -3789,9 +3789,9 @@
} }
}, },
"node_modules/warframe-public-export-plus": { "node_modules/warframe-public-export-plus": {
"version": "0.5.55", "version": "0.5.56",
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.55.tgz", "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.56.tgz",
"integrity": "sha512-Gnd4FCBVuxm2xWGfu8xxxqPIPSnnTqiEWlpP3rsFpVlQs09RNFnW2PEX9rCZt0f3SvHBv5ssDDrFlzgBHS1yrA==" "integrity": "sha512-px+J7tUm6fkSzwKkvL73ySQReDq9oM1UrHSLM3vbYGBvELM892iBgPYG45okIhScCSdwmmXTiWZTf4x/I4qiNQ=="
}, },
"node_modules/warframe-riven-info": { "node_modules/warframe-riven-info": {
"version": "0.1.2", "version": "0.1.2",

View File

@ -25,7 +25,7 @@
"morgan": "^1.10.0", "morgan": "^1.10.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"typescript": "^5.5", "typescript": "^5.5",
"warframe-public-export-plus": "^0.5.55", "warframe-public-export-plus": "^0.5.56",
"warframe-riven-info": "^0.1.2", "warframe-riven-info": "^0.1.2",
"winston": "^3.17.0", "winston": "^3.17.0",
"winston-daily-rotate-file": "^5.0.0" "winston-daily-rotate-file": "^5.0.0"

View File

@ -539,11 +539,28 @@ export const addItem = async (
} }
} }
if (typeName in ExportRailjackWeapons) { if (typeName in ExportRailjackWeapons) {
const meta = ExportRailjackWeapons[typeName];
if (meta.defaultUpgrades?.length) {
// House versions need to be identified to get stats so put them into raw salvage first.
const rawSalvageChanges = [
{
ItemType: typeName,
ItemCount: quantity
}
];
addCrewShipRawSalvage(inventory, rawSalvageChanges);
return { CrewShipRawSalvage: rawSalvageChanges };
} else {
// Sigma versions can be added directly.
if (quantity != 1) {
throw new Error(`unexpected acquisition quantity of CrewShipWeapon: got ${quantity}, expected 1`);
}
return { return {
...addEquipment(inventory, ExportRailjackWeapons[typeName].productCategory, typeName), ...addEquipment(inventory, meta.productCategory, typeName),
...occupySlot(inventory, InventorySlot.RJ_COMPONENT_AND_ARMAMENTS, premiumPurchase) ...occupySlot(inventory, InventorySlot.RJ_COMPONENT_AND_ARMAMENTS, premiumPurchase)
}; };
} }
}
if (typeName in ExportMisc.creditBundles) { if (typeName in ExportMisc.creditBundles) {
const creditsTotal = ExportMisc.creditBundles[typeName] * quantity; const creditsTotal = ExportMisc.creditBundles[typeName] * quantity;
inventory.RegularCredits += creditsTotal; inventory.RegularCredits += creditsTotal;