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

This commit is contained in:
Jimmybald1 2025-02-15 02:23:14 +01:00
parent 3fd5414f5c
commit 0a7b2d6996
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 = "";
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);
}
});
}