LuaSurface.train_station_available(station_name :: string) -> boolean
Returns true if there is at least one enabled train stop on this surface with the given station name.
[Request] Check train station availability by name
Re: [Request] Check train station availability by name
Train stations are grouped by name, not by surface.figsoda wrote: Tue Dec 10, 2019 11:07 pm LuaSurface.train_station_available(station_name :: string) -> boolean
And apparently trains currently make no distinctions for rails or stations on other surfaces, so putting this on LuaSurface doesn't make much sense (i see where you're going with it though).
What's wrong with doing this search manually yourself?figsoda wrote: Tue Dec 10, 2019 11:07 pm Returns true if there is at least one enabled train stop on this surface with the given station name.
Factorio lua in its current shape is quite capable of doing this no problem without any changes needed.