mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-20 15:33:12 +09:00
s
This commit is contained in:
1 parent
e1d806a77f
commit
a6fa3a50dc
1 file changed
+9
-6
@@ -447,11 +447,14 @@ function Elements.controls.refresh_interfaces(controls)
|
|||||||
local elements = Elements.controls.data[controls]
|
local elements = Elements.controls.data[controls]
|
||||||
local interface_type = Elements.type_dropdown.get_selected(elements.type_dropdown)
|
local interface_type = Elements.type_dropdown.get_selected(elements.type_dropdown)
|
||||||
local element = elements.surface_dropdown
|
local element = elements.surface_dropdown
|
||||||
if not element then return end
|
local surface = 1
|
||||||
local surface_name = element.items[element.selected_index]
|
if element then
|
||||||
if not surface_name then return end
|
local surface_name = element.items[element.selected_index]
|
||||||
local surface = game.surfaces[surface_name]
|
if surface_name then
|
||||||
Elements.interface_dropdown.refresh(elements.interface_dropdown, Vlayer.get_interfaces(surface.index)[interface_type])
|
surface = game.surfaces[surface_name].index
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Elements.interface_dropdown.refresh(elements.interface_dropdown, Vlayer.get_interfaces(surface)[interface_type])
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Refresh the listed interfaces of every online player, used when an interface is built or removed
|
--- Refresh the listed interfaces of every online player, used when an interface is built or removed
|
||||||
@@ -483,7 +486,7 @@ Elements.container = Gui.define("vlayer/container")
|
|||||||
Elements.controls(container)
|
Elements.controls(container)
|
||||||
for _, controls in Elements.controls:online_elements() do
|
for _, controls in Elements.controls:online_elements() do
|
||||||
local elements = Elements.controls.data[controls]
|
local elements = Elements.controls.data[controls]
|
||||||
Elements.stats_table.refresh(stats_table, Elements.stats_table.calculate_display_data(game.surfaces[elements.surface_dropdown.items[elements.surface_dropdown.selected_index]].index))
|
Elements.stats_table.refresh(stats_table, Elements.stats_table.calculate_display_data(1))
|
||||||
end
|
end
|
||||||
return Gui.elements.container.get_root_element(container)
|
return Gui.elements.container.get_root_element(container)
|
||||||
end) --[[@as any]]
|
end) --[[@as any]]
|
||||||
|
|||||||
Reference in new issue
Block a user