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

Save High Score Variables in high_scores.yaml #1699

Merged
merged 2 commits into from
Jun 18, 2023

Conversation

atummons
Copy link
Contributor

This extends the high score mode to allow the user to define vars that they want to be saved along with the initials and title of the high score that is achieved. The user can define any number of player or machine vars that should be saved along with the files. These are written into the high_scores.yaml file as a third tuple. The code parses the list and for those with two elements (no vars) or three elements (with vars) it will create the machine variables so that it can be used on attract mode, etc. Then it will save to the file and update the machine vars after the game ends.

atummons added 2 commits June 14, 2023 14:39
This extends the high score mode to allow the user to define vars that they want to be saved along with the initials and title of the high score that is achieved.  The user can define any number of player or machine vars that should be saved along with the files.  These are written into the high_scores.yaml file as a third tuple.  The code parses the list and for those with two elements (no vars) or three elements (with vars) it will create the machine variables so that it can be used on attract mode, etc.  Then it will save to the file and update the machine vars after the game ends.
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@toomanybrians
Copy link
Member

This is great, thanks!

I want to get this updated in the docs as well. I created a tracking issue for the docs so I won't forget about it. It would be cool if you wanted to take a stab at the docs too? I can do it this week otherwise.

missionpinball/mpf-docs#463

@toomanybrians toomanybrians merged commit 6133a14 into missionpinball:dev Jun 18, 2023
@atummons
Copy link
Contributor Author

@toomanybrians I'll get the docs updated this week. Just wanted to make sure it was all good first.

@atummons atummons deleted the high_score_vars branch August 31, 2023 17:10
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