[Bug] Caught Pokemon Summary-Modifier Display Fix (#3145)
* Fixed modifiers not displaying on summary screen * Addressed Typedoc issues * Documentation added --------- Co-authored-by: Frutescens <info@laptop>
This commit is contained in:
parent
a604e00369
commit
233c926721
|
@ -5039,7 +5039,7 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||
promptRelease();
|
||||
});
|
||||
});
|
||||
}, false);
|
||||
}, () => {
|
||||
this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (slotIndex: integer, _option: PartyOption) => {
|
||||
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||
|
|
|
@ -93,6 +93,8 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
private moveCursorBlinkTimer: Phaser.Time.TimerEvent;
|
||||
|
||||
private pokemon: PlayerPokemon;
|
||||
private playerParty: boolean;
|
||||
/**This is set to false when checking the summary of a freshly caught Pokemon as it is not part of a player's party yet but still needs to display its items**/
|
||||
private newMove: Move;
|
||||
private moveSelectFunction: Function;
|
||||
private transitioning: boolean;
|
||||
|
@ -270,9 +272,16 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
show(args: any[]): boolean {
|
||||
super.show(args);
|
||||
|
||||
/* args[] information
|
||||
* args[0] : the Pokemon displayed in the Summary-UI
|
||||
* args[1] : the summaryUiMode (defaults to 0)
|
||||
* args[2] : the start page (defaults to Page.PROFILE)
|
||||
* args[3] : contains the function executed when the user exits out of Summary UI
|
||||
* args[4] : optional boolean used to determine if the Pokemon is part of the player's party or not (defaults to true, necessary for PR #2921 to display all relevant information)
|
||||
*/
|
||||
this.pokemon = args[0] as PlayerPokemon;
|
||||
this.summaryUiMode = args.length > 1 ? args[1] as SummaryUiMode : SummaryUiMode.DEFAULT;
|
||||
|
||||
this.playerParty = args[4] ?? true;
|
||||
this.scene.ui.bringToTop(this.summaryContainer);
|
||||
|
||||
this.summaryContainer.setVisible(true);
|
||||
|
@ -853,7 +862,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||
});
|
||||
|
||||
const itemModifiers = (this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier
|
||||
&& m.pokemonId === this.pokemon.id, true) as PokemonHeldItemModifier[])
|
||||
&& m.pokemonId === this.pokemon.id, this.playerParty) as PokemonHeldItemModifier[])
|
||||
.sort(modifierSortFunc);
|
||||
|
||||
itemModifiers.forEach((item, i) => {
|
||||
|
|
Loading…
Reference in New Issue