MerlinofMines / EasyCommands

Github Repository for Ingame Scripts built by MerlinofMines. Uses MDK to Deploy to SpaceEngineerse
GNU General Public License v3.0
8 stars 3 forks source link

[Doc] Component access for vectors and colors #126

Closed jgersti closed 2 years ago

jgersti commented 2 years ago

Since the component access for vectors and colors relies on the dot product and the preset variables x, y, z, r, g and b 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.

MerlinofMines commented 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."

MerlinofMines commented 2 years ago

I pushed a documentation update for these, both in master and currentRelease https://spaceengineers.merlinofmines.com/EasyCommands/variables