From 70dbfc468df0a6e14eaeba1cb15f74012ac04c38 Mon Sep 17 00:00:00 2001 From: moxian Date: Sun, 24 Jul 2022 19:12:46 +0000 Subject: [PATCH] Fix gc issue with RD armor spawner (#18541) --- code/game/objects/items.dm | 4 ++-- code/modules/clothing/spacesuits/plasmamen.dm | 1 - code/modules/clothing/suits/armor.dm | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 52b88a31332..d0b27207dac 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -130,8 +130,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/New() ..() - for(var/path in actions_types) - new path(src, action_icon[path], action_icon_state[path]) if(!hitsound) if(damtype == "fire") @@ -144,6 +142,8 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/Initialize(mapload) . = ..() + for(var/path in actions_types) + new path(src, action_icon[path], action_icon_state[path]) if(istype(loc, /obj/item/storage)) //marks all items in storage as being such in_storage = TRUE diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index c8f9cc3124f..5cf53314d1a 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -59,7 +59,6 @@ /obj/item/clothing/head/helmet/space/plasmaman/update_icon_state() icon_state = "[initial(icon_state)][on ? "-light":""]" item_state = icon_state - actions_types = list(/datum/action/item_action/toggle_helmet_light) /obj/item/clothing/head/helmet/space/plasmaman/update_overlays() . = ..() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 3370b0e772e..ffe6230131a 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -449,7 +449,7 @@ . = ..() var/spawnpath = pick(subtypesof(/obj/item/clothing/suit/armor/reactive) - /obj/item/clothing/suit/armor/reactive/random) new spawnpath(loc) - qdel(src) + return INITIALIZE_HINT_QDEL //All of the armor below is mostly unused