From 9e90d582e55b514da6c780d1f61b497c799f48e3 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 31 Aug 2017 08:39:56 -0500 Subject: [PATCH] Fixes dummy unequip runtimes. --- .../mob/living/carbon/human/inventory.dm | 2 +- code/modules/mob/living/carbon/inventory.dm | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index da99954f29..55203bf2e5 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -147,7 +147,7 @@ . = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should. if(!. || !I) return - if(index && dna.species.mutanthands) + if(index && !QDELETED(src) && dna.species.mutanthands) //hand freed, fill with claws, skip if we're getting deleted. put_in_hand(new dna.species.mutanthands(), index) if(I == wear_suit) if(s_store && invdrop) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index afd4d832da..4592d76138 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -95,24 +95,30 @@ if(I == head) head = null - head_update(I) + if(!QDELETED(src)) + head_update(I) else if(I == back) back = null - update_inv_back() + if(!QDELETED(src)) + update_inv_back() else if(I == wear_mask) wear_mask = null - wear_mask_update(I, toggle_off = 1) + if(!QDELETED(src)) + wear_mask_update(I, toggle_off = 1) if(I == wear_neck) wear_neck = null - update_inv_neck(I) + if(!QDELETED(src)) + update_inv_neck(I) else if(I == handcuffed) handcuffed = null if(buckled && buckled.buckle_requires_restraints) buckled.unbuckle_mob(src) - update_handcuffed() + if(!QDELETED(src)) + update_handcuffed() else if(I == legcuffed) legcuffed = null - update_inv_legcuffed() + if(!QDELETED(src)) + update_inv_legcuffed() //handle stuff to update when a mob equips/unequips a mask. /mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)