mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
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:
committed by
GitHub
parent
17602326bc
commit
0eafad8475
@@ -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]
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
to_chat(wearer, "<span class='warning'>Retract parts first!</span>")
|
||||
playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
|
||||
return
|
||||
if(!M.unEquip(src, silent = TRUE))
|
||||
if(!M.unequip(src, force = TRUE))
|
||||
return
|
||||
M.put_in_active_hand(src)
|
||||
else
|
||||
|
||||
@@ -148,8 +148,7 @@
|
||||
to_chat(mod.wearer, "<span class='notice'>[src] deactivated.</span>")
|
||||
|
||||
if(device)
|
||||
mod.wearer.unEquip(device, 1)
|
||||
device.forceMove(src)
|
||||
mod.wearer.transfer_item_to(device, src, force = TRUE)
|
||||
UnregisterSignal(mod.wearer, COMSIG_ATOM_EXITED)
|
||||
UnregisterSignal(mod.wearer, COMSIG_MOB_WILLINGLY_DROP)
|
||||
else
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
if(human_user.get_item_by_slot(ITEM_SLOT_BACK) && !human_user.unEquip(human_user.get_item_by_slot(ITEM_SLOT_BACK)))
|
||||
if(human_user.get_item_by_slot(ITEM_SLOT_BACK) && !human_user.drop_item_to_ground(human_user.get_item_by_slot(ITEM_SLOT_BACK)))
|
||||
return
|
||||
if(!human_user.equip_to_slot_if_possible(mod, ITEM_SLOT_BACK, disable_warning = TRUE))
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
return
|
||||
holstered = holding
|
||||
mod.wearer.visible_message("<span class='notice'>[mod.wearer] holsters [holstered].</span>", "<span class='notice'>You holster [holstered].</span>")
|
||||
mod.wearer.unEquip(mod.wearer.get_active_hand())
|
||||
mod.wearer.unequip(mod.wearer.get_active_hand())
|
||||
holstered.forceMove(src)
|
||||
else if(mod.wearer.put_in_active_hand(holstered))
|
||||
mod.wearer.visible_message("<span class='warning'>[mod.wearer] draws [msg], ready to shoot!</span>", \
|
||||
|
||||
Reference in New Issue
Block a user