301-Redirection / DBC

An online system for creating custom DOTA 2 bot scripts.
4 stars 1 forks source link

Team desires condition bug 201 #205

Closed russelldutton closed 6 years ago

russelldutton commented 6 years ago

The branch name has 202 but the issue being fixed is actually #201. Sorry about that.

It turns out the binding between the slider and the value was half-breaking, and I'm not sure how else to describe it as the value was not being reset to zero, it was just updating the view to the wrong value.

I removed the 2 way binding and only allowed for the slider to update the value, and not the other way around. I confirmed this with multiple logs that it preserves the value.

russelldutton commented 6 years ago

Ok so the above issues should now be fixed. They were related to the scaling that was happening in the bot-config.service file when saving. This functionality has since been moved to the generateScript.js file in /backend/controllers/codeGeneration/ to only manipulate the values when they are generated in a script file.

I believe this to be better because A, it fixes the bugs, and B, the code that generates the scripts iterates through the object anyway, so it was literally 6 places I added '/ 100' .

The object now correctly saves the configuration and it should not reset to any previous values, or to 0 for any obscure reasons anymore.