mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
fixed CN affixes inversion (double inversion…)
(cherry picked from commit 22a030675a
)
This commit is contained in:
parent
f885a54be4
commit
521c23401b
@ -53,15 +53,34 @@ export function getPokemonSpeciesForm(species: Species, formIndex: integer): Pok
|
||||
export function getFusedSpeciesName(speciesA: PokemonSpecies, speciesB: PokemonSpecies): string {
|
||||
let firstKey = "fusionPrefix";
|
||||
let secondKey = "fusionSuffix";
|
||||
|
||||
const shouldReverse = i18next.t("fusionAffixes:shouldReverse");
|
||||
console.log(`shouldReverse: ${shouldReverse}`); // logs the value of shouldReverse
|
||||
|
||||
if (i18next.t("fusionAffixes:shouldReverse") === "true") {
|
||||
|
||||
firstKey = "fusionSuffix";
|
||||
secondKey = "fusionPrefix";
|
||||
|
||||
console.log(`firstKey: ${firstKey}, secondKey: ${secondKey}`); // logs the values of firstKey and secondKey
|
||||
}
|
||||
|
||||
const prefix = i18next.t(`fusionAffixes:${Species[speciesA.speciesId].toLowerCase()}.${firstKey}`);
|
||||
const suffix = i18next.t(`fusionAffixes:${Species[speciesB.speciesId].toLowerCase()}.${secondKey}`);
|
||||
const radKey = i18next.t(`fusionAffixes:${Species[speciesA.speciesId].toLowerCase()}.${firstKey}`);
|
||||
const desKey = i18next.t(`fusionAffixes:${Species[speciesB.speciesId].toLowerCase()}.${secondKey}`);
|
||||
|
||||
return `${prefix}${suffix}`;
|
||||
let prefix = radKey;
|
||||
let suffix = desKey;
|
||||
|
||||
if (i18next.t("fusionAffixes:shouldReverse") === "true") {
|
||||
prefix = desKey;
|
||||
suffix = radKey;
|
||||
}
|
||||
|
||||
console.log(`prefix: ${prefix}, suffix: ${suffix}`); // logs the values of prefix and suffix
|
||||
|
||||
const fusedName =`${prefix}${suffix}`;
|
||||
|
||||
return fusedName;
|
||||
}
|
||||
|
||||
export type PokemonSpeciesFilter = (species: PokemonSpecies) => boolean;
|
||||
|
@ -10,7 +10,7 @@ export interface SimpleTranslationEntries {
|
||||
}
|
||||
|
||||
export interface FusionTranslationEntries {
|
||||
shouldReverse: string,
|
||||
shouldReverse?: string,
|
||||
[key: string]: FusionTranslationEntry | string,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user