More harddel fixes. (#7861)

Silicons, brainmobs and mannequins should now delete properly.
This commit is contained in:
Matt Atlas
2020-01-04 02:56:10 +01:00
committed by GitHub
parent f0a06ed679
commit fb078a207b
7 changed files with 47 additions and 5 deletions
+1
View File
@@ -41,6 +41,7 @@
/obj/item/clothing/Destroy()
STOP_PROCESSING(SSprocessing, src)
QDEL_NULL_LIST(accessories)
return ..()
//Updates the icons of the mob wearing the clothing item, if any.
+1 -2
View File
@@ -134,8 +134,7 @@
var/mob/living/silicon/robot/borg = loc
borg.mmi = null
if(brainmob)
qdel(brainmob)
brainmob = null
QDEL_NULL(brainmob)
return ..()
/obj/item/device/mmi/radio_enabled
@@ -14,6 +14,7 @@
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
container = null
return ..()
/mob/living/carbon/brain/say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
@@ -7,7 +7,7 @@
/mob/living/carbon/brain/gib()
if(istype(container, /obj/item/device/mmi))
qdel(container)//Gets rid of the MMI if there is one
QDEL_NULL(container)//Gets rid of the MMI if there is one
if(loc)
if(istype(loc,/obj/item/organ/internal/brain))
qdel(loc)//Gets rid of the brain item
@@ -48,6 +48,7 @@
/mob/living/silicon/Destroy()
silicon_mob_list -= src
QDEL_NULL(idcard)
QDEL_NULL(common_radio)
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
AH.unregister_alarm(src)
return ..()
+1 -2
View File
@@ -39,8 +39,7 @@
/obj/item/organ/internal/brain/Destroy()
if(brainmob)
qdel(brainmob)
brainmob = null
QDEL_NULL(brainmob)
return ..()
/obj/item/organ/internal/brain/removed(var/mob/living/user)