Make Title Case

pull/446/head
Benjamin Odom 2024-05-03 22:51:52 -05:00
parent 8c2fb66d99
commit 5141a239ec
1 changed files with 7 additions and 1 deletions

View File

@ -1530,7 +1530,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.starterMoveset.push(...availableStarterMoves.filter(sm => this.starterMoveset.indexOf(sm) === -1).slice(0, 4 - this.starterMoveset.length)); this.starterMoveset.push(...availableStarterMoves.filter(sm => this.starterMoveset.indexOf(sm) === -1).slice(0, 4 - this.starterMoveset.length));
const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex); const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex);
this.pokemonFormText.setText(species?.forms[formIndex]?.formKey.toLocaleUpperCase());
const formText = species?.forms[formIndex]?.formKey.split('-');
for (let i = 0; i < formText?.length; i++)
formText[i] = formText[i].charAt(0).toUpperCase() + formText[i].substring(1);
this.pokemonFormText.setText(formText?.join(' '));
this.setTypeIcons(speciesForm.type1, speciesForm.type2); this.setTypeIcons(speciesForm.type1, speciesForm.type2);
} else { } else {
this.pokemonAbilityText.setText(''); this.pokemonAbilityText.setText('');