mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Change sound double quotes to single quotes * Remove broken guitar note bs * Fix and optimize Dockerfile
38 lines
1021 B
Plaintext
38 lines
1021 B
Plaintext
SUBSYSTEM_DEF(tgui)
|
|
name = "tgui"
|
|
wait = 9
|
|
flags = SS_NO_INIT
|
|
priority = FIRE_PRIORITY_TGUI
|
|
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
|
|
|
var/list/currentrun = list()
|
|
var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
|
|
var/list/processing_uis = list() // A list of processing UIs, ungrouped.
|
|
var/basehtml // The HTML base used for all UIs.
|
|
|
|
/datum/controller/subsystem/tgui/PreInit()
|
|
basehtml = file2text('tgui/tgui.html')
|
|
|
|
/datum/controller/subsystem/tgui/Shutdown()
|
|
close_all_uis()
|
|
|
|
/datum/controller/subsystem/tgui/stat_entry()
|
|
..("P:[processing_uis.len]")
|
|
|
|
/datum/controller/subsystem/tgui/fire(resumed = 0)
|
|
if (!resumed)
|
|
src.currentrun = processing_uis.Copy()
|
|
//cache for sanic speed (lists are references anyways)
|
|
var/list/currentrun = src.currentrun
|
|
|
|
while(currentrun.len)
|
|
var/datum/tgui/ui = currentrun[currentrun.len]
|
|
currentrun.len--
|
|
if(ui && ui.user && ui.src_object)
|
|
ui.process()
|
|
else
|
|
processing_uis.Remove(ui)
|
|
if (MC_TICK_CHECK)
|
|
return
|
|
|