Fixes dragging clothing with storage onto an occupied hand

* If you mouse-drag certain items onto a hand which is already holding something, the item goes into limbo.
* The reason this happens is that the standard code handling drags is directly calling usr.u_equip, despite the comment on that proc clearly saying never to do that.  So it just throws it to limbo and the next line attempting to put it in hand does nothing becuase the hand is occupied.   Better way is to call unEquip, so the item will drop on the ground if it fails.
* Fixes https://github.com/VOREStation/VOREStation/issues/394
This commit is contained in:
Leshana
2017-02-09 14:47:33 -05:00
parent b0c87a6e19
commit 283b58e93d
4 changed files with 8 additions and 8 deletions

View File

@@ -23,10 +23,10 @@
if(!M.restrained() && !M.stat)
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)

View File

@@ -98,10 +98,10 @@ var/global/photo_count = 0
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.unEquip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return