From 7dcdda8ed091d9ca936e20afd07c111d74bc03e5 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Tue, 26 Jan 2016 17:46:03 -0600 Subject: [PATCH] Disable tgui autoupdate for uplinks Only a single person can use one at any given moment, and no external factors update them --- code/modules/tgui/tgui.dm | 8 ++++---- code/modules/uplink/uplink.dm | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/tgui/tgui.dm b/code/modules/tgui/tgui.dm index 0de72fd2609..79e6aa15ea0 100644 --- a/code/modules/tgui/tgui.dm +++ b/code/modules/tgui/tgui.dm @@ -26,7 +26,7 @@ ) var/style = "nanotrasen" // The style to be used for this UI. var/interface // The interface (template) to be used for this UI. - var/auto_update = TRUE // Update the UI every MC tick. + var/autoupdate = TRUE // Update the UI every MC tick. var/initialized = FALSE // If the UI has been initialized yet. var/list/initial_data // The data (and datastructure) used to initialize the UI. var/status = UI_INTERACTIVE // The status/visibility of the UI. @@ -167,8 +167,8 @@ * * required state bool Enable/disable auto-updating. **/ -/datum/tgui/proc/set_auto_update(state = 1) - auto_update = state +/datum/tgui/proc/set_autoupdate(state = 1) + autoupdate = state /** * private @@ -300,7 +300,7 @@ close() return - if(status && (force || auto_update)) + if(status && (force || autoupdate)) update() // Update the UI if the status and update settings allow it. else update_status(push = 1) // Otherwise only update status. diff --git a/code/modules/uplink/uplink.dm b/code/modules/uplink/uplink.dm index 1a7bd149f3f..5c75482566d 100644 --- a/code/modules/uplink/uplink.dm +++ b/code/modules/uplink/uplink.dm @@ -36,6 +36,7 @@ var/global/list/uplinks = list() ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state) + ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input. ui.set_style("syndicate") ui.open()