Page 1 of 1

Luadoc for Concepts#Position unclear

Posted: Mon May 29, 2017 9:54 pm
by folk
Hi,
So I'm on my laptop for the time being, and it's old, and running anything on it is painful :-)
Which means I try to start up factorio as few times as I can. And to that end, I try to interpret the API docs without testing everything manually.

http://lua-api.factorio.com/latest/Conc ... l#Position

1. There is no mention here whether or not a Position returned by the API always conforms to a standard (though I can't remember any time the API gave me something other than a table with a .x and .y key).
2. There is no mention whether or not it has a builtin __eq metatable or equivalent, so if I get two LuaEntities from the API somehow, I don't know if foo.position == bar.position would try to compare table references, or the actual position coordinates.

Obviously, both things are easy to find out if the game is running, but I thought it might be a good thing to add to the docs.

Thank you.