mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 10:08:15 -06:00
made depot polling event based
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
---@field public to_output {[uint]: LuaEntity}
|
||||
---@field public to_stop {[uint]: LuaEntity}
|
||||
---@field public stations {[uint]: Station}
|
||||
---@field public all_station_ids uint[]
|
||||
---@field public depots {[uint]: Depot}
|
||||
---@field public trains {[uint]: Train}
|
||||
---@field public trains_available {[string]: {[uint]: uint}} --{[network_name]: {[train_id]: depot_id}}
|
||||
@@ -77,14 +78,6 @@
|
||||
---@type CybersynModSettings
|
||||
mod_settings = {}
|
||||
|
||||
local pairs = pairs
|
||||
---@param tab {}
|
||||
function table_clear(tab)
|
||||
for k, _ in pairs(tab) do
|
||||
tab[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
function init_global()
|
||||
global.total_ticks = 0
|
||||
global.tick_state = STATE_INIT
|
||||
@@ -98,6 +91,7 @@ function init_global()
|
||||
global.to_output = {}
|
||||
global.to_stop = {}
|
||||
global.stations = {}
|
||||
global.all_station_ids = {}
|
||||
global.depots = {}
|
||||
global.trains = {}
|
||||
global.trains_available = {}
|
||||
|
||||
Reference in New Issue
Block a user