"One-shot" mode for trains
Posted: Sat Jan 09, 2021 11:22 pm
TL;DR
Ever wanted to send a train somewhere and make it stop there without babysitting the GUI?Or maybe you are tired of having to open its GUI and clicking that tiny switch to "manual" after every trip?
Why not add an option to automatically switch to "manual" at next stop?
What ?
When a train is sent from manual mode to a temporary waypoint (ctrl-click) or a station (the "play" button of a station in schedule), switch it to "one-shot" mode instead of full "auto". When a train in that mode stops at a station, it switches to manual. If it already was in "auto" before being sent somewhere, leave it in "auto".In train GUI, it can be implemented similar to splitter's priority toggle: the switch either stays in a middle position or in "auto", and a checkbox to the right says "Manual at next stop". Allow checking that box even if already driving in auto, and also unchecking it would switch to normal "auto" mode.
When switching to "one-shot" by adding a temporary waypoint (ctrl-click), leave that waypoint's wait condition empty, so that it gets removed immediately upon arrival, at the same moment when train returns to "manual".
Why ?
Most common usecase: A personal train. Usually, you put it in "auto" only to get somewhere quickly and without any crashes. When it arrives, you probably want it to stop until further notice.Even though it already does so when its schedule is otherwise empty, it still technically remains in "auto", which inhibits WASD controls and personal roboport operation. You can manually switch it to "manual" after arrival, but it gets annoying when you do it a lot. Additionally, you can't keep useful stations in the train's schedule because you have to keep that schedule empty. If you don't keep it empty, you have to babysit the GUI every time to switch to "manual" right before the arrival.