This commit is contained in:
phidias authored and GitHub committed 2026-11-16 19:06:28 +09:00
1 parent adc7b5a5aa
commit 549319b82a
1 file changed
+3 -3
+3 -3
View File
@@ -257,9 +257,9 @@ local function surface_index_from_element(controls)
local surface = 0 local surface = 0
if element then if element then
local surface_name = element.items[element.selected_index] local surface_name = element.items[element.selected_index]
if surface_name then local s = game.surfaces[surface_name]
---@diagnostic disable-next-line: undefined-field if surface_name and s then
surface = game.surfaces[surface_name].index surface = s.index
end end
end end
return surface return surface