html_interface removal and crew monitoring console refactor.
This commit is contained in:
committed by
CitadelStationBot
parent
1cda9ef2b4
commit
35b8e410be
@@ -57,7 +57,7 @@
|
||||
* This allows modules/datums to have the UI attached to them,
|
||||
* and be a part of another object.
|
||||
**/
|
||||
/datum/proc/ui_host()
|
||||
/datum/proc/ui_host(mob/user)
|
||||
return src // Default src.
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* return UI_state The state of the UI.
|
||||
**/
|
||||
/datum/proc/ui_status(mob/user, datum/ui_state/state)
|
||||
var/src_object = ui_host()
|
||||
var/src_object = ui_host(user)
|
||||
. = UI_CLOSE
|
||||
if(!state)
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
var/update_count = 0
|
||||
for(var/ui_key in open_uis[src_object_key])
|
||||
for(var/datum/tgui/ui in open_uis[src_object_key][ui_key])
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host()) // Check the UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) // Check the UI is valid.
|
||||
ui.process(force = 1) // Update the UI.
|
||||
update_count++ // Count each UI we update.
|
||||
return update_count
|
||||
@@ -94,7 +94,7 @@
|
||||
var/close_count = 0
|
||||
for(var/ui_key in open_uis[src_object_key])
|
||||
for(var/datum/tgui/ui in open_uis[src_object_key][ui_key])
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host()) // Check the UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) // Check the UI is valid.
|
||||
ui.close() // Close the UI.
|
||||
close_count++ // Count each UI we close.
|
||||
return close_count
|
||||
@@ -111,7 +111,7 @@
|
||||
for(var/src_object_key in open_uis)
|
||||
for(var/ui_key in open_uis[src_object_key])
|
||||
for(var/datum/tgui/ui in open_uis[src_object_key][ui_key])
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host()) // Check the UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user)) // Check the UI is valid.
|
||||
ui.close() // Close the UI.
|
||||
close_count++ // Count each UI we close.
|
||||
return close_count
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
* optional force bool If the UI should be forced to update.
|
||||
**/
|
||||
/datum/tgui/process(force = 0)
|
||||
var/datum/host = src_object.ui_host()
|
||||
var/datum/host = src_object.ui_host(user)
|
||||
if(!src_object || !host || !user) // If the object or user died (or something else), abort.
|
||||
close()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user