Decimal and update feature branch#1
Decimal and update feature branch#1AndrewThomasWill wants to merge 4 commits intohnorkowski:masterfrom
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.
Refactor to just spawn_location? No need for it anymore, or?
There was a problem hiding this comment.
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.
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.
I'm not sure what you mean here. Could you explain it a little more?
There was a problem hiding this comment.
There are 2 spaces between "," and "{"
There was a problem hiding this comment.
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.
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.
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.
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"; |
| { | ||
| auto it = &spawnLocations.at(i); | ||
| if (location.X == it->location.X && location.Y == it->location.Y) { | ||
| const auto it = &spawn_location; |
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