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

Add a new javascript event for when Attract Mode is about to select a new game #224

Open
mjrgh opened this issue Oct 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mjrgh
Copy link
Owner

mjrgh commented Oct 15, 2023

When attract mode is in effect, it automatically switches the wheel to a new game every so often. Currently, Attract Mode chooses the new game to switch to by picking a random number (1 to 10) and advancing that many slots forward on the wheel from the current game. It would be nice to have a way to override the default selection, so that you could use a custom algorithm for selecting the new game. The most general approach I see is to create a new Javascript event that fires when Attract Mode has made its random selection and is about to switch to a new game. The new event ("attractmodeselectgame", maybe) should have a 'game' property in the event object specifying the new game that the built-in random number mechanism selected, and the event handler should be able to override the default selection by changing the 'game' property to the desired game to use instead. Canceling the event should probably prevent the switch from happening at all.

@mjrgh mjrgh added the enhancement New feature or request label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant