mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-26 22:46:15 +01:00
WIP - TG Asset Cache
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
if (CONFIG_GET(flag/log_virus))
|
||||
WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]")
|
||||
|
||||
/proc/log_asset(text)
|
||||
WRITE_LOG(GLOB.world_asset_log, "ASSET: [text]")
|
||||
|
||||
/proc/log_access(text)
|
||||
if (CONFIG_GET(flag/log_access))
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]")
|
||||
|
||||
@@ -1128,9 +1128,10 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
if (!isicon(I))
|
||||
if (isfile(thing)) //special snowflake
|
||||
var/name = sanitize_filename("[generate_asset_name(thing)].png")
|
||||
register_asset(name, thing)
|
||||
if(!SSassets.cache[name])
|
||||
register_asset(name, thing)
|
||||
for (var/thing2 in targets)
|
||||
send_asset(thing2, key, FALSE)
|
||||
send_asset(thing2, key)
|
||||
return "<img class='icon icon-misc' src=\"[url_encode(name)]\">"
|
||||
var/atom/A = thing
|
||||
if (isnull(dir))
|
||||
@@ -1152,9 +1153,10 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
I = icon(I, icon_state, dir, frame, moving)
|
||||
|
||||
key = "[generate_asset_name(I)].png"
|
||||
register_asset(key, I)
|
||||
if(!SSassets.cache[key])
|
||||
register_asset(key, I)
|
||||
for (var/thing2 in targets)
|
||||
send_asset(thing2, key, FALSE)
|
||||
send_asset(thing2, key)
|
||||
|
||||
return "<img class='icon icon-[icon_state]' src=\"[url_encode(key)]\">"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user