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
@@ -39,11 +39,11 @@
user.visible_message("<span class='hierophant_warning'>[user] fades out, leaving [user.p_their()] belongings behind!</span>")
for(var/obj/item/I in user)
if(I != src)
user.unEquip(I)
user.drop_item_to_ground(I)
for(var/turf/T in RANGE_TURFS(1, user))
var/obj/effect/temp_visual/hierophant/blast/B = new(T, user, TRUE)
B.damage = 0
user.unEquip(src) //Drop us last, so it goes on top of their stuff
user.drop_item_to_ground(src) //Drop us last, so it goes on top of their stuff
qdel(user)
return OBLITERATION
@@ -91,7 +91,7 @@
playsound(loc, "rustle", 50, TRUE, -5)
if(istype(over_object, /atom/movable/screen/inventory/hand))
if(!M.unEquip(src))
if(!M.unequip(src))
return
M.put_in_active_hand(src)
else
@@ -379,7 +379,7 @@
if(ishuman(owner) && !QDELETED(owner))
if(ishuman(loc))
var/mob/living/carbon/human/thief = loc
thief.unEquip(src, TRUE, TRUE) // You're not my owner!
thief.drop_item_to_ground(src, force = TRUE, silent = TRUE) // You're not my owner!
if(owner.stat == DEAD)
qdel(src) // Oh no! Oh well a new rod will be made from the STATUS_EFFECT_HIPPOCRATIC_OATH
return