[Dev] Fixed biome override not working for Daily Mode (#5776)

This commit is contained in:
Jimmybald1 2025-05-30 05:39:55 +02:00 committed by GitHub
parent 14e01c3da1
commit ff6f9131ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import type PokemonSpecies from "./data/pokemon-species";
import { allSpecies } from "./data/pokemon-species";
import type { Arena } from "./field/arena";
import Overrides from "#app/overrides";
import { randSeedInt, randSeedItem } from "#app/utils/common";
import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common";
import { Biome } from "#enums/biome";
import { Species } from "#enums/species";
import { Challenges } from "./enums/challenges";
@ -124,16 +124,20 @@ export class GameMode implements GameModeConfig {
/**
* @returns either:
* - random biome for Daily mode
* - override from overrides.ts
* - random biome for Daily mode
* - Town
*/
getStartingBiome(): Biome {
if (!isNullOrUndefined(Overrides.STARTING_BIOME_OVERRIDE)) {
return Overrides.STARTING_BIOME_OVERRIDE;
}
switch (this.modeId) {
case GameModes.DAILY:
return getDailyStartingBiome();
default:
return Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN;
return Biome.TOWN;
}
}

View File

@ -73,7 +73,7 @@ class DefaultOverrides {
*/
readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null;
readonly STARTING_WAVE_OVERRIDE: number = 0;
readonly STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
readonly STARTING_BIOME_OVERRIDE: Biome | null = null;
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
readonly XP_MULTIPLIER_OVERRIDE: number | null = null;