mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
Brock now has a name againg (we check if i18 is initialized before localising elite4,champs and gym leaders
This commit is contained in:
parent
7f003d46ca
commit
2397b9d65f
@ -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) => {
|
||||||
@ -413,7 +416,9 @@ export class TrainerConfig {
|
|||||||
|
|
||||||
// Handle name by checking this.name - making it lowercase and replacing spaces with underscores and then calling i18next.t with the name
|
// Handle name by checking this.name - making it lowercase and replacing spaces with underscores and then calling i18next.t with the name
|
||||||
const nameForCall = this.name.toLowerCase().replace(/\s/g, '_');
|
const nameForCall = this.name.toLowerCase().replace(/\s/g, '_');
|
||||||
|
console.log(nameForCall)
|
||||||
this.name = i18next.t(`trainerNames:${nameForCall}`);
|
this.name = i18next.t(`trainerNames:${nameForCall}`);
|
||||||
|
console.log(this.name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -431,7 +436,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 +466,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
Block a user