fixed schedule generation

This commit is contained in:
Monica Moniot
2022-12-08 11:40:55 -05:00
parent d45d0700c6
commit 47faf78e12

View File

@@ -200,6 +200,10 @@ end
function add_refueler_schedule(train, stop)
local schedule = train.schedule or {current = 1, records = {}}
local i = schedule.current
if i == 1 then
i = #schedule.records + 1--[[@as uint]]
schedule.current = i
end
local t_surface = train.front_stock.surface
local f_surface = stop.surface