diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f66371e3005..22a879adae3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -294,27 +294,6 @@ /mob/living/carbon/proc/canBeHandcuffed() return 0 -/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..() AND THAT COST ME AN ENTIRE DAY OF DEBUGGING. - . = ..() //Sets the default return value to what the parent returns. - if(!. || !I) //We don't want to set anything to null if the parent returned 0. - return - - if(I == back) - back = null - update_inv_back(0) - else if(I == wear_mask) - if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt. - return - wear_mask = null - update_inv_wear_mask(0) - else if(I == handcuffed) - handcuffed = null - if(buckled && buckled.buckle_requires_restraints) - buckled.unbuckle_mob() - update_inv_handcuffed(0) - else if(I == legcuffed) - legcuffed = null - update_inv_legcuffed(0) /mob/living/carbon/show_inv(mob/user) user.set_machine(src) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 8dc0e485288..876f23fc37a 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -17,9 +17,9 @@ return null -/mob/living/carbon/unEquip(obj/item/I) - . = ..() - if(!. || !I) +/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..() AND THAT COST ME AN ENTIRE DAY OF DEBUGGING. + . = ..() //Sets the default return value to what the parent returns. + if(!. || !I) //We don't want to set anything to null if the parent returned 0. return if(I == head) @@ -27,4 +27,20 @@ if(I.flags & BLOCKHAIR) update_hair(0) update_inv_head(0) + else if(I == back) + back = null + update_inv_back(0) + else if(I == wear_mask) + if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt. + return + wear_mask = null + update_inv_wear_mask(0) + else if(I == handcuffed) + handcuffed = null + if(buckled && buckled.buckle_requires_restraints) + buckled.unbuckle_mob() + update_inv_handcuffed(0) + else if(I == legcuffed) + legcuffed = null + update_inv_legcuffed(0) diff --git a/tgstation.dme b/tgstation.dme index 2780021997d..4be5be7fb80 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1059,6 +1059,7 @@ #include "code\modules\mob\living\carbon\carbon_defines.dm" #include "code\modules\mob\living\carbon\death.dm" #include "code\modules\mob\living\carbon\emote.dm" +#include "code\modules\mob\living\carbon\inventory.dm" #include "code\modules\mob\living\carbon\life.dm" #include "code\modules\mob\living\carbon\say.dm" #include "code\modules\mob\living\carbon\update_icons.dm"