From b841a7466cb919b6ce57222e9585470dd241f6cb Mon Sep 17 00:00:00 2001 From: Morrow Date: Sat, 18 Nov 2023 20:05:13 -0500 Subject: [PATCH 1/3] initial --- 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 8e19a19053..06058e1331 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 1191b737fe..0084461e3c 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 75ee12cadd41652e6b3593e9a1bf7fa585481b4b Mon Sep 17 00:00:00 2001 From: Morrow Date: Mon, 20 Nov 2023 00:13:46 -0500 Subject: [PATCH 2/3] Removing testing stuff --- code/modules/asset_cache/asset_list.dm | 6 ------ code/modules/asset_cache/asset_list_items.dm | 7 ++----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 06058e1331..8e19a19053 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 0084461e3c..376040b25c 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -305,16 +305,13 @@ 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) + for(var/k in GLOB.vending_products) var/atom/item = k var/icon_file = initial(item.icon) var/icon_state = initial(item.icon_state) var/icon/I - if (!ispath(item, /atom)) + if(!ispath(item, /atom)) log_debug("not atom! [item]") continue From 410d5ab7031fd2b6ca546ef2e1593aedbd2a60ca Mon Sep 17 00:00:00 2001 From: Morrow Date: Mon, 20 Nov 2023 00:15:45 -0500 Subject: [PATCH 3/3] and just in case who knows --- code/modules/asset_cache/asset_list_items.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 376040b25c..1463584a63 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -318,6 +318,7 @@ var/imgid = replacetext(replacetext("[k]", "/obj/item/", ""), "/", "-") if(sprites[imgid]) + stack_trace("[imgid] has already been registered in vending products spritesheet!") continue if(icon_state in icon_states(icon_file))