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

onSquadSelectionPageChanged triggers when the in-game inventory is scrollable #216

Open
Ishigh1 opened this issue Jul 12, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Ishigh1
Copy link

Ishigh1 commented Jul 12, 2023

I don't have much else to explain, the title says a lot, to reproduce the issue, subscribe to onSquadSelectionPageChanged, start a new game, immediately go unequip the pilot and weapon from your first mech, do the same for the second, onSquadSelectionPageChanged should trigger as soon as your inventory has 4 items, with a current_page value of 2 (didn't test much more because my hook is pretty destructive)

@Lemonymous Lemonymous added the bug Something isn't working label Jul 12, 2023
@Lemonymous
Copy link
Contributor

Can the two different menus this event triggers in be distinguished by being in a run vs not being in a run?
If so, we could just add if not Game before dispatching the event.

@KnightMiner
Copy link
Member

KnightMiner commented Jul 12, 2023

onSquadSelectionPageChanged is triggered based on a certain text appearing and changing, is probably a better idea to just condition on one of our other hanger events, such as the method that checks if you are in the hangar. If that is misfiring, we have bigger problems.

I do believe the squad selection screen also shows on the statistics page, so whatever fix we use needs to work there too. Might be as simple as conditioning on the squad selection page open boolean (which again is something that needs to be fixed if its broken)

@Lemonymous
Copy link
Contributor

That is why I suggested doing the conditional on something very fundamental as Game.
That is definitely nil outside of runs, and definitely non-nil during a run.
Conditioning it on something more specific only begs for more testing, to make sure we didn't forget something.
If you feel like doing the testing however, by all means. It could be fixed in a number of ways.

@KnightMiner
Copy link
Member

The reason I suggest something more specific is because if the more specific thing is also broken, we have bigger issues. Its easy enough to check a boolean function in 3 screens so the testing burden is not that much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants