mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 02:08:13 -06:00
fixed crash
This commit is contained in:
1
TODO
1
TODO
@@ -35,3 +35,4 @@ compat:
|
|||||||
railloader
|
railloader
|
||||||
picker dollies?
|
picker dollies?
|
||||||
cargo ships
|
cargo ships
|
||||||
|
editor extensions (test surface separation)
|
||||||
|
|||||||
@@ -725,9 +725,8 @@ function tick_init(map_data, mod_settings)
|
|||||||
map_data.economy.all_r_stations = {}
|
map_data.economy.all_r_stations = {}
|
||||||
map_data.economy.all_names = {}
|
map_data.economy.all_names = {}
|
||||||
|
|
||||||
local i = 1
|
while #map_data.warmup_station_ids > 0 do
|
||||||
while i <= #map_data.warmup_station_ids do
|
local id = map_data.warmup_station_ids[1]
|
||||||
local id = map_data.warmup_station_ids[i]
|
|
||||||
local station = map_data.stations[id]
|
local station = map_data.stations[id]
|
||||||
if station then
|
if station then
|
||||||
local cycles = map_data.warmup_station_cycles[id]
|
local cycles = map_data.warmup_station_cycles[id]
|
||||||
@@ -736,20 +735,22 @@ function tick_init(map_data, mod_settings)
|
|||||||
if station.last_delivery_tick + mod_settings.warmup_time*mod_settings.tps < map_data.total_ticks then
|
if station.last_delivery_tick + mod_settings.warmup_time*mod_settings.tps < map_data.total_ticks then
|
||||||
station.is_warming_up = nil
|
station.is_warming_up = nil
|
||||||
map_data.active_station_ids[#map_data.active_station_ids + 1] = id
|
map_data.active_station_ids[#map_data.active_station_ids + 1] = id
|
||||||
map_data.warmup_station_ids[i] = nil
|
table_remove(map_data.warmup_station_ids, 1)
|
||||||
map_data.warmup_station_cycles[id] = nil
|
map_data.warmup_station_cycles[id] = nil
|
||||||
if station.entity_comb1.valid then
|
if station.entity_comb1.valid then
|
||||||
combinator_update(map_data, station.entity_comb1)
|
combinator_update(map_data, station.entity_comb1)
|
||||||
else
|
else
|
||||||
on_station_broken(map_data, id, station)
|
on_station_broken(map_data, id, station)
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
break
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
map_data.warmup_station_cycles[id] = cycles + 1
|
map_data.warmup_station_cycles[id] = cycles + 1
|
||||||
|
break
|
||||||
end
|
end
|
||||||
i = i + 1
|
|
||||||
else
|
else
|
||||||
table_remove(map_data.warmup_station_ids, i)
|
table_remove(map_data.warmup_station_ids, 1)
|
||||||
map_data.warmup_station_cycles[id] = nil
|
map_data.warmup_station_cycles[id] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user