From e343bcdcbad74478d097b6979427fd7e506cfc0c Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:35:44 +0100 Subject: [PATCH] feat: Sentient Anomaly rotation --- src/controllers/dynamic/worldStateController.ts | 14 ++++++++++++++ static/fixed_responses/worldState/worldState.json | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index 4dc8ec09..d89e5afe 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -6,6 +6,7 @@ import static1999SummerDays from "@/static/fixed_responses/worldState/1999_summe import static1999WinterDays from "@/static/fixed_responses/worldState/1999_winter_days.json"; import { buildConfig } from "@/src/services/buildConfigService"; import { IMongoDate, IOid } from "@/src/types/commonTypes"; +import { unixTimesInMs } from "@/src/constants/timeConstants"; export const worldStateController: RequestHandler = (req, res) => { const worldState: IWorldState = { @@ -97,6 +98,18 @@ export const worldStateController: RequestHandler = (req, res) => { static1999FallDays ][week % 4]; + // Sentient Anomaly cycling every 30 minutes + const halfHour = Math.trunc(new Date().getTime() / (unixTimesInMs.hour / 2)); + const tmp = { + cavabegin: "1690761600", + PurchasePlatformLockEnabled: true, + tcsn: true, + ennnd: true, + mbrt: true, + sfn: [550, 553, 554, 555][halfHour % 4] + }; + worldState.Tmp = JSON.stringify(tmp); + res.json(worldState); }; @@ -107,6 +120,7 @@ interface IWorldState { NodeOverrides: INodeOverride[]; EndlessXpChoices: IEndlessXpChoice[]; KnownCalendarSeasons: ICalendarSeason[]; + Tmp?: string; } interface ISyndicateMission { diff --git a/static/fixed_responses/worldState/worldState.json b/static/fixed_responses/worldState/worldState.json index bde87f8a..f37f77fe 100644 --- a/static/fixed_responses/worldState/worldState.json +++ b/static/fixed_responses/worldState/worldState.json @@ -1261,6 +1261,5 @@ "Version": 17, "UpgradeAvaliabilityRequirements": ["/Lotus/Upgrades/Calendar/1999UpgradeApplicationRequirement"] } - ], - "Tmp": "{\"cavabegin\":\"1690761600\",\"PurchasePlatformLockEnabled\":true,\"tcsn\":true,\"pgr\":{\"ts\":\"1732572900\",\"en\":\"CUSTOM DECALS @ ZEVILA\",\"fr\":\"DECALS CUSTOM @ ZEVILA\",\"it\":\"DECALCOMANIE PERSONALIZZATE @ ZEVILA\",\"de\":\"AUFKLEBER NACH WUNSCH @ ZEVILA\",\"es\":\"CALCOMANÍAS PERSONALIZADAS @ ZEVILA\",\"pt\":\"DECALQUES PERSONALIZADOS NA ZEVILA\",\"ru\":\"ПОЛЬЗОВАТЕЛЬСКИЕ НАКЛЕЙКИ @ ЗеВиЛа\",\"pl\":\"NOWE NAKLEJKI @ ZEVILA\",\"uk\":\"КОРИСТУВАЦЬКІ ДЕКОЛІ @ ЗІВІЛА\",\"tr\":\"ÖZEL ÇIKARTMALAR @ ZEVILA\",\"ja\":\"カスタムデカール @ ゼビラ\",\"zh\":\"定制贴花认准泽威拉\",\"ko\":\"커스텀 데칼 @ ZEVILA\",\"tc\":\"自訂貼花 @ ZEVILA\",\"th\":\"รูปลอกสั่งทำที่ ZEVILA\"},\"ennnd\":true,\"mbrt\":true,\"sfn\":550}" + ] }