diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index cd63e415a44..1d955a9e74b 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -242,30 +242,11 @@ //send resources to the client. It's here in its own proc so we can move it around easiliy if need be /client/proc/send_resources() // preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in. + + // Send NanoUI resources to this client + nanomanager.send_resources(src) + getFiles( - 'nano/js/libraries.min.js', - 'nano/js/nano_update.js', - 'nano/js/nano_config.js', - 'nano/js/nano_base_helpers.js', - 'nano/css/shared.css', - 'nano/css/icons.css', - 'nano/templates/chem_dispenser.tmpl', - 'nano/templates/cryo.tmpl', - 'nano/templates/geoscanner.tmpl', - 'nano/templates/dna_modifier.tmpl', - 'nano/templates/telescience_console.tmpl', - 'nano/templates/pda.tmpl', - 'nano/templates/smes.tmpl', - 'nano/templates/uplink.tmpl', - 'nano/images/uiBackground.png', - 'nano/images/uiIcons16.png', - 'nano/images/uiIcons24.png', - 'nano/images/uiBackground-Syndicate.png', - 'nano/images/uiLinkPendingIcon.gif', - 'nano/images/uiMaskBackground.png', - 'nano/images/uiNoticeBackground.jpg', - 'nano/images/uiTitleFluff.png', - 'nano/images/uiTitleFluff-Syndicate.png', 'html/search.js', 'html/panels.css', 'icons/pda_icons/pda_atmos.png', diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index b7b45060bb7..782bfa23085 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -197,4 +197,33 @@ oldMob.open_uis.Cut() return 1 // success + + /** + * Sends all nano assets to the client + * This is called on user login + * + * @param client /client The user's client + * + * @return nothing + */ + +#define NANO_CSS_PATH "nano/css/" +#define NANO_IMAGES_PATH "nano/images/" +#define NANO_JS_PATH "nano/js/" +#define NANO_TEMPLATES_PATH "nano/templates/" + +/datum/nanomanager/proc/send_resources(client) + var/list/css = flist(NANO_CSS_PATH) + var/list/images = flist(NANO_IMAGES_PATH) + var/list/js = flist(NANO_JS_PATH) + var/list/templates = flist(NANO_TEMPLATES_PATH) + + for(var/file in css) + client << browse_rsc(file(NANO_CSS_PATH + file)) + for(var/file in images) + client << browse_rsc(file(NANO_IMAGES_PATH + file)) + for(var/file in js) + client << browse_rsc(file(NANO_JS_PATH + file)) + for(var/file in templates) + client << browse_rsc(file(NANO_TEMPLATES_PATH + file))