Refactor /mob/unEquip. (#27720)

* Refactor /mob/unEquip.

* fix things found in testing

* more fixes from testing

* fix removal of hooded suits

* fix flayers inability to deploy swarmprod

* fix changeling blade activation

* unnecessary parens

* pass default unequip args to proc overrides

* fix belts being able to forceMove into full hands
This commit is contained in:
warriorstar-orion
2025-01-10 01:58:35 +00:00
committed by GitHub
parent 17602326bc
commit 0eafad8475
213 changed files with 587 additions and 585 deletions
@@ -171,7 +171,7 @@
return ..()
var/mob/living/carbon/human/C = M
if(is_robotic() && HAS_TRAIT(C, TRAIT_IPC_JOINTS_MAG) && isnull(C.bodyparts_by_name[limb_name]))
user.unEquip(src)
user.drop_item_to_ground(src)
replaced(C)
C.update_body()
C.updatehealth()
@@ -749,12 +749,12 @@ Note that amputating the affected organ does in fact remove the infection from t
holder.visible_message(\
"\The [holder.handcuffed.name] falls off of [holder.name].",\
"\The [holder.handcuffed.name] falls off you.")
holder.unEquip(holder.handcuffed)
holder.drop_item_to_ground(holder.handcuffed)
if(holder.legcuffed && (body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT)))
holder.visible_message(\
"\The [holder.legcuffed.name] falls off of [holder.name].",\
"\The [holder.legcuffed.name] falls off you.")
holder.unEquip(holder.legcuffed)
holder.drop_item_to_ground(holder.legcuffed)
/obj/item/organ/external/proc/fracture(silent = FALSE)
if(is_robotic())