fix: 1999 calendar not working properly #777

Merged
Sainan merged 2 commits from 1999-calendar into main 2025-01-12 19:17:06 -08:00
Showing only changes of commit d92f96cef1 - Show all commits

View File

@ -88,7 +88,7 @@ export const worldStateController: RequestHandler = (req, res) => {
][week % 8] ][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].Activation = { $date: { $numberLong: weekStart.toString() } };
worldState.KnownCalendarSeasons[0].Expiry = { $date: { $numberLong: weekEnd.toString() } }; worldState.KnownCalendarSeasons[0].Expiry = { $date: { $numberLong: weekEnd.toString() } };
worldState.KnownCalendarSeasons[0].Season = ["CST_WINTER", "CST_SPRING", "CST_SUMMER", "CST_FALL"][week % 4]; 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, static1999SummerDays,
static1999FallDays static1999FallDays
][week % 4]; ][week % 4];
worldState.KnownCalendarSeasons[0].YearIteration = Math.trunc(week / 4);
// Sentient Anomaly cycling every 30 minutes // Sentient Anomaly cycling every 30 minutes
const halfHour = Math.trunc(new Date().getTime() / (unixTimesInMs.hour / 2)); const halfHour = Math.trunc(new Date().getTime() / (unixTimesInMs.hour / 2));
@ -175,4 +176,5 @@ interface ICalendarSeason {
Days: { Days: {
day: number; day: number;
}[]; }[];
YearIteration: number;
} }