[Bug] Prevent some corrupt eggs from crashing the game

If an egg is somehow a species that doesn't have an associated egg tier
(such as Pikachu), `Egg#getEggTier` now falls back to `EggTier.COMMON`
This commit is contained in:
NightKev 2025-05-06 04:18:06 -07:00
parent 3ba1ed3fb4
commit 99e480f7c0

View File

@ -598,7 +598,7 @@ export class Egg {
}
private getEggTier(): EggTier {
return speciesEggTiers[this.species];
return speciesEggTiers[this.species] ?? EggTier.COMMON;
}
////