Files
Polaris/code/controllers/subsystems/assets.dm
Leshana 63f0f69ce8 Add "icon sheet" asset type
This asset class bundles entire dmi files worth of icons together into a single CSS file using inline data urls.  Much faster than sending dozens of files.
Also changed it so we don't need a hard coded list of all types of asset daturms.
2020-04-25 15:58:27 -04:00

19 lines
530 B
Plaintext

SUBSYSTEM_DEF(assets)
name = "Assets"
init_order = INIT_ORDER_ASSETS
flags = SS_NO_FIRE
var/list/cache = list()
var/list/preload = list()
/datum/controller/subsystem/assets/Initialize(timeofday)
for(var/type in typesof(/datum/asset))
var/datum/asset/A = type
if (type != initial(A._abstract))
get_asset_datum(type)
preload = cache.Copy() //don't preload assets generated during the round
for(var/client/C in GLOB.clients)
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
return ..()