[QoL] Sort items on summary screen (#1880)
This commit is contained in:
parent
f3de114d2b
commit
17edaeb708
|
@ -22,6 +22,8 @@ import { Variant, getVariantTint } from "#app/data/variant";
|
|||
import {Button} from "../enums/buttons";
|
||||
import { Ability } from "../data/ability.js";
|
||||
import i18next from "i18next";
|
||||
import {modifierSortFunc} from "../modifier/modifier";
|
||||
|
||||
|
||||
enum Page {
|
||||
PROFILE,
|
||||
|
@ -828,8 +830,9 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
statsContainer.add(statValue);
|
||||
});
|
||||
|
||||
const itemModifiers = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier
|
||||
&& (m as PokemonHeldItemModifier).pokemonId === this.pokemon.id, true) as PokemonHeldItemModifier[];
|
||||
const itemModifiers = (this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier
|
||||
&& (m as PokemonHeldItemModifier).pokemonId === this.pokemon.id, true) as PokemonHeldItemModifier[])
|
||||
.sort(modifierSortFunc);
|
||||
|
||||
itemModifiers.forEach((item, i) => {
|
||||
const icon = item.getIcon(this.scene, true);
|
||||
|
|
Loading…
Reference in New Issue