Page 1 of 1

swapped links in api documentation

Posted: Thu Dec 28, 2017 7:05 am
by Optera
The two get_trains links are swapped in http://lua-api.factorio.com/latest/Classes.html
get_trains(surface) → array of LuaTrain links to LuaForce.get_trains
get_trains(force) → array of LuaTrain links to LuaSurface.get_trains

Re: swapped links in api documentation

Posted: Thu Dec 28, 2017 1:49 pm
by Oxyd
That sounds correct to me. The first get_trains(surface) is in LuaForce, and the second get_trains(force) is in LuaSurface, so the links take you to the correct place. So you'd do either `game.player.force.get_trains(game.player.surface)` or `game.player.surface.get_trains(game.player.force)`.

Re: swapped links in api documentation

Posted: Thu Dec 28, 2017 3:14 pm
by Optera
My bad I was confused by LuaSurface showing get_trains(force).