mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-27 15:17:21 +01:00
fixes a memory leak with mannequins and the issue that then comes with fixing it (#8942)
* fixes a memory leak with mannequins and the issue of non-derobotizing limbs on preference mannequins that comes with fixing it * almost didn't see that
This commit is contained in:
@@ -349,7 +349,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
var/status = pref.organ_data[name]
|
||||
var/obj/item/organ/external/O = character.organs_by_name[name]
|
||||
if(O)
|
||||
if(status == "amputated")
|
||||
if(status == null)
|
||||
O.derobotize()
|
||||
else if(status == "amputated")
|
||||
O.remove_rejuv()
|
||||
else if(status == "cyborg")
|
||||
if(pref.rlimb_data[name])
|
||||
@@ -359,15 +361,15 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
for(var/name in list(O_HEART,O_EYES,O_VOICE,O_LUNGS,O_LIVER,O_KIDNEYS,O_SPLEEN,O_STOMACH,O_INTESTINE,O_BRAIN))
|
||||
var/status = pref.organ_data[name]
|
||||
if(!status)
|
||||
continue
|
||||
var/obj/item/organ/I = character.internal_organs_by_name[name]
|
||||
if(istype(I, /obj/item/organ/internal/brain))
|
||||
var/obj/item/organ/external/E = character.get_organ(I.parent_organ)
|
||||
if(E.robotic < ORGAN_ASSISTED)
|
||||
continue
|
||||
if(I)
|
||||
if(status == "assisted")
|
||||
if(status == null)
|
||||
I.derobotize()
|
||||
else if(status == "assisted")
|
||||
I.mechassist()
|
||||
else if(status == "mechanical")
|
||||
I.robotize()
|
||||
|
||||
Reference in New Issue
Block a user