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
+6 -6
View File
@@ -1160,7 +1160,7 @@
//strip their stuff and stick it in the crate
for(var/obj/item/I in M)
if(M.unEquip(I))
if(M.drop_item_to_ground(I))
I.loc = locker
I.layer = initial(I.layer)
I.plane = initial(I.plane)
@@ -1302,7 +1302,7 @@
return
for(var/obj/item/I in M)
M.unEquip(I)
M.drop_item_to_ground(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -1334,7 +1334,7 @@
return
for(var/obj/item/I in M)
M.unEquip(I)
M.drop_item_to_ground(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -1390,7 +1390,7 @@
return
for(var/obj/item/I in M)
M.unEquip(I)
M.drop_item_to_ground(I)
if(I)
I.loc = M.loc
I.layer = initial(I.layer)
@@ -2212,7 +2212,7 @@
logmsg = "floor cluwne"
if("Shamebrero")
if(H.head)
H.unEquip(H.head, TRUE)
H.drop_item_to_ground(H.head, force = TRUE)
var/obj/item/clothing/head/sombrero/shamebrero/S = new(H.loc)
H.equip_to_slot_or_del(S, ITEM_SLOT_HEAD)
logmsg = "shamebrero"
@@ -2963,7 +2963,7 @@
if(!security)
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in H)
H.unEquip(W)
H.drop_item_to_ground(W)
if(H.client)
H.client.screen -= W
if(W)
+1 -1
View File
@@ -82,7 +82,7 @@
var/obj/item/slot_item_ID = H.get_item_by_slot(ITEM_SLOT_ID)
qdel(slot_item_ID)
var/obj/item/slot_item_hand = H.get_item_by_slot(ITEM_SLOT_RIGHT_HAND)
H.unEquip(slot_item_hand)
H.drop_item_to_ground(slot_item_hand)
var/obj/item/multisword/pure_evil/multi = new(H)
H.equip_to_slot_or_del(multi, ITEM_SLOT_RIGHT_HAND)
+2 -2
View File
@@ -9,7 +9,7 @@
return
for(var/obj/item/W in M)
M.unEquip(W)
M.drop_item_to_ground(W)
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!", 1)
@@ -28,7 +28,7 @@
return
//strip their stuff before they teleport into a cell :downs:
for(var/obj/item/W in M)
M.unEquip(W)
M.drop_item_to_ground(W)
//teleport person to cell
if(isliving(M))
var/mob/living/L = M