mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 16:08:11 -06:00
fixed schedule generation
This commit is contained in:
@@ -200,6 +200,10 @@ end
|
|||||||
function add_refueler_schedule(train, stop)
|
function add_refueler_schedule(train, stop)
|
||||||
local schedule = train.schedule or {current = 1, records = {}}
|
local schedule = train.schedule or {current = 1, records = {}}
|
||||||
local i = schedule.current
|
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 t_surface = train.front_stock.surface
|
||||||
local f_surface = stop.surface
|
local f_surface = stop.surface
|
||||||
|
|||||||
Reference in New Issue
Block a user