csgo-practice-mode
csgo-practice-mode copied to clipboard
Bot Setups feature relates to #94
Fully tested and ready.
Getting it to build, didn't have docker handy at the time. Damn ESEA blocking virtualization. So had to spool up a docker on a remote host and get a server running. Will post results.
It's done and tested. I added .removebotsetup as I can imagine over time people having too many configs.
Thanks for taking a shot at this. I'll try to take a further look soon.
One thing from a quick pass: it looks like you're using a separate file for each setup, which gets named by the user. I think it'd be strongly preferable to continue using a single file for all bot-info on each file. The keyvalues structure allows for things to be nested.
It's a little awkward because of the existing saving/loads of named bot positions. I'm not sure how that should interplay with this new feature, or if that should even exist at all. It didn't really turn out to work very well so I'd be okay if it was removed.
And on a slightly more trivial note: keeping the style in line with all the code would be nice too. From a quick glance, I see some inconsistencies from the existing code. The existing code uses if (foo) over if(foo) (and for loops as well). I'm basically just following https://google.github.io/styleguide/cppguide.html#Horizontal_Whitespace.
I will improve on this soon. With the work week, improvements will be delayed.
Another thought. For a legacy fallback. The old data format can be detected on load, and transformed into the new KeyValue object format using the "default" key, and save would just save into the new format overwriting the file.
@skliffmueller Any luck with the changes? This looks like a great addition too.