From 698f5f92ba05fb88b09335ebf8609a30180412ab Mon Sep 17 00:00:00 2001 From: Morrow Date: Sat, 18 Nov 2023 20:05:13 -0500 Subject: [PATCH 1/2] initial (cherry picked from commit b841a7466cb919b6ce57222e9585470dd241f6cb) --- code/modules/asset_cache/asset_list.dm | 6 ++++++ code/modules/asset_cache/asset_list_items.dm | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 8e19a1905300..06058e133170 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -18,6 +18,12 @@ GLOBAL_LIST_EMPTY(asset_datums) GLOB.asset_datums[type] = src register() +/datum/asset/Destroy(force, ...) + . = ..() + + log_debug("[type] has been destroyed.") + stack_trace("[type] has been destroyed.") // Remove these after testing - Morrow + /datum/asset/proc/get_url_mappings() return list() diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index fbb9e5d06ac1..30f9412b96ed 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -305,6 +305,9 @@ name = "vending" /datum/asset/spritesheet/vending_products/register() + log_debug("[type] is registering.") + stack_trace("[type] is registering.") // Remove these after testing - Morrow + for (var/k in GLOB.vending_products) var/atom/item = k var/icon_file = initial(item.icon) @@ -315,7 +318,9 @@ log_debug("not atom! [item]") continue - if (sprites[icon_file]) + var/imgid = replacetext(replacetext("[k]", "/obj/item/", ""), "/", "-") + + if(sprites[imgid]) continue if(icon_state in icon_states(icon_file)) @@ -339,7 +344,6 @@ item = new k() I = icon(item.icon, item.icon_state, SOUTH) qdel(item) - var/imgid = replacetext(replacetext("[k]", "/obj/item/", ""), "/", "-") Insert(imgid, I) return ..() From 2d489bc38b95bbf48b01890fdccde9f66cf17b59 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sat, 18 Nov 2023 22:51:37 -0800 Subject: [PATCH 2/2] Remove debug logging --- code/modules/asset_cache/asset_list.dm | 6 ------ code/modules/asset_cache/asset_list_items.dm | 3 --- 2 files changed, 9 deletions(-) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 06058e133170..8e19a1905300 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -18,12 +18,6 @@ GLOBAL_LIST_EMPTY(asset_datums) GLOB.asset_datums[type] = src register() -/datum/asset/Destroy(force, ...) - . = ..() - - log_debug("[type] has been destroyed.") - stack_trace("[type] has been destroyed.") // Remove these after testing - Morrow - /datum/asset/proc/get_url_mappings() return list() diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 30f9412b96ed..56d9aac5ad70 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -305,9 +305,6 @@ name = "vending" /datum/asset/spritesheet/vending_products/register() - log_debug("[type] is registering.") - stack_trace("[type] is registering.") // Remove these after testing - Morrow - for (var/k in GLOB.vending_products) var/atom/item = k var/icon_file = initial(item.icon)