mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 06:00:23 +01:00
Ports Iconforge, uses for kitchen recipes (#16747)
* Port iconforge * Convert kitchen_icons for the microwave to iconforge * Fix to pass lint * brings thsoe back * Re-enable cross round caching for normal spritesheets --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
845d0caffe
commit
6ab8ea768d
@@ -28,22 +28,28 @@
|
||||
///pass in a valid file_hash if you have one to save it from needing to do it again.
|
||||
///pass in a valid dmi file path string e.g. "icons/path/to/dmi_file.dmi" to make generating the hash less expensive
|
||||
/datum/asset_cache_item/New(name, file, file_hash, dmi_file_path)
|
||||
if (!isfile(file))
|
||||
if(!isfile(file))
|
||||
file = fcopy_rsc(file)
|
||||
|
||||
hash = file_hash
|
||||
if(length(file) == 0)
|
||||
log_asset("WARNING: [name] is an empty file, this is almost certainly not intended and could indicate a bad boot!")
|
||||
message_admins("ASSET WARNING: [name] is an empty file, this is almost certainly not intended and could indicate a bad boot!")
|
||||
|
||||
hash = file_hash
|
||||
//the given file is directly from a dmi file and is thus in the rsc already, we know that its file_hash will be correct
|
||||
if(!hash)
|
||||
if(dmi_file_path)
|
||||
hash = md5(file)
|
||||
else
|
||||
hash = md5asfile(file) //icons sent to the rsc md5 incorrectly when theyre given incorrect data
|
||||
if (!hash)
|
||||
CRASH("invalid asset sent to asset cache")
|
||||
if(!hash)
|
||||
hash = md5(fcopy_rsc(file))
|
||||
if (!hash)
|
||||
CRASH("invalid asset sent to asset cache")
|
||||
log_debug("asset cache unexpected success of second fcopy_rsc")
|
||||
src.name = name
|
||||
var/extstart = findlasttext(name, ".")
|
||||
if (extstart)
|
||||
if(extstart)
|
||||
ext = ".[copytext(name, extstart+1)]"
|
||||
resource = file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user