Fixes that brocks name is undefined (#967)

* Brock now has a name againg (we check if i18 is initialized before localising elite4,champs and gym leaders

* Removed console log
This commit is contained in:
Jannik Tappert 2024-05-16 13:10:20 +02:00 committed by GitHub
parent f1e97f3b38
commit 55105bf79a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -399,6 +399,9 @@ export class TrainerConfig {
}
initForGymLeader(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
if (!getIsInitialized()) {
initI18n();
}
this.setPartyTemplateFunc(getGymLeaderPartyTemplate);
signatureSpecies.forEach((speciesPool, s) => {
@ -431,7 +434,9 @@ export class TrainerConfig {
}
initForEliteFour(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
if (!getIsInitialized()) {
initI18n();
}
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
signatureSpecies.forEach((speciesPool, s) => {
@ -459,7 +464,9 @@ export class TrainerConfig {
}
initForChampion(signatureSpecies: (Species | Species[])[]): TrainerConfig {
if (!getIsInitialized()) {
initI18n();
}
this.setPartyTemplates(trainerPartyTemplates.CHAMPION);
signatureSpecies.forEach((speciesPool, s) => {
if (!Array.isArray(speciesPool))