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-09 20:58:35 -05:00
committed by GitHub
parent 17602326bc
commit 0eafad8475
213 changed files with 587 additions and 585 deletions
+7 -5
View File
@@ -34,12 +34,14 @@
return FALSE
if(!A1.remove_item_from_storage(src))
if(user)
user.remove_from_mob(A1)
A1.forceMove(src)
user.transfer_item_to(A1, src)
else
A1.forceMove(src)
if(!A2.remove_item_from_storage(src))
if(user)
user.remove_from_mob(A2)
A2.forceMove(src)
user.transfer_item_to(A2, src)
else
A2.forceMove(src)
A1.holder = src
A2.holder = src
a_left = A1
@@ -171,7 +173,7 @@
var/turf/T = get_turf(src)
if(!T)
return FALSE
user.unEquip(src, TRUE, TRUE)
user.unequip(src, force = TRUE)
if(a_left)
a_left.holder = null
a_left.forceMove(T)
+1 -1
View File
@@ -110,7 +110,7 @@
var/obj/item/onetankbomb/R = new /obj/item/onetankbomb(loc)
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.unequip(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part