From d92f96cef1253a49585c1b94cf3a03d3e565b811 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 13 Jan 2025 03:39:32 +0100 Subject: [PATCH] feat: YearIteration cycling every 4 weeks --- src/controllers/dynamic/worldStateController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index 7fdd7053..94b6c59a 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -88,7 +88,7 @@ export const worldStateController: RequestHandler = (req, res) => { ][week % 8] }); - // 1999 Calendar Season cycling every week + // 1999 Calendar Season cycling every week + YearIteration every 4 weeks worldState.KnownCalendarSeasons[0].Activation = { $date: { $numberLong: weekStart.toString() } }; worldState.KnownCalendarSeasons[0].Expiry = { $date: { $numberLong: weekEnd.toString() } }; worldState.KnownCalendarSeasons[0].Season = ["CST_WINTER", "CST_SPRING", "CST_SUMMER", "CST_FALL"][week % 4]; @@ -98,6 +98,7 @@ export const worldStateController: RequestHandler = (req, res) => { static1999SummerDays, static1999FallDays ][week % 4]; + worldState.KnownCalendarSeasons[0].YearIteration = Math.trunc(week / 4); // Sentient Anomaly cycling every 30 minutes const halfHour = Math.trunc(new Date().getTime() / (unixTimesInMs.hour / 2)); @@ -175,4 +176,5 @@ interface ICalendarSeason { Days: { day: number; }[]; + YearIteration: number; }