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

Only unpause music after playing game if it was automatically paused #359

Closed
wants to merge 3 commits into from

Conversation

jerith
Copy link

@jerith jerith commented Apr 14, 2023

This implements the non-persistent half of #34, because having the music turn back on after quitting the game was irritating me.

Disclaimer: It's been a couple of years since I've written any Rust code, so this probably isn't the most elegant implementation.

There don't seem to be any automated tests, so I tested manually by starting and quitting a game with the music playing, which correctly paused and then unpaused the music, then pausing the music and starting and quitting a game, which correctly left the music paused.

@jerith
Copy link
Author

jerith commented Apr 14, 2023

Having two slightly different copies of the music state update logic was bothering me, so I factored it out into a method on MusicCommand. The same manual test I did earlier still passes.

@MCOfficer
Copy link
Member

ended up using #360 instead, sorry for the radio silence

@MCOfficer MCOfficer closed this Nov 14, 2023
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.

2 participants