[aaargha] [0.16.2]Scripting train schedule can cause overshoot
Posted: Thu Dec 14, 2017 8:43 pm
Changing the destination via scripts while a train is in arrive_station can cause it to not properly stop at the next stop, instead it overshoots and gets stuck on no path just past the train stop.
To reproduce in the save below:
1. Set the train to auto
2. Run this script when it has passed the hazard concrete while on the path to the south stop
3. the train should get stuck on the north station
To reproduce in the save below:
1. Set the train to auto
2. Run this script when it has passed the hazard concrete while on the path to the south stop
Code: Select all
/c local train = game.player.force.get_trains(1)[1]
local schedule = table.deepcopy(train.schedule)
schedule.current = 1
train.schedule = schedule