mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 00:27:31 +01:00
Merge pull request #7969 from optimumtact/nanouibeginnings
Auto load required nanoui files on client login
This commit is contained in:
@@ -9,10 +9,29 @@ var/datum/subsystem/nano/SSnano
|
||||
var/list/open_uis = list() //a list of current open /nanoui UIs, grouped by src_object and ui_key
|
||||
var/list/processing_uis = list() //a list of current open /nanoui UIs, not grouped, for use in processing
|
||||
|
||||
//List of asset filenames to be sent to the client on user login
|
||||
var/list/asset_files = list()
|
||||
|
||||
|
||||
/datum/subsystem/nano/New()
|
||||
NEW_SS_GLOBAL(SSnano)
|
||||
|
||||
//Generate list of files to send to client for nano UI's
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
var/list/filenames = null
|
||||
for (var/path in nano_asset_dirs)
|
||||
filenames = flist(path)
|
||||
for(var/filename in filenames)
|
||||
//Ignore directories
|
||||
if(copytext(filename, length(filename)) != "/")
|
||||
if(fexists(path + filename))
|
||||
asset_files.Add(fcopy_rsc(path + filename))
|
||||
|
||||
|
||||
/datum/subsystem/nano/stat_entry()
|
||||
stat(name, "[round(cost,0.001)]ds (CPU:[round(cpu,1)]%) [processing_uis.len]")
|
||||
@@ -27,4 +46,4 @@ var/datum/subsystem/nano/SSnano
|
||||
ui.process()
|
||||
++i
|
||||
continue
|
||||
processing_uis.Cut(i, i+1)
|
||||
processing_uis.Cut(i, i+1)
|
||||
|
||||
Reference in New Issue
Block a user