From f6265d57ec297984d1ce8b03e5e8cc255cbab34f Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Sat, 11 Jan 2025 23:01:33 +0100 Subject: [PATCH] feat: Sentient Anomaly rotation (#759) Co-authored-by: Sainan --- .../dynamic/worldStateController.ts | 32 +++++++++++++++++++ .../worldState/worldState.json | 3 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index 4dc8ec095..a102caf0b 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,36 @@ 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, + 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, 553, 554, 555][halfHour % 4] + }; + worldState.Tmp = JSON.stringify(tmp); + res.json(worldState); }; @@ -107,6 +138,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 bde87f8a2..f37f77fe9 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}" + ] }