Fixes foam slipping people standing on tables and racks (#92174)

## About The Pull Request

Closes #92150

## Changelog
🆑
fix: Fixed foam slipping people standing on tables and racks
/🆑
This commit is contained in:
SmArtKar
2025-07-19 20:29:32 -04:00
committed by Roxy
parent aa361b7b71
commit d2dc79c75e
@@ -38,7 +38,7 @@
/obj/effect/particle_effect/fluid/foam/Initialize(mapload)
. = ..()
if(slippery_foam)
AddComponent(/datum/component/slippery, 100)
AddComponent(/datum/component/slippery, 100, can_slip_callback = CALLBACK(src, PROC_REF(try_slip)))
if(HAS_TRAIT(loc, TRAIT_ELEVATED_TURF))
layer = WATER_LEVEL_LAYER
create_reagents(1000, REAGENT_HOLDER_INSTANT_REACT)
@@ -137,6 +137,9 @@
lifetime -= seconds_per_tick
return TRUE
/obj/effect/particle_effect/fluid/foam/proc/try_slip(mob/living/slipper, mob/living/slippee)
return !HAS_TRAIT(slippee, TRAIT_MOB_ELEVATED)
/obj/effect/particle_effect/fluid/foam/spread(seconds_per_tick = 0.2 SECONDS)
if(group.total_size > group.target_size)
return