This commit is contained in:
phidias authored and GitHub committed 2026-11-16 19:14:07 +09:00
1 parent 3afe02f0a2
commit 5b663eeee7
1 file changed
+3 -1
+3 -1
View File
@@ -257,12 +257,14 @@ 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
---@diagnostic disable-next-line: undefined-field ---@diagnostic disable-next-line: undefined-field
local s = game.surfaces[surface_name] local s = game.surfaces[surface_name]
if surface_name and s then if s then
surface = s.index surface = s.index
end end
end end
end
return surface return surface
end end