diff --git a/cybersyn/scripts/global.lua b/cybersyn/scripts/global.lua index bb0fdfe..c90b8b7 100644 --- a/cybersyn/scripts/global.lua +++ b/cybersyn/scripts/global.lua @@ -34,7 +34,7 @@ ---@field public accepted_layouts TrainClass ---@field public layout_pattern string? ---@field public tick_signals {[uint]: Signal}? --transient ----@field public p_count_or_r_threshold_per_item {[string]: int}? --transient +---@field public p_count_or_r_threshold_per_item {[string]: int} --transient ---@class Depot ---@field public priority int --transient @@ -75,6 +75,7 @@ mod_settings = {} local pairs = pairs +---@param tab {} function table_clear(tab) for k, _ in pairs(tab) do tab[k] = nil diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index 05db3ed..a59f686 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -136,6 +136,7 @@ local function on_station_built(map_data, stop, comb1, comb2) --allows_all_trains = param.second_constant == 1, accepted_layouts = {}, layout_pattern = nil, + p_count_or_r_threshold_per_item = {}, } set_station_from_comb_state(station) map_data.stations[stop.unit_number] = station