fix: put house version railjack components into the salvage array #1654
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -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.54",
 | 
					        "warframe-public-export-plus": "^0.5.55",
 | 
				
			||||||
        "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.54",
 | 
					      "version": "0.5.55",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.54.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.55.tgz",
 | 
				
			||||||
      "integrity": "sha512-27r6qLErr3P8UVDiEzhDAs/BjdAS3vI2CQ58jSI+LClDlj6QL+y1jQe8va/npl3Ft2K8PywLkZ8Yso0j9YzvOA=="
 | 
					      "integrity": "sha512-Gnd4FCBVuxm2xWGfu8xxxqPIPSnnTqiEWlpP3rsFpVlQs09RNFnW2PEX9rCZt0f3SvHBv5ssDDrFlzgBHS1yrA=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/warframe-riven-info": {
 | 
					    "node_modules/warframe-riven-info": {
 | 
				
			||||||
      "version": "0.1.2",
 | 
					      "version": "0.1.2",
 | 
				
			||||||
 | 
				
			|||||||
@ -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.54",
 | 
					    "warframe-public-export-plus": "^0.5.55",
 | 
				
			||||||
    "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"
 | 
				
			||||||
 | 
				
			|||||||
@ -408,8 +408,32 @@ 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);
 | 
					            if (meta.subroutines || meta.randomisedUpgrades) {
 | 
				
			||||||
 | 
					                // 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);
 | 
				
			||||||
 | 
					                inventoryChanges = { CrewShipRawSalvage: rawSalvageChanges };
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                // Sigma versions can be added directly.
 | 
				
			||||||
 | 
					                if (quantity != 1) {
 | 
				
			||||||
 | 
					                    throw new Error(
 | 
				
			||||||
 | 
					                        `unexpected acquisition quantity of CrewShipWeaponSkin: got ${quantity}, expected 1`
 | 
				
			||||||
 | 
					                    );
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                inventoryChanges = {
 | 
				
			||||||
 | 
					                    ...addCrewShipWeaponSkin(inventory, typeName),
 | 
				
			||||||
 | 
					                    ...occupySlot(inventory, InventorySlot.RJ_COMPONENT_AND_ARMAMENTS, premiumPurchase)
 | 
				
			||||||
 | 
					                };
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        } 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) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user