Remove GUI button if exists and GUI disabled

This commit is contained in:
Will Berry
2023-03-14 13:18:11 -04:00
committed by GitHub
parent 634fe010c2
commit 8194e9695b

View File

@@ -949,6 +949,12 @@ local function main()
script.on_nth_tick(mod_settings.manager_update_rate, function()
manager.tick(global)
end)
else
local button_flow = mod_gui.get_button_flow(player)
local button = button_flow["top_left_button"]
if button then
button.destroy()
end
end
end