From eeeda196aeba339fdadf9197ab1c4a1d5673c9ce Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 10 Nov 2026 20:01:53 +0900 Subject: [PATCH] wrong table key --- exp_scenario/module/control/vlayer.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/exp_scenario/module/control/vlayer.lua b/exp_scenario/module/control/vlayer.lua index 13c6d015..9e484af0 100644 --- a/exp_scenario/module/control/vlayer.lua +++ b/exp_scenario/module/control/vlayer.lua @@ -154,16 +154,12 @@ allowed_items["landfill"] = { --- @type ExpScenario_Vlayer.Data local vlayer_data = {} ---- @param surface_index number? +--- @param surface_index number local function update_surface(surface_index) - if vlayer_data[surface_index] then - return - end + if vlayer_data[surface_index] then return end -- global surface will have its data point to the main surface - if config.global_surface then - return - end + if config.global_surface and vlayer_data[1] then return end vlayer_data[surface_index] = { interfaces = { @@ -610,7 +606,7 @@ end --- Fill the requests of the output interfaces from storage local function handle_output_interfaces() for s_index, prop in pairs(vlayer_data) do - local interfaces = prop.storage_output + local interfaces = prop.interfaces.storage_output prune_interfaces(interfaces) for _, interface in ipairs(interfaces) do local inventory = assert(interface.get_inventory(defines.inventory.chest))