Skip to content

Conversation

@AndrewThomasWill
Copy link

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

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;
Copy link
Owner

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?

Copy link
Author

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 :)

Copy link
Owner

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

Copy link
Author

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

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 });
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong Spaces

Copy link
Author

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?

Copy link
Owner

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 "{"

Copy link
Author

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

Copy link
Author

@AndrewThomasWill AndrewThomasWill left a 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;
Copy link
Author

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 :)

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 });
Copy link
Owner

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 "{"

BAKKESMOD_PLUGIN(KickoffTimerPlugin, "Kickoff timer plugin", "0.1", PLUGINTYPE_FREEPLAY)

static const string savefile = "bakkesmod/data/kickofftimerplugin.data";
string savefile = "bakkesmod/data/kickofftimerplugin.data";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change back to const

Copy link
Author

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;
Copy link
Owner

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

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