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:
parent
f1e97f3b38
commit
55105bf79a
|
@ -399,6 +399,9 @@ export class TrainerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
initForGymLeader(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
|
initForGymLeader(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
|
||||||
|
if (!getIsInitialized()) {
|
||||||
|
initI18n();
|
||||||
|
}
|
||||||
|
|
||||||
this.setPartyTemplateFunc(getGymLeaderPartyTemplate);
|
this.setPartyTemplateFunc(getGymLeaderPartyTemplate);
|
||||||
signatureSpecies.forEach((speciesPool, s) => {
|
signatureSpecies.forEach((speciesPool, s) => {
|
||||||
|
@ -431,7 +434,9 @@ export class TrainerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
initForEliteFour(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
|
initForEliteFour(signatureSpecies: (Species | Species[])[], ...specialtyTypes: Type[]): TrainerConfig {
|
||||||
|
if (!getIsInitialized()) {
|
||||||
|
initI18n();
|
||||||
|
}
|
||||||
|
|
||||||
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
|
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
|
||||||
signatureSpecies.forEach((speciesPool, s) => {
|
signatureSpecies.forEach((speciesPool, s) => {
|
||||||
|
@ -459,7 +464,9 @@ export class TrainerConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
initForChampion(signatureSpecies: (Species | Species[])[]): TrainerConfig {
|
initForChampion(signatureSpecies: (Species | Species[])[]): TrainerConfig {
|
||||||
|
if (!getIsInitialized()) {
|
||||||
|
initI18n();
|
||||||
|
}
|
||||||
this.setPartyTemplates(trainerPartyTemplates.CHAMPION);
|
this.setPartyTemplates(trainerPartyTemplates.CHAMPION);
|
||||||
signatureSpecies.forEach((speciesPool, s) => {
|
signatureSpecies.forEach((speciesPool, s) => {
|
||||||
if (!Array.isArray(speciesPool))
|
if (!Array.isArray(speciesPool))
|
||||||
|
|
Loading…
Reference in New Issue