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.
This commit is contained in:
Leshana
2020-04-25 12:15:05 -04:00
parent 4d67e76a50
commit 63f0f69ce8
2 changed files with 69 additions and 3 deletions

View File

@@ -6,9 +6,11 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
/datum/controller/subsystem/assets/Initialize(timeofday)
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
var/datum/asset/A = new type()
A.register()
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