Ability to generate LuaRailPath between two rail pieces
Posted: Sat Mar 09, 2019 7:42 am
Having LuaRailPath on trains is great, but knowing if a train can path before setting a schedule and how long that path will be would be great.
Currently to find a train closest to a given stop through LuaRailPath we have to:
1) set the destination in train schedule
2) send it off
3) quickly grab the path
4) remove the schedule entry
5) send the train back to the original stop and hope it didn't creep out of the station by now
Proposal:
add a function rail.get_path(rail) -> LuaRailPath between two rail pieces or nil
Currently to find a train closest to a given stop through LuaRailPath we have to:
1) set the destination in train schedule
2) send it off
3) quickly grab the path
4) remove the schedule entry
5) send the train back to the original stop and hope it didn't creep out of the station by now
Proposal:
add a function rail.get_path(rail) -> LuaRailPath between two rail pieces or nil