Only refresh open tab and exclude virtual signals from provided/requested on stations tab

This commit is contained in:
Will Berry
2023-03-10 10:19:30 -05:00
parent 118f8c9eb2
commit 9343d06620
5 changed files with 43 additions and 11 deletions

View File

@@ -13,9 +13,7 @@ function stations_tab.create(widths)
type = "tab",
caption = { "cybersyn-gui.stations" },
ref = { "stations", "tab" },
actions = {
on_click = { gui = "main", action = "change_tab", tab = "stations" },
},
handler = stations_tab.handle.on_stations_tab_selected
},
content = {
name = "manager_stations_content_frame",
@@ -315,6 +313,12 @@ function stations_tab.handle.open_station_gui(player, player_data, refs, e)
end
end
---@param player LuaPlayer
---@param player_data PlayerData
function stations_tab.handle.on_stations_tab_selected(player, player_data)
player_data.selected_tab = "stations_tab"
end
gui.add_handlers(stations_tab.handle, stations_tab.wrapper)
return stations_tab