<commit_before>var/datum/subsystem/nano/SSnano

/datum/subsystem/nano
	name = "NanoUI"
	can_fire = 1
	wait = 5
	priority = 16

	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]")


/datum/subsystem/nano/fire()
	var/i=1
	for(var/thing in SSnano.processing_uis)
		if(thing)
			var/datum/nanoui/ui = thing
			if(ui.src_object && ui.user)
				ui.process()
				++i
				continue
		processing_uis.Cut(i, i+1)<commit_msg>compile your shit they say<commit_after>var/datum/subsystem/nano/SSnano

/datum/subsystem/nano
	name = "NanoUI"
	can_fire = 1
	wait = 5
	priority = 16

	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]")


/datum/subsystem/nano/fire()
	var/i=1
	for(var/thing in SSnano.processing_uis)
		if(thing)
			var/datum/nanoui/ui = thing
			if(ui.src_object && ui.user)
				ui.process()
				++i
				continue
		processing_uis.Cut(i, i+1)
{'fraction_non_alphanumeric': 0.14108527131782947, 'fraction_numerical': 0.008527131782945736, 'mean_word_length': 3.6254480286738353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2959988', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1015, 'n_words': 227}