Fixes Hat removal code by reticking carbon/inventory and moving carbon inventory code back there. (Mystery coder who undid this, Curse you!)

This commit is contained in:
Remie Richards
2015-03-29 14:45:09 +01:00
parent a127c9403a
commit 2dec0e8fa4
3 changed files with 20 additions and 24 deletions
-21
View File
@@ -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)
+19 -3
View File
@@ -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)