From 954367d3dfad1221f5ce654f0cea15b5fbf91084 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 10 Jan 2025 06:15:58 +0100 Subject: [PATCH] fix: NodeOverrides growing with every worldState request --- src/controllers/dynamic/worldStateController.ts | 6 +----- static/fixed_responses/worldState.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index d796a075..8ad722be 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -17,11 +17,7 @@ export const worldStateController: RequestHandler = (req, res) => { const week = Math.trunc(new Date().getTime() / 604800000); // Elite Sanctuary Onslaught cycling every week - worldState.NodeOverrides.push({ - _id: { $oid: "5ad9f9bb6df82a56eabf3d44" }, - Node: "SolNode802", - Seed: week // unfaithful - }); + worldState.NodeOverrides.find(x => x.Node == "SolNode802")!.Seed = week; // unfaithful // Holdfast, Cavia, & Hex bounties cycling every 2.5 hours; unfaithful implementation const bountyCycle = Math.trunc(new Date().getTime() / 9000000); diff --git a/static/fixed_responses/worldState.json b/static/fixed_responses/worldState.json index a3768ffc..bde87f8a 100644 --- a/static/fixed_responses/worldState.json +++ b/static/fixed_responses/worldState.json @@ -690,6 +690,7 @@ { "_id": { "$oid": "549b18e9b029cef5991d6aec" }, "Node": "EuropaHUB", "Hide": true }, { "_id": { "$oid": "54a1737aeb658f6cbccf70ff" }, "Node": "ErisHUB", "Hide": true }, { "_id": { "$oid": "54a736ddec12f80bd6e9e326" }, "Node": "VenusHUB", "Hide": true }, + { "_id": { "$oid": "5ad9f9bb6df82a56eabf3d44" }, "Node": "SolNode802", "Seed": 9969639 }, { "_id": { "$oid": "5b8817c2bd4f253264d6aa91" }, "Node": "EarthHUB",