mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
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 🆑 fix: mercury & lithium will no longer make you randomly move outside of cryotubes or in ground less turfs (space, water, lava etc) /🆑
This commit is contained in:
@@ -1007,7 +1007,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"))
|
||||
@@ -1119,7 +1119,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"))
|
||||
|
||||
Reference in New Issue
Block a user