mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-15 12:12:51 -06:00
Issue 104: Don't crash when clicking on combinator when the GUI is open
This commit is contained in:
@@ -201,6 +201,9 @@ function gui_opened(comb, player)
|
|||||||
combinator_update(global, comb, true)
|
combinator_update(global, comb, true)
|
||||||
|
|
||||||
local rootgui = player.gui.screen
|
local rootgui = player.gui.screen
|
||||||
|
if rootgui[COMBINATOR_NAME] then
|
||||||
|
rootgui[COMBINATOR_NAME].destroy()
|
||||||
|
end
|
||||||
local selected_index, signal, switch_state, bits = get_comb_gui_settings(comb)
|
local selected_index, signal, switch_state, bits = get_comb_gui_settings(comb)
|
||||||
|
|
||||||
local _, main_window = flib_gui.add(rootgui, {
|
local _, main_window = flib_gui.add(rootgui, {
|
||||||
|
|||||||
Reference in New Issue
Block a user