mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 16:37:19 +01:00
Bioaug Hard Del Fix (#22273)
This PR fixes a hard del related to any kind of direct organ replacement via loadouts, which it turns out all of them were doing. But it was most commonly showing up with bioaugs because the boosted heart and boosted liver are the only organs besides custom items that replace an internal organ during loadouts spawning.
This commit is contained in:
@@ -82,6 +82,8 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(dna)
|
||||
|
||||
if(!owner)
|
||||
return ..()
|
||||
|
||||
@@ -90,14 +92,15 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
owner.internal_organs -= src
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
if(owner.internal_organs_by_name)
|
||||
owner.internal_organs_by_name -= src
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
if(owner.organs)
|
||||
owner.organs -= src
|
||||
if(owner.organs_by_name)
|
||||
owner.organs_by_name -= src
|
||||
owner.organs_by_name[organ_tag] = null
|
||||
owner.organs_by_name -= organ_tag
|
||||
|
||||
owner = null
|
||||
QDEL_NULL(dna)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user