-
Notifications
You must be signed in to change notification settings - Fork 85
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
Refactor OptionsManager.cs #1321
Conversation
- Code provided by kvakvs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Hope that i didn't mess up index values anywhere
Heh, I've not checked through it all yet - just copied & pasted from your repo. It's compiling though and seems to work on cursory glance in-game. |
- also manually checked all options are working
I've checked through each option via visual inspection, then tested each of them in game, which is something I never want to do again lol. EDIT: The fact that turning option on often enables one or more other options (eg. enabling mod features) was an absolute freaking nightmare in respect to testing what was happening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool 👍
Ok to put this in to 11.6.4.3 release? |
I didn't test it but also didn't spot any bug (analyzed changes carefully by counting indexes on my fingers) 😄 |
yeha, trust me, you don't want to try testing every option with the way the options screen currently works (especially Policies tab) I thought my brain was going to burst lol |
save[31] = (byte)(Options.parkingRestrictionsOverlay ? 1 : 0); | ||
save[32] = (byte)(Options.banRegularTrafficOnBusLanes ? 1 : 0); | ||
save[33] = (byte)(Options.showPathFindStats ? 1 : 0); | ||
save[34] = Options.altLaneSelectionRatio; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loads DLSPercentage, and stores altLaneSelectionRatio, hope they are the same variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TMPE.zip
Refactors
OptionsManager.cs
to use specific index references, resulting in cleaner and more maintainable code.This is a prerequisite for following PRs: