This commit is contained in:
phidias authored and GitHub committed 2026-11-12 15:25:27 +09:00
1 parent ccb3ba6d20
commit cf02987fb9
1 file changed
+8 -1
+8 -1
View File
@@ -442,7 +442,14 @@ function Elements.controls.get_selected_interface(controls)
local elements = Elements.controls.data[controls]
local interface_type = Elements.type_dropdown.get_selected(elements.type_dropdown)
local element = elements.surface_dropdown
local interfaces = Vlayer.get_interfaces(element.items[element.selected_index])[interface_type]
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 interfaces = Vlayer.get_interfaces(surface)[interface_type]
return interface_type, Elements.interface_dropdown.get_selected(elements.interface_dropdown, interfaces)
end