mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-19 06:32:25 +00:00
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.
19 lines
530 B
Plaintext
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 ..() |