Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Wlowscha 2025-02-09 02:56:13 +01:00 committed by GitHub
parent 32422a46b5
commit b390324507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -11,6 +11,7 @@ interface SpeciesDetails {
female?: boolean,
variant?: Variant
}
export class PokedexMonContainer extends Phaser.GameObjects.Container {
public species: PokemonSpecies;
public icon: Phaser.GameObjects.Sprite;

View File

@ -126,7 +126,7 @@ interface SpeciesDetails {
shiny?: boolean,
formIndex?: number
female?: boolean,
variant?: number
variant?: number,
}
enum MenuOptions {
@ -2040,7 +2040,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
shiny: props.shiny,
formIndex: props.formIndex,
female: props.female,
variant: props.variant
variant: props.variant,
});
this.pokemonSprite.setTint(0x808080);
}

View File

@ -136,7 +136,7 @@ interface SpeciesDetails {
female?: boolean,
variant?: Variant,
abilityIndex?: number,
natureIndex?: number
natureIndex?: number,
}
export default class PokedexUiHandler extends MessageUiHandler {
@ -215,7 +215,6 @@ export default class PokedexUiHandler extends MessageUiHandler {
private showFormTrayLabel: Phaser.GameObjects.Text;
private canShowFormTray: boolean;
constructor() {
super(Mode.POKEDEX);
}
@ -1740,7 +1739,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
return false;
}
cursor = Math.max(Math.min(this.trayContainers.length - 1, cursor), 0);
cursor = Phaser.Math.Clamp(this.trayContainers.length - 1, cursor, 0);
const changed = this.trayCursor !== cursor;
if (changed) {
this.trayCursor = cursor;