Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak: Reset trade item cycling when pausing or changing pages #2808

Merged
merged 2 commits into from
May 4, 2023

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Apr 30, 2023

We have flags that track when the player is in a "trade item cycling" mode for adult/child trade items. This mode is unset if you press A again, or equip the item to a C-button. However, if you press B or Start to unpause while mid-cycling, the next time you pause you are still in the cycling state.

I added a method that is called at beginning of the pause init flow that will manually set these flags back to false to address this. I also call this method when the kelido page is switched left or right.

Fixes #2794

Build Artifacts

Copy link
Contributor

@inspectredc inspectredc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal but for me it feels safer to have the function be implemented on the save opening update (func_808265BC) in case of any issue the menu has when closing.

@Archez
Copy link
Contributor Author

Archez commented May 1, 2023

Not a big deal but for me it feels safer to have the function be implemented on the save opening update (func_808265BC) in case of any issue the menu has when closing.

That's a good point. Can't think of a situation where that would fail, but easy enough to move anyways.
I moved the call from state == 0x13 to state == 3 which is the PAUSE_STATE_INIT. The method you mentioned is called in state == 4 and state == 5 which runs for multiple frames and maps to PAUSE_STATE_OPENING1 and PAUSE_STATE_OPENING2

@Archez Archez changed the title Tweak: Reset trade item cycling when unpausing Tweak: Reset trade item cycling when pausing or changing pages May 1, 2023
Copy link
Contributor

@inspectredc inspectredc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pause state 3 definitely makes more sense yea

@leggettc18 leggettc18 merged commit f81b042 into HarbourMasters:develop-spock May 4, 2023
7 checks passed
@Archez Archez deleted the reset-trade-select branch May 4, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants