From ae8add2f3cf893ae88a40f926e4362efa23bfd1f Mon Sep 17 00:00:00 2001 From: Jannik Tappert Date: Fri, 17 May 2024 22:19:23 +0200 Subject: [PATCH] So currently if you meet someone with a title it only shows there name and only then the title (not like trainer classes). So i wanted to change that --- src/data/trainer-config.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 712cd13a38d..9c3d3aabc1f 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -417,10 +417,8 @@ 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 const nameForCall = this.name.toLowerCase().replace(/\s/g, '_'); this.name = i18next.t(`trainerNames:${nameForCall}`); - - - - this.setTitle("gym_leader"); + this.name = `${i18next.t("titles:gym_leader")} ${this.name}`; + this.title = ""; this.setMoneyMultiplier(2.5); this.setBoss(); this.setStaticParty(); @@ -452,8 +450,8 @@ 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 const nameForCall = this.name.toLowerCase().replace(/\s/g, '_'); this.name = i18next.t(`trainerNames:${nameForCall}`); - - this.setTitle("elite_four"); + this.name = `${i18next.t("titles:elite_four")} ${this.name}`; + this.title = ""; this.setMoneyMultiplier(3.25); this.setBoss(); this.setStaticParty(); @@ -477,7 +475,8 @@ 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 const nameForCall = this.name.toLowerCase().replace(/\s/g, '_'); this.name = i18next.t(`trainerNames:${nameForCall}`); - this.setTitle("champion"); + this.name = `${i18next.t("titles:champion")} ${this.name}`; + this.title = ""; this.setMoneyMultiplier(10); this.setBoss(); this.setStaticParty();