From 17bb1ffee97f69771b33fdbb0c5ba8c103e63ef6 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 12 Nov 2026 14:15:02 +0900 Subject: [PATCH] s --- exp_scenario/module/gui/vlayer.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/exp_scenario/module/gui/vlayer.lua b/exp_scenario/module/gui/vlayer.lua index 596ba153..a79f9a74 100644 --- a/exp_scenario/module/gui/vlayer.lua +++ b/exp_scenario/module/gui/vlayer.lua @@ -198,9 +198,14 @@ function Elements.stats_table.refresh_online() for _, controls in Elements.controls:online_elements() do local elements = Elements.controls.data[controls] local element = elements.surface_dropdown - if not element then return end - local surface = game.surfaces[element.items[element.selected_index]] - local display_data = Elements.stats_table.calculate_display_data(surface.index) + local surface = 1 + if element then + local surface_name = element.items[element.selected_index] + if surface_name then + surface = game.surfaces[surface_name].index + end + end + local display_data = Elements.stats_table.calculate_display_data(surface) for _, stats_table in Elements.stats_table:online_elements() do Elements.stats_table.refresh(stats_table, display_data) end