Code: Select all
> for i = 1, train_schedule.get_record_count() do print(serpent.line(train_schedule.get_record{ schedule_index = i })) end
(nil)
> train_schedule.add_record { station = 'zzz_first' }
> train_schedule.add_record { station = 'aaa_second' }
> for i = 1, train_schedule.get_record_count() do print(serpent.line(train_schedule.get_record{ schedule_index = i })) end
{allows_unloading = true, created_by_interrupt = false, station = "zzz_first", temporary = false, wait_conditions = {}}
{allows_unloading = true, created_by_interrupt = false, station = "aaa_second", temporary = false, wait_conditions = {}}
(nil)
Code: Select all
> for i = 1, train_schedule.get_record_count() do print(serpent.line(train_schedule.get_record{ schedule_index = i })) end
(nil)
> train_schedule.add_record { station = 'zzz_first' }
> train_schedule.add_record { station = 'aaa_second', temporary = true }
> for i = 1, train_schedule.get_record_count() do print(serpent.line(train_schedule.get_record{ schedule_index = i })) end
{allows_unloading = true, created_by_interrupt = false, station = "aaa_second", temporary = true, wait_conditions = {{compare_type = "and", ticks = 300, type = "time"}}}
{allows_unloading = true, created_by_interrupt = false, station = "zzz_first", temporary = false, wait_conditions = {}}
(nil)