Files
kiwistation/code/controllers/subsystem/nano.dm
T
Bjorn Neergaard 0dcfd67796 We use pipes.
2015-12-01 07:28:53 -05:00

29 lines
728 B
Plaintext

var/datum/subsystem/nano/SSnano
/datum/subsystem/nano
name = "NanoUI"
can_fire = 1
wait = 10
priority = 16
var/list/open_uis = list() // A list of open NanoUIs, grouped by src_object and ui_key.
var/list/processing_uis = list() // A list of processing NanoUIs, not grouped.
/datum/subsystem/nano/New()
NEW_SS_GLOBAL(SSnano) // Register the subsystem.
/datum/subsystem/nano/stat_entry()
..("O: [open_uis.len]|P:[processing_uis.len]") // Show how many interfaces we have open/are processing.
/datum/subsystem/nano/fire() // Process UIs.
for(var/thing in SSnano.processing_uis)
if(thing)
var/datum/nanoui/ui = thing
if(ui.src_object && ui.user)
ui.process()
continue
processing_uis.Remove(thing)