From 4c8662a6685229d9286dd571e6eacd6e204996b1 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 18 Jun 2025 01:59:12 +0200 Subject: [PATCH 1/2] feat: xtra cheese rotation --- src/services/worldStateService.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 253bdc21..04876bd7 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1297,8 +1297,12 @@ export const getWorldState = (buildLabel?: string): IWorldState => { pushVoidStorms(worldState.VoidStorms, hour); } - // Sentient Anomaly cycling every 30 minutes + // Sentient Anomaly + Xtra Cheese cycles const halfHour = Math.trunc(timeMs / (unixTimesInMs.hour / 2)); + const hourInSeconds = 3600; + const cheeseInterval = hourInSeconds * 8; + const cheeseDuration = hourInSeconds * 2; + const cheeseIndex = Math.trunc(timeSecs / cheeseInterval); const tmp = { cavabegin: "1690761600", PurchasePlatformLockEnabled: true, @@ -1323,6 +1327,11 @@ export const getWorldState = (buildLabel?: string): IWorldState => { }, ennnd: true, mbrt: true, + fbst: { + a: cheeseIndex * cheeseInterval, + e: cheeseIndex * cheeseInterval + cheeseDuration, + n: (cheeseIndex + 1) * hourInSeconds * 8 + }, sfn: [550, 553, 554, 555][halfHour % 4] }; worldState.Tmp = JSON.stringify(tmp); -- 2.47.2 From 833d289ba0427fd38e5c57873ba2a3ce007cffea Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 18 Jun 2025 02:25:52 +0200 Subject: [PATCH 2/2] put this in code --- src/services/worldStateService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 04876bd7..a19abee5 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1328,7 +1328,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => { ennnd: true, mbrt: true, fbst: { - a: cheeseIndex * cheeseInterval, + a: cheeseIndex * cheeseInterval, // This has a bug where the client shows a negative time for "Xtra cheese starts in ..." until it refreshes the world state. This is because we're only providing the new activation as soon as that time/date is reached. However, this is 100% faithful to live. e: cheeseIndex * cheeseInterval + cheeseDuration, n: (cheeseIndex + 1) * hourInSeconds * 8 }, -- 2.47.2