From d0792fbf8eccd80c3428ea0c0dafe8d929ecbe08 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:05:20 +0200 Subject: [PATCH] say what constraints exactly --- src/services/worldStateService.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index a3ec1bfa..dbd021f5 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1038,13 +1038,13 @@ const pushVoidStorms = (arr: IVoidStorm[], hour: number): void => { }; interface ITimeConstraint { - //name: string; + name: string; isValidTime: (timeSecs: number) => boolean; getIdealTimeBefore: (timeSecs: number) => number; } const eidolonDayConstraint: ITimeConstraint = { - //name: "eidolon day", + name: "eidolon day", isValidTime: (timeSecs: number): boolean => { const eidolonEpoch = 1391992660; const eidolonCycle = Math.trunc((timeSecs - eidolonEpoch) / 9000); @@ -1062,7 +1062,7 @@ const eidolonDayConstraint: ITimeConstraint = { }; const eidolonNightConstraint: ITimeConstraint = { - //name: "eidolon night", + name: "eidolon night", isValidTime: (timeSecs: number): boolean => { const eidolonEpoch = 1391992660; const eidolonCycle = Math.trunc((timeSecs - eidolonEpoch) / 9000); @@ -1089,7 +1089,7 @@ const eidolonNightConstraint: ITimeConstraint = { }; const venusColdConstraint: ITimeConstraint = { - //name: "venus cold", + name: "venus cold", isValidTime: (timeSecs: number): boolean => { const vallisEpoch = 1541837628; const vallisCycle = Math.trunc((timeSecs - vallisEpoch) / 1600); @@ -1115,7 +1115,7 @@ const venusColdConstraint: ITimeConstraint = { }; const venusWarmConstraint: ITimeConstraint = { - //name: "venus warm", + name: "venus warm", isValidTime: (timeSecs: number): boolean => { const vallisEpoch = 1541837628; const vallisCycle = Math.trunc((timeSecs - vallisEpoch) / 1600); @@ -1321,7 +1321,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => { }); } else { constraints.push({ - //name: `duviri ${config.worldState.duviriOverride}`, + name: `duviri ${config.worldState.duviriOverride}`, isValidTime: (timeSecs: number): boolean => { const moodIndex = Math.trunc(timeSecs / 7200); return moodIndex % 5 == desiredMood; @@ -1339,7 +1339,9 @@ export const getWorldState = (buildLabel?: string): IWorldState => { if (constraints.length != 0) { const delta = Math.trunc(Date.now() / 1000) - timeSecs; if (delta != 0) { - logger.debug(`reported time is ${delta} seconds behind real time to satisfy selected constraints`); + logger.debug( + `reported time is ${delta} seconds behind real time to satisfy selected constraints (${constraints.map(x => x.name).join(", ")})` + ); } } const timeMs = timeSecs * 1000;