Here is another case with problem:
Station: Depot signal (no wait condition))
Station: Pickup (Wait for full cargo)
Station: Waiting to free pickup station (no condition)
Station Delivery: (Wait for empty cargo)
The conditions are the same as previous ones.
The trains should wait at the Waiting station until there is a delivery station available.
All stations are train-limited.
What happens: At the waiting station, the train goes directly to the depot when there is no delivery station available
I have tried a fix on the mod. I replace the line 76 in the file "train_control_signals.lua" with
local prev = schedule.current - 1
if prev == 0 then prev = #schedule.records end
local prev_name = schedule.records[prev].station
return prev_name:find(depot_signal)
It seems to work