mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 10:42:25 +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,
|
female?: boolean,
|
||||||
variant?: Variant
|
variant?: Variant
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PokedexMonContainer extends Phaser.GameObjects.Container {
|
export class PokedexMonContainer extends Phaser.GameObjects.Container {
|
||||||
public species: PokemonSpecies;
|
public species: PokemonSpecies;
|
||||||
public icon: Phaser.GameObjects.Sprite;
|
public icon: Phaser.GameObjects.Sprite;
|
||||||
|
@ -126,7 +126,7 @@ interface SpeciesDetails {
|
|||||||
shiny?: boolean,
|
shiny?: boolean,
|
||||||
formIndex?: number
|
formIndex?: number
|
||||||
female?: boolean,
|
female?: boolean,
|
||||||
variant?: number
|
variant?: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MenuOptions {
|
enum MenuOptions {
|
||||||
@ -2040,7 +2040,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
shiny: props.shiny,
|
shiny: props.shiny,
|
||||||
formIndex: props.formIndex,
|
formIndex: props.formIndex,
|
||||||
female: props.female,
|
female: props.female,
|
||||||
variant: props.variant
|
variant: props.variant,
|
||||||
});
|
});
|
||||||
this.pokemonSprite.setTint(0x808080);
|
this.pokemonSprite.setTint(0x808080);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ interface SpeciesDetails {
|
|||||||
female?: boolean,
|
female?: boolean,
|
||||||
variant?: Variant,
|
variant?: Variant,
|
||||||
abilityIndex?: number,
|
abilityIndex?: number,
|
||||||
natureIndex?: number
|
natureIndex?: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class PokedexUiHandler extends MessageUiHandler {
|
export default class PokedexUiHandler extends MessageUiHandler {
|
||||||
@ -215,7 +215,6 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
private showFormTrayLabel: Phaser.GameObjects.Text;
|
private showFormTrayLabel: Phaser.GameObjects.Text;
|
||||||
private canShowFormTray: boolean;
|
private canShowFormTray: boolean;
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super(Mode.POKEDEX);
|
super(Mode.POKEDEX);
|
||||||
}
|
}
|
||||||
@ -1740,7 +1739,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
return false;
|
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;
|
const changed = this.trayCursor !== cursor;
|
||||||
if (changed) {
|
if (changed) {
|
||||||
this.trayCursor = cursor;
|
this.trayCursor = cursor;
|
||||||
|
Loading…
Reference in New Issue
Block a user