Update asset_cache to modern /tg/, and make TGUI compatible with it. CDN support, etc.

This commit is contained in:
ShadowLarkens
2020-07-19 20:46:12 -07:00
parent f57cddf618
commit 126cc6b5da
27 changed files with 1110 additions and 405 deletions
@@ -0,0 +1,23 @@
/**
* # asset_cache_item
*
* An internal datum containing info on items in the asset cache. Mainly used to cache md5 info for speed.
**/
/datum/asset_cache_item
var/name
var/url
var/md5
var/resource
/datum/asset_cache_item/New(name, file)
if (!isfile(file))
file = fcopy_rsc(file)
md5 = md5(file)
if (!md5)
md5 = md5(fcopy_rsc(file))
if (!md5)
CRASH("invalid asset sent to asset cache")
log_world("asset cache unexpected success of second fcopy_rsc")
src.name = name
url = name
resource = file