mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-20 07:02:30 +00:00
24 lines
520 B
Plaintext
24 lines
520 B
Plaintext
/**
|
|
* # 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
|