Pick up fixes (#10922)

Pick up animation now does the little shake at the start correctly.

also cleans up some stuff here and there
This commit is contained in:
Wowzewow (Wezzy)
2021-01-10 12:55:09 +02:00
committed by GitHub
parent 117fb99942
commit e0854fd1e3
7 changed files with 83 additions and 39 deletions
+5 -3
View File
@@ -324,9 +324,11 @@
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
pixel_x = 0
pixel_y = 0
do_pickup_animation(user)
throwing = 0
var/atom/old_loc = loc
if(user.put_in_active_hand(src) && old_loc)
if((user != old_loc) && (user != old_loc.get_holding_mob()))
do_pickup_animation(user, old_loc)
// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
/obj/item/proc/on_exit_storage(obj/item/storage/S as obj)