Ports "Fix bicon(icon2html) showing full dmis, fix asset cache hashes being incorrect." (#13347)

This commit is contained in:
Letter N
2020-09-06 15:23:28 +08:00
committed by GitHub
parent 8b59b4a80d
commit fd2ec66757
3 changed files with 33 additions and 10 deletions

View File

@@ -24,12 +24,10 @@
/datum/asset_cache_item/New(name, file)
if (!isfile(file))
file = fcopy_rsc(file)
hash = md5(file)
hash = md5asfile(file) //icons sent to the rsc sometimes md5 incorrectly
if (!hash)
hash = md5(fcopy_rsc(file))
if (!hash)
CRASH("invalid asset sent to asset cache")
debug_world_log("asset cache unexpected success of second fcopy_rsc")
CRASH("invalid asset sent to asset cache")
src.name = name
var/extstart = findlasttext(name, ".")
if (extstart)