mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +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:
@@ -70,11 +70,17 @@
|
||||
if(!M.restrained() && !M.stat && can_use())
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(M.unEquip(src, silent = TRUE))
|
||||
M.put_in_r_hand(src)
|
||||
if(M.unequip(src))
|
||||
if(M.r_hand)
|
||||
M.drop_item_to_ground(src)
|
||||
else
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
if(M.unEquip(src, silent = TRUE))
|
||||
M.put_in_l_hand(src)
|
||||
if(M.unequip(src))
|
||||
if(M.l_hand)
|
||||
M.drop_item_to_ground(src)
|
||||
else
|
||||
M.put_in_l_hand(src)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
if(!user.restrained() && !user.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
user.unEquip(master_item, silent = TRUE)
|
||||
user.unequip(master_item)
|
||||
user.put_in_r_hand(master_item)
|
||||
if("l_hand")
|
||||
user.unEquip(master_item, silent = TRUE)
|
||||
user.unequip(master_item)
|
||||
user.put_in_l_hand(master_item)
|
||||
master_item.add_fingerprint(user)
|
||||
return 0
|
||||
|
||||
@@ -150,11 +150,11 @@
|
||||
if(!M.restrained() && !M.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(!M.unEquip(src, silent = TRUE))
|
||||
if(!M.unequip(src))
|
||||
return
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
if(!M.unEquip(src, silent = TRUE))
|
||||
if(!M.unequip(src))
|
||||
return
|
||||
M.put_in_l_hand(src)
|
||||
add_fingerprint(usr)
|
||||
@@ -445,7 +445,7 @@
|
||||
if(user)
|
||||
if(!Adjacent(user) && !isnewplayer(user))
|
||||
return FALSE
|
||||
if(!user.unEquip(I, silent = TRUE))
|
||||
if(!user.unequip(I))
|
||||
return FALSE
|
||||
user.update_icons() //update our overlays
|
||||
if(QDELING(I))
|
||||
|
||||
Reference in New Issue
Block a user