[Misc] Added a Daily Run Seed Override to the overrides. Only works locally. (#5330)

* [Misc] Added a Daily Run Seed Override to the overrides. Only works locally.

* [Misc] Changed Daily Run Seed Override to string | null

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

---------

Co-authored-by: Jimmybald1 <147992650+IBBCalc@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: damocleas <damocleas25@gmail.com>
This commit is contained in:
Jimmybald1 2025-02-24 17:43:38 +01:00 committed by GitHub
parent 1c192d434b
commit 8f15788b39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,7 @@ class DefaultOverrides {
// -----------------
/** a specific seed (default: a random string of 24 characters) */
readonly SEED_OVERRIDE: string = "";
readonly DAILY_RUN_SEED_OVERRIDE: string | null = null;
readonly WEATHER_OVERRIDE: WeatherType = WeatherType.NONE;
/**
* If `null`, ignore this override.

View File

@ -21,6 +21,7 @@ import { SelectChallengePhase } from "./select-challenge-phase";
import { SelectStarterPhase } from "./select-starter-phase";
import { SummonPhase } from "./summon-phase";
import { globalScene } from "#app/global-scene";
import Overrides from "#app/overrides";
export class TitlePhase extends Phase {
@ -256,7 +257,11 @@ export class TitlePhase extends Phase {
console.error("Failed to load daily run:\n", err);
});
} else {
generateDaily(btoa(new Date().toISOString().substring(0, 10)));
let seed: string = btoa(new Date().toISOString().substring(0, 10));
if (!Utils.isNullOrUndefined(Overrides.DAILY_RUN_SEED_OVERRIDE)) {
seed = Overrides.DAILY_RUN_SEED_OVERRIDE;
}
generateDaily(seed);
}
});
}