From 69da81eaf9e84b6b22822e2a7076f5c1f869ea80 Mon Sep 17 00:00:00 2001 From: HowToLoLu Date: Wed, 25 Dec 2024 06:36:38 -0600 Subject: [PATCH] Fixes a Hard Del in regenerate_organs (#12068) --- code/modules/mob/living/carbon/human/species.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 57b1155aed6bf..2c199c677542b 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -334,7 +334,7 @@ GLOBAL_LIST_EMPTY(features_by_species) oldorgan = null else oldorgan.Remove(C, special = TRUE) - required_organs -= oldorgan + required_organs -= oldorgan.type QDEL_NULL(oldorgan) //we cannot just tab this out because we need to skip the deleting if it is a decoy brain. if(oldorgan) @@ -342,7 +342,7 @@ GLOBAL_LIST_EMPTY(features_by_species) else if(should_have && !(initial(neworgan.zone) in excluded_zones)) used_neworgan = TRUE neworgan.Insert(C, TRUE, FALSE) - required_organs |= neworgan + required_organs |= neworgan.type if(!used_neworgan) qdel(neworgan)