From 5b584efbf2e169f2de3de74a87e456734df1f5da Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:52:16 +0100 Subject: [PATCH 1/2] feat: acquiring CrewShipHarness with CrewShip --- src/services/inventoryService.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 79147039..a9640aff 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -239,7 +239,13 @@ export const addItem = async ( } }; } else if (ExportResources[typeName].productCategory == "CrewShips") { - const inventoryChanges = addCrewShip(inventory, typeName); + const inventoryChanges = { + ...addCrewShip(inventory, typeName), + ...(!inventory.CrewShipHarnesses?.length + ? addCrewShipHarness(inventory, "/Lotus/Types/Game/CrewShip/RailJack/DefaultHarness") + : {}) + }; + return { InventoryChanges: inventoryChanges }; } else if (ExportResources[typeName].productCategory == "ShipDecorations") { const changes = [ @@ -804,6 +810,17 @@ const addCrewShip = ( return inventoryChanges; }; +const addCrewShipHarness = ( + inventory: TInventoryDatabaseDocument, + typeName: string, + inventoryChanges: IInventoryChanges = {} +): IInventoryChanges => { + const index = inventory.CrewShipHarnesses.push({ ItemType: typeName }) - 1; + inventoryChanges.CrewShipHarnesses ??= []; + (inventoryChanges.CrewShipHarnesses as object[]).push(inventory.CrewShipHarnesses[index].toJSON()); + return inventoryChanges; +}; + //TODO: wrong id is not erroring export const addGearExpByCategory = ( inventory: TInventoryDatabaseDocument, -- 2.47.2 From 876eb5f62fc0f2321d4700ed45a36a935c3af725 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:03:09 +0100 Subject: [PATCH 2/2] comment --- src/services/inventoryService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index a9640aff..2a9b359a 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -241,6 +241,7 @@ export const addItem = async ( } else if (ExportResources[typeName].productCategory == "CrewShips") { const inventoryChanges = { ...addCrewShip(inventory, typeName), + // fix to unlock railjack modding, item bellow supposed to be obtained from archwing quest ...(!inventory.CrewShipHarnesses?.length ? addCrewShipHarness(inventory, "/Lotus/Types/Game/CrewShip/RailJack/DefaultHarness") : {}) -- 2.47.2