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

Various fixes + last game bugfix #6

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Tempystral
Copy link

@Tempystral Tempystral commented Oct 24, 2020

I started poking around to make my own additions, and performed some code cleanup to make the script easier to work with.
Highlights:

  • Seed is now loaded from getSettings() function correctly
  • Redundant or unnecessary variables removed
  • Made global variables local where possible
  • Moved some boilerplate code to functions
  • Added comments
  • Removed the "DeleteMe" files, as they seemed to break things more than help. If you want me to change this back, let me know.

Moevd globals to locals where required, added comments
Made the countdown and buffer defaults unambiguous, cleaned up their init checks. Also put buffer init into a function.
As far as I can tell it doesn't do anything.
Changed globals to locals where possible, made default timeLimit clearer
Made seed global, allowing settingsValue to become local. Made other variables local as well. Seed is now retrieved in the getSettings function.
@Tempystral Tempystral changed the title Code cleanup for workability Make variables local where possible, load seed from getSettings() Oct 25, 2020
Fixed bugs in nextGame() function.
- Removing all but one game now works correctly in all conditions
- States are no longer saved and loaded when there is one game left and it has not changed
@Tempystral Tempystral changed the title Make variables local where possible, load seed from getSettings() Various fixes + last game bugfix Oct 25, 2020
@Tempystral
Copy link
Author

This PR now addresses issues #7 and #8. In addition to code cleanup, this fork ensures that BizHawk always loads the final rom correctly, and does not interrupt gameplay when it is the final rom in the list.

When one game is left, don't update the change count between countdowns. This will still write a "1" if the game had not been played before.
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.

1 participant