Fixes item pickup animation playing when you move some things to containers on your person (#91128)

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
Joshua Kidder
2025-05-15 16:14:08 -04:00
committed by Roxy
co-authored by SmArtKar
parent 075a32994b
commit 48d0d920b1
+9 -2
View File
@@ -351,9 +351,16 @@
return to_drop
//for when the item will be immediately placed in a loc other than the ground
/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE, silent = TRUE)
/mob/proc/transferItemToLoc(obj/item/I, newloc = null, force = FALSE, silent = TRUE, animated = null)
. = doUnEquip(I, force, newloc, FALSE, silent = silent)
I.do_pickup_animation(newloc, src)
//This proc wears a lot of hats for moving items around in different ways,
//so we assume unhandled cases for checking to animate can safely be handled
//with the same logic we handle animating putting items in container (container on your person isn't animated)
if(isnull(animated))
//if the item's ultimate location is us, we don't animate putting it wherever
animated = !(get(newloc, /mob) == src)
if(animated)
I.do_pickup_animation(newloc, src)
//visibly unequips I but it is NOT MOVED AND REMAINS IN SRC, newloc is for signal handling checks only which hints where you want to move the object after removal
//item MUST BE FORCEMOVE'D OR QDEL'D