-
Notifications
You must be signed in to change notification settings - Fork 8
Decimal and update feature branch #1
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
base: master
Are you sure you want to change the base?
Decimal and update feature branch #1
Conversation
Added another button that allows resetting the personal times and deleting the saved file. Added an 'int' slider to configure how many decimal places we want to record to
Refactored the color codes to make them easier to change if needed in the future Added support for the button to reset and delete a file Overall refactored some logic to reduce nesting, use some more modern looping, etc.
| { | ||
| auto it = &spawnLocations.at(i); | ||
| if (location.X == it->location.X && location.Y == it->location.Y) { | ||
| const auto it = &spawn_location; |
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.
Refactor to just spawn_location? No need for it anymore, or?
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.
It think using 'it' still makes sense. Its shorter to write that compared to spawn_location, but I see what you mean :)
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.
ok so pls change that
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.
I wasn't as clear as I should have been in the last one. It's shorter to write what's there now (using 'it'), so I think we should keep it
KickoffTimerPlugin.cpp
Outdated
| spawnLocations.push_back({ "M", {0, -4608}, 2.62897 }); | ||
| spawnLocations.push_back({ "L", {2048, -2560}, 2.06905 }); | ||
| spawnLocations.push_back({ "R", {-2048, -2560}, 2.06905 }); | ||
| spawnLocations.push_back({ "M", {0, -4608}, 2.62897 }); |
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.
Wrong Spaces
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.
I'm not sure what you mean here. Could you explain it a little more?
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.
There are 2 spaces between "," and "{"
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.
Its just a formatting thing to make it align in the IDE. It doesn't affect functionality, but I can remove it
AndrewThomasWill
left a comment
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.
Yeah I guess thats fair. I was adding it since I needed to delete the file for testing, but we can remove it
| { | ||
| auto it = &spawnLocations.at(i); | ||
| if (location.X == it->location.X && location.Y == it->location.Y) { | ||
| const auto it = &spawn_location; |
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.
It think using 'it' still makes sense. Its shorter to write that compared to spawn_location, but I see what you mean :)
KickoffTimerPlugin.cpp
Outdated
| spawnLocations.push_back({ "M", {0, -4608}, 2.62897 }); | ||
| spawnLocations.push_back({ "L", {2048, -2560}, 2.06905 }); | ||
| spawnLocations.push_back({ "R", {-2048, -2560}, 2.06905 }); | ||
| spawnLocations.push_back({ "M", {0, -4608}, 2.62897 }); |
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.
There are 2 spaces between "," and "{"
KickoffTimerPlugin.cpp
Outdated
| BAKKESMOD_PLUGIN(KickoffTimerPlugin, "Kickoff timer plugin", "0.1", PLUGINTYPE_FREEPLAY) | ||
|
|
||
| static const string savefile = "bakkesmod/data/kickofftimerplugin.data"; | ||
| string savefile = "bakkesmod/data/kickofftimerplugin.data"; |
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.
change back to const
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.
Updated.
| { | ||
| auto it = &spawnLocations.at(i); | ||
| if (location.X == it->location.X && location.Y == it->location.Y) { | ||
| const auto it = &spawn_location; |
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.
ok so pls change that
Refactored the color codes to make them easier to change if needed in the future
Added support for the button to reset and delete a file
Overall refactored some logic to reduce nesting, use some more modern looping, etc.
Settings--
Added another button that allows resetting the personal times and deleting the saved file.
Added an 'int' slider to configure how many decimal places we want to record to