swapped links in api documentation

Bugs that are actually features.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

swapped links in api documentation

Post 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
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: swapped links in api documentation

Post 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)`.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: swapped links in api documentation

Post by Optera »

My bad I was confused by LuaSurface showing get_trains(force).
Post Reply

Return to “Not a bug”