diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index e1946f7a..20213852 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1,10 +1,18 @@ import staticWorldState from "@/static/fixed_responses/worldState/worldState.json"; +import sortieTilesets from "@/static/fixed_responses/worldState/sortieTilesets.json"; import { buildConfig } from "@/src/services/buildConfigService"; import { unixTimesInMs } from "@/src/constants/timeConstants"; import { config } from "@/src/services/configService"; import { CRng } from "@/src/services/rngService"; import { eMissionType, ExportNightwave, ExportRegions } from "warframe-public-export-plus"; -import { ICalendarDay, ICalendarSeason, ILiteSortie, ISeasonChallenge, IWorldState } from "../types/worldStateTypes"; +import { + ICalendarDay, + ICalendarSeason, + ILiteSortie, + ISeasonChallenge, + ISortieMission, + IWorldState +} from "../types/worldStateTypes"; const sortieBosses = [ "SORTIE_BOSS_HYENA", @@ -277,7 +285,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { } } - const selectedNodes: { missionType: string; modifierType: string; node: string }[] = []; + const selectedNodes: ISortieMission[] = []; const missionTypes = new Set(); for (let i = 0; i < 3; i++) { @@ -298,11 +306,21 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { const modifierType = rng.randomElement(filteredModifiers); if (boss == "SORTIE_BOSS_PHORID") { - selectedNodes.push({ missionType: "MT_ASSASSINATION", modifierType, node }); + selectedNodes.push({ + missionType: "MT_ASSASSINATION", + modifierType, + node, + tileset: sortieTilesets[node as keyof typeof sortieTilesets] + }); nodes.splice(randomIndex, 1); continue; } else if (sortieBossNode[boss]) { - selectedNodes.push({ missionType: "MT_ASSASSINATION", modifierType, node: sortieBossNode[boss] }); + selectedNodes.push({ + missionType: "MT_ASSASSINATION", + modifierType, + node: sortieBossNode[boss], + tileset: sortieTilesets[sortieBossNode[boss] as keyof typeof sortieTilesets] + }); continue; } } @@ -321,7 +339,12 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => { const modifierType = rng.randomElement(filteredModifiers); - selectedNodes.push({ missionType, modifierType, node }); + selectedNodes.push({ + missionType, + modifierType, + node, + tileset: sortieTilesets[node as keyof typeof sortieTilesets] + }); nodes.splice(randomIndex, 1); missionTypes.add(missionType); } diff --git a/src/types/worldStateTypes.ts b/src/types/worldStateTypes.ts index 67178c73..835792b8 100644 --- a/src/types/worldStateTypes.ts +++ b/src/types/worldStateTypes.ts @@ -97,6 +97,13 @@ export interface ISortie { }[]; } +export interface ISortieMission { + missionType: string; + modifierType: string; + node: string; + tileset: string; +} + export interface ILiteSortie { _id: IOid; Activation: IMongoDate; diff --git a/static/fixed_responses/worldState/sortieTilesets.json b/static/fixed_responses/worldState/sortieTilesets.json new file mode 100644 index 00000000..00bc5490 --- /dev/null +++ b/static/fixed_responses/worldState/sortieTilesets.json @@ -0,0 +1,175 @@ +{ + "SettlementNode1": "CorpusShipTileset", + "SettlementNode11": "CorpusShipTileset", + "SettlementNode12": "CorpusShipTileset", + "SettlementNode14": "CorpusShipTileset", + "SettlementNode15": "CorpusShipTileset", + "SettlementNode2": "CorpusShipTileset", + "SettlementNode20": "CorpusShipTileset", + "SettlementNode3": "CorpusShipTileset", + "SolNode1": "CorpusOutpostTileset", + "SolNode10": "CorpusGasCityTileset", + "SolNode100": "CorpusGasCityTileset", + "SolNode101": "CorpusOutpostTileset", + "SolNode102": "CorpusShipTileset", + "SolNode103": "GrineerAsteroidTileset", + "SolNode104": "CorpusShipTileset", + "SolNode105": "GrineerOceanTilesetAnywhere", + "SolNode106": "GrineerSettlementTileset", + "SolNode107": "CorpusOutpostTileset", + "SolNode108": "GrineerAsteroidTileset", + "SolNode109": "CorpusOutpostTileset", + "SolNode11": "GrineerSettlementTileset", + "SolNode113": "GrineerSettlementTileset", + "SolNode118": "CorpusShipTileset", + "SolNode119": "GrineerAsteroidTileset", + "SolNode12": "GrineerAsteroidTileset", + "SolNode121": "CorpusGasCityTileset", + "SolNode122": "GrineerOceanTileset", + "SolNode123": "CorpusShipTileset", + "SolNode125": "CorpusGasCityTileset", + "SolNode126": "CorpusGasCityTileset", + "SolNode127": "CorpusShipTileset", + "SolNode128": "CorpusOutpostTileset", + "SolNode130": "GrineerAsteroidTileset", + "SolNode131": "GrineerShipyardsTileset", + "SolNode132": "GrineerShipyardsTileset", + "SolNode135": "GrineerGalleonTileset", + "SolNode137": "GrineerShipyardsTileset", + "SolNode138": "GrineerShipyardsTileset", + "SolNode139": "GrineerShipyardsTileset", + "SolNode14": "CorpusIcePlanetTilesetCaves", + "SolNode140": "GrineerShipyardsTileset", + "SolNode141": "GrineerShipyardsTileset", + "SolNode144": "GrineerShipyardsTileset", + "SolNode146": "GrineerAsteroidTileset", + "SolNode147": "GrineerShipyardsTileset", + "SolNode149": "GrineerShipyardsTileset", + "SolNode15": "GrineerGalleonTileset", + "SolNode16": "GrineerSettlementTileset", + "SolNode162": "InfestedCorpusShipTileset", + "SolNode164": "InfestedCorpusShipTileset", + "SolNode166": "InfestedCorpusShipTileset", + "SolNode17": "CorpusShipTileset", + "SolNode171": "InfestedCorpusShipTileset", + "SolNode172": "CorpusShipTileset", + "SolNode173": "InfestedCorpusShipTileset", + "SolNode175": "InfestedCorpusShipTileset", + "SolNode177": "GrineerGalleonTileset", + "SolNode18": "GrineerAsteroidTileset", + "SolNode181": "GrineerAsteroidTileset", + "SolNode184": "GrineerGalleonTileset", + "SolNode185": "GrineerGalleonTileset", + "SolNode187": "GrineerAsteroidTileset", + "SolNode188": "GrineerGalleonTileset", + "SolNode189": "GrineerGalleonTileset", + "SolNode19": "GrineerAsteroidTileset", + "SolNode191": "GrineerShipyardsTileset", + "SolNode193": "GrineerAsteroidTileset", + "SolNode195": "GrineerGalleonTileset", + "SolNode196": "GrineerGalleonTileset", + "SolNode2": "CorpusOutpostTileset", + "SolNode20": "GrineerGalleonTileset", + "SolNode203": "CorpusIcePlanetTileset", + "SolNode205": "CorpusIcePlanetTileset", + "SolNode209": "CorpusIcePlanetTileset", + "SolNode21": "CorpusOutpostTileset", + "SolNode210": "CorpusIcePlanetTileset", + "SolNode211": "CorpusIcePlanetTileset", + "SolNode212": "CorpusIcePlanetTileset", + "SolNode214": "CorpusIcePlanetTileset", + "SolNode215": "CorpusShipTileset", + "SolNode216": "CorpusIcePlanetTileset", + "SolNode217": "CorpusIcePlanetTileset", + "SolNode22": "CorpusOutpostTileset", + "SolNode220": "CorpusIcePlanetTileset", + "SolNode223": "GrineerAsteroidTileset", + "SolNode224": "GrineerGalleonTileset", + "SolNode225": "GrineerGalleonTileset", + "SolNode226": "GrineerGalleonTileset", + "SolNode228": "EidolonTileset", + "SolNode23": "CorpusShipTileset", + "SolNode24": "GrineerForestTileset", + "SolNode25": "CorpusGasCityTileset", + "SolNode26": "GrineerForestTileset", + "SolNode30": "GrineerSettlementTileset", + "SolNode300": "OrokinMoonTilesetGrineer", + "SolNode301": "OrokinMoonTilesetGrineer", + "SolNode302": "OrokinMoonTilesetCorpus", + "SolNode304": "OrokinMoonTilesetCorpus", + "SolNode305": "OrokinMoonTilesetGrineer", + "SolNode306": "OrokinMoonTilesetCorpus", + "SolNode307": "OrokinMoonTilesetCorpus", + "SolNode308": "OrokinMoonTilesetCorpus", + "SolNode31": "GrineerGalleonTileset", + "SolNode32": "GrineerGalleonTileset", + "SolNode36": "GrineerSettlementTileset", + "SolNode38": "CorpusOutpostTileset", + "SolNode39": "GrineerForestTileset", + "SolNode4": "CorpusShipTileset", + "SolNode400": "OrokinVoidTileset", + "SolNode401": "OrokinVoidTileset", + "SolNode402": "OrokinVoidTileset", + "SolNode403": "OrokinVoidTileset", + "SolNode404": "OrokinVoidTileset", + "SolNode405": "OrokinVoidTileset", + "SolNode406": "OrokinVoidTileset", + "SolNode407": "OrokinVoidTileset", + "SolNode408": "OrokinVoidTileset", + "SolNode409": "OrokinVoidTileset", + "SolNode41": "GrineerSettlementTileset", + "SolNode410": "OrokinVoidTileset", + "SolNode412": "OrokinVoidTileset", + "SolNode42": "GrineerGalleonTileset", + "SolNode43": "CorpusOutpostTileset", + "SolNode45": "GrineerSettlementTileset", + "SolNode46": "GrineerSettlementTileset", + "SolNode48": "CorpusOutpostTileset", + "SolNode49": "CorpusShipTileset", + "SolNode50": "GrineerAsteroidTileset", + "SolNode51": "CorpusOutpostTileset", + "SolNode53": "CorpusGasCityTileset", + "SolNode56": "CorpusShipTileset", + "SolNode57": "CorpusOutpostTileset", + "SolNode58": "GrineerSettlementTileset", + "SolNode59": "GrineerForestTileset", + "SolNode6": "CorpusOutpostTileset", + "SolNode61": "CorpusShipTileset", + "SolNode62": "CorpusIcePlanetTilesetCaves", + "SolNode64": "GrineerOceanTileset", + "SolNode66": "CorpusOutpostTileset", + "SolNode67": "GrineerAsteroidTileset", + "SolNode68": "GrineerGalleonTileset", + "SolNode70": "GrineerGalleonTileset", + "SolNode706": "OrokinDerelictTileset", + "SolNode707": "OrokinDerelictTileset", + "SolNode708": "OrokinDerelictTileset", + "SolNode709": "OrokinDerelictTileset", + "SolNode710": "OrokinDerelictTileset", + "SolNode711": "OrokinDerelictTileset", + "SolNode712": "OrokinDerelictTileset", + "SolNode713": "OrokinDerelictTileset", + "SolNode72": "CorpusOutpostTileset", + "SolNode73": "CorpusGasCityTileset", + "SolNode74": "CorpusGasCityTileset", + "SolNode741": "GrineerFortressTileset", + "SolNode742": "GrineerFortressTileset", + "SolNode743": "GrineerFortressTileset", + "SolNode744": "GrineerFortressTileset", + "SolNode745": "GrineerFortressTileset", + "SolNode746": "GrineerFortressTileset", + "SolNode747": "GrineerFortressTileset", + "SolNode748": "GrineerFortressTileset", + "SolNode75": "GrineerForestTileset", + "SolNode76": "CorpusShipTileset", + "SolNode78": "CorpusShipTileset", + "SolNode79": "GrineerForestTileset", + "SolNode81": "CorpusShipTileset", + "SolNode82": "GrineerGalleonTileset", + "SolNode84": "CorpusIcePlanetTilesetCaves", + "SolNode88": "CorpusShipTileset", + "SolNode93": "GrineerAsteroidTileset", + "SolNode96": "GrineerGalleonTileset", + "SolNode97": "CorpusGasCityTileset", + "SolNode99": "GrineerSettlementTileset" +} \ No newline at end of file