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
+2 -3
View File
@@ -76,7 +76,7 @@
if(part in overslotting_parts)
var/obj/item/overslot = wearer.get_item_by_slot(part.slot_flags)
if(overslot)
wearer.unEquip(overslot, TRUE)
wearer.drop_item_to_ground(overslot, force = TRUE)
overslotting_parts[part] = overslot
overslot.forceMove(part)
RegisterSignal(part, COMSIG_ATOM_EXITED, PROC_REF(on_overslot_exit))
@@ -104,8 +104,7 @@
to_chat(user, "<span class='warning'>You already have retracted there!</span>")
playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE)
part.flags &= ~NODROP
wearer.unEquip(part, TRUE)
part.forceMove(src)
wearer.transfer_item_to(part, src, force = TRUE)
if(overslotting_parts[part])
UnregisterSignal(part, COMSIG_ATOM_EXITED)
var/obj/item/overslot = overslotting_parts[part]