mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 02:32:21 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
32422a46b5
commit
b390324507
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user