Closed jgersti closed 2 years ago
Ya, I know it's a little brittle, but I don't think it's worth a separate parsing (and/or syntax??) to try and make this less brittle.
I agree with adding the x,y,z,r,g,b variables to the list of common variables and a section saying "yes, it's possible to override these variables. Please don't do that."
I pushed a documentation update for these, both in master and currentRelease https://spaceengineers.merlinofmines.com/EasyCommands/variables
Since the component access for vectors and colors relies on the dot product and the preset variables
x
,y
,z
,r
,g
andb
it is quite brittle since these variables can simply be shadowed or overridden entirely.A warning to not override the preset variables should be added to the documentation.
Alternatively the component access needs to be made independent of either the dot product or the value of these variables. Both alternatives offer several disadvantages.