From 7c9d3e7414d6ddc1c9a4a155316b543c74710063 Mon Sep 17 00:00:00 2001 From: Bloop <13398309+vinylspiders@users.noreply.github.com> Date: Wed, 27 Dec 2023 10:54:22 -0500 Subject: [PATCH] Adds turf checks for mercury & lithium random step logic. (#80586) (#125) Adds turf checks for mercury & lithium random step logic. (#80586) ## About The Pull Request - Fixes #74092 We not only want to make sure it's a turf but also a ground turf (i.e. something you can stand on and not turfs like lava, water, space etc) so you know you can use your legs to move on that ground. ## Changelog :cl: fix: mercury & lithium will no longer make you randomly move outside of cryotubes or in ground less turfs (space, water, lava etc) /:cl: Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> --- code/modules/reagents/chemistry/reagents/other_reagents.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index b85f0e8b6ca..625947d960a 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1028,7 +1028,7 @@ /datum/reagent/mercury/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) . = ..() - if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && !isspaceturf(affected_mob.loc)) + if(!HAS_TRAIT(src, TRAIT_IMMOBILIZED) && isturf(affected_mob.loc) && !isgroundlessturf(affected_mob.loc)) step(affected_mob, pick(GLOB.cardinals)) if(SPT_PROB(3.5, seconds_per_tick)) affected_mob.emote(pick("twitch","drool","moan")) @@ -1140,7 +1140,7 @@ /datum/reagent/lithium/on_mob_life(mob/living/carbon/affected_mob, seconds_per_tick, times_fired) . = ..() - if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && !isspaceturf(affected_mob.loc) && isturf(affected_mob.loc)) + if(!HAS_TRAIT(affected_mob, TRAIT_IMMOBILIZED) && isturf(affected_mob.loc) && !isgroundlessturf(affected_mob.loc)) step(affected_mob, pick(GLOB.cardinals)) if(SPT_PROB(2.5, seconds_per_tick)) affected_mob.emote(pick("twitch","drool","moan"))