From b44feeff876bc255902f7adc361a4abf3e52689a Mon Sep 17 00:00:00 2001 From: Filatelele Date: Mon, 1 Jul 2024 18:48:11 +0300 Subject: [PATCH] feat(stealth): will no longer play pickup anims on walk --- code/game/objects/items.dm | 6 ++++-- code/modules/mob/living/living.dm | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c5751c3e9f5..b4363324ef3 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -381,8 +381,10 @@ if(user.put_in_active_hand(src)) if(isturf(old_loc)) - var/obj/effect/temporary/item_pickup_ghost/ghost = new /obj/effect/temporary/item_pickup_ghost(old_loc, src) - ghost.animate_towards(user) + var/mob/living/l_user = user + if(l_user.can_animate_pickup()) + var/obj/effect/temporary/item_pickup_ghost/ghost = new /obj/effect/temporary/item_pickup_ghost(old_loc, src) + ghost.animate_towards(user) if(randpixel) pixel_x = rand(-randpixel, randpixel) pixel_y = rand(-randpixel/2, randpixel/2) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index abe7dcf945f..ad2502f08f2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -948,3 +948,6 @@ . = ..() if(stat != old_stat) SEND_SIGNAL(src, SIGNAL_STAT_SET, src, old_stat, new_stat) + +/mob/living/proc/can_animate_pickup() + return m_intent != M_WALK