mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user