fix: give helmet when acquiring a skin

This commit is contained in:
Sainan 2025-03-23 16:30:14 +01:00
parent aa12708738
commit ffee2f523f
3 changed files with 16 additions and 8 deletions

8
package-lock.json generated
View File

@ -18,7 +18,7 @@
"mongoose": "^8.11.0", "mongoose": "^8.11.0",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"typescript": ">=5.5 <5.6.0", "typescript": ">=5.5 <5.6.0",
"warframe-public-export-plus": "^0.5.47", "warframe-public-export-plus": "^0.5.48",
"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"
@ -4013,9 +4013,9 @@
} }
}, },
"node_modules/warframe-public-export-plus": { "node_modules/warframe-public-export-plus": {
"version": "0.5.47", "version": "0.5.48",
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.47.tgz", "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.48.tgz",
"integrity": "sha512-ZJK3VT1PdSPwZlhIzUVBlydwK4DM0sOmeCiixVMgOM8XuOPJ8OHfQUoLKydtw5rxCsowzFPbx5b3KBke5C4akQ==" "integrity": "sha512-vJitVYnaViQo43xAkL/h3MJ/6wS7YknKEYhYs+N/GrsspYLMPGf9KSuR19tprB2g9KVGS5o67t0v5K8p0RTQCQ=="
}, },
"node_modules/warframe-riven-info": { "node_modules/warframe-riven-info": {
"version": "0.1.2", "version": "0.1.2",

View File

@ -23,7 +23,7 @@
"mongoose": "^8.11.0", "mongoose": "^8.11.0",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"typescript": ">=5.5 <5.6.0", "typescript": ">=5.5 <5.6.0",
"warframe-public-export-plus": "^0.5.47", "warframe-public-export-plus": "^0.5.48",
"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

@ -334,11 +334,19 @@ export const addItem = async (
} }
} }
if (typeName in ExportCustoms) { if (typeName in ExportCustoms) {
if (ExportCustoms[typeName].productCategory == "CrewShipWeaponSkins") { const meta = ExportCustoms[typeName];
return addCrewShipWeaponSkin(inventory, typeName); let inventoryChanges: IInventoryChanges;
if (meta.productCategory == "CrewShipWeaponSkins") {
inventoryChanges = addCrewShipWeaponSkin(inventory, typeName);
} else { } else {
return addSkin(inventory, typeName); inventoryChanges = addSkin(inventory, typeName);
} }
if (meta.additionalItems) {
for (const item of meta.additionalItems) {
combineInventoryChanges(inventoryChanges, await addItem(inventory, item));
}
}
return inventoryChanges;
} }
if (typeName in ExportFlavour) { if (typeName in ExportFlavour) {
return addCustomization(inventory, typeName); return addCustomization(inventory, typeName);