From 3bf3e0613883bb6fabc847f13f395009e1df4f3b Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sun, 11 May 2025 06:11:23 +0200 Subject: [PATCH] chore: handle LasrianTankSteelPathDropTable for DROP_MOD --- src/services/missionInventoryUpdateService.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 14d700ff..fcdd5c2b 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -825,6 +825,13 @@ const hexConquestRewards: IConquestReward[] = [ } ]; +const droptableAliases: Record = { + "/Lotus/Types/DropTables/ManInTheWall/MITWGruzzlingArcanesDropTable": + "/Lotus/Types/DropTables/EntratiLabDropTables/DoppelgangerDropTable", + "/Lotus/Types/DropTables/WF1999DropTables/LasrianTankSteelPathDropTable": + "/Lotus/Types/DropTables/WF1999DropTables/LasrianTankHardModeDropTable" +}; + //TODO: return type of partial missioninventoryupdate response export const addMissionRewards = async ( inventory: TInventoryDatabaseDocument, @@ -1033,11 +1040,9 @@ export const addMissionRewards = async ( if (strippedItems) { for (const si of strippedItems) { - if (si.DropTable == "/Lotus/Types/DropTables/ManInTheWall/MITWGruzzlingArcanesDropTable") { - logger.debug( - `rewriting ${si.DropTable} to /Lotus/Types/DropTables/EntratiLabDropTables/DoppelgangerDropTable` - ); - si.DropTable = "/Lotus/Types/DropTables/EntratiLabDropTables/DoppelgangerDropTable"; + if (si.DropTable in droptableAliases) { + logger.debug(`rewriting ${si.DropTable} to ${droptableAliases[si.DropTable]}`); + si.DropTable = droptableAliases[si.DropTable]; } const droptables = ExportEnemies.droptables[si.DropTable] ?? []; if (si.DROP_MOD) { -- 2.47.2