Cleared up comments

This commit is contained in:
Wlowscha 2025-01-25 11:02:41 +01:00
parent 776d48ff50
commit 7a2f7c4803
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -734,8 +734,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
/** /**
* Check whether a given form is caught for a given species. * Check whether a given form is caught for a given species.
* All forms that can be reached through a form change during battle * All forms that can be reached through a form change during battle are considered caught and show up in the dex as such.
* are considered caught and show up in the dex as such.
* *
* @param otherSpecies The species to check; defaults to current species * @param otherSpecies The species to check; defaults to current species
* @param otherFormIndex The form index of the form to check; defaults to current form * @param otherFormIndex The form index of the form to check; defaults to current form
@ -849,6 +848,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
return globalScene.candyUpgradeNotification !== 0 && globalScene.candyUpgradeDisplay === 1; return globalScene.candyUpgradeNotification !== 0 && globalScene.candyUpgradeDisplay === 1;
} }
/**
* If the pokemon is an evolution, find speciesId of its starter.
* @param speciesId the id of the species to check
* @returns the id of the corresponding starter
*/
getStarterSpeciesId(speciesId): number { getStarterSpeciesId(speciesId): number {
if (globalScene.gameData.starterData.hasOwnProperty(speciesId)) { if (globalScene.gameData.starterData.hasOwnProperty(speciesId)) {
return speciesId; return speciesId;
@ -865,6 +869,13 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
} }
} }
/**
* Assign a form string to a given species and form
* @param formKey the form to format
* @param species the species to format
* @param speciesId whether the name of the species should be shown at the end
* @returns the formatted string
*/
getFormString(formKey: string, species: PokemonSpecies, append: boolean = false): string { getFormString(formKey: string, species: PokemonSpecies, append: boolean = false): string {
let label: string; let label: string;
const formText = capitalizeString(formKey, "-", false, false) ?? ""; const formText = capitalizeString(formKey, "-", false, false) ?? "";
@ -883,6 +894,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
return label; return label;
} }
/**
* Find the name of the region for regional species
* @param species the species to check
* @returns a string with the region name
*/
getRegionName(species: PokemonSpecies): string { getRegionName(species: PokemonSpecies): string {
const name = species.name; const name = species.name;
const label = Species[species.speciesId]; const label = Species[species.speciesId];
@ -2251,8 +2267,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
/** /**
* Creates a temporary dex attr props that will be used to check whether a pokemon is valid for a challenge * Creates a temporary dex attr props that will be used to display the correct shiny, variant, and form based on this.starterAttributes
* and to display the correct shiny, variant, and form based on this.starterAttributes
* *
* @param speciesId the id of the species to get props for * @param speciesId the id of the species to get props for
* @returns the dex props * @returns the dex props