Skip to content

Commit

Permalink
huh
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxilmaniac committed Dec 15, 2024
1 parent f04db91 commit 30159c3
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions code/game/turfs/open/water.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,29 +110,24 @@
immerse_overlay_alpha = 190
fishing_datum = /datum/fish_source/hot_spring
/// Holder for the steam particles
var/obj/effect/abstract/particle_holder/cached/steam_effect
var/obj/effect/abstract/particle_holder/cached/particle_effect

/turf/open/water/hot_spring/Initialize(mapload)
. = ..()
// We need to add the immerse element now because the icon_states are randomized and
// we don't want to end up with 4 different immerse elements, which would cause
// the immerse trait to be repeatedly removed and readded as someone moves within the pool,
// replacing the status effect over and over, which can be seen through the status effect alert icon.
AddElement(/datum/element/immerse, icon, icon_state, "immerse", immerse_overlay_color, alpha = immerse_overlay_alpha)
immerse_added = TRUE
icon_state = "pool_[rand(1, 4)]"
steam_effect = new(src, /particles/hotspring_steam, 4)
particle_effect = new(src, /particles/hotspring_steam, 4)
//render the steam over mobs and objects on the game plane
steam_effect.vis_flags &= ~VIS_INHERIT_PLANE
particle_effect.vis_flags &= ~VIS_INHERIT_PLANE
//And be unaffected by ambient occlusions, which would render the steam grey
steam_effect.plane = MUTATE_PLANE(MASSIVE_OBJ_PLANE, src)
particle_effect.plane = MUTATE_PLANE(MASSIVE_OBJ_PLANE, src)
add_filter("hot_spring_waves", 1, wave_filter(y = 1, size = 1, offset = 0, flags = WAVE_BOUNDED))
var/filter = get_filter("hot_spring_waves")
animate(filter, offset = 1, time = 3 SECONDS, loop = -1, easing = SINE_EASING|EASE_IN|EASE_OUT)
animate(offset = 0, time = 3 SECONDS, easing = SINE_EASING|EASE_IN|EASE_OUT)
animate(offset = -1, time = 3 SECONDS, easing = SINE_EASING|EASE_IN|EASE_OUT)


/turf/open/water/hot_spring/Destroy()
QDEL_NULL(steam_effect)
QDEL_NULL(particle_effect)
remove_filter("hot_spring_waves")
for(var/atom/movable/movable as anything in contents)
exit_hot_spring(movable)
Expand All @@ -144,7 +139,11 @@
return
enter_hot_spring(arrived)

/turf/open/water/hot_spring/on_atom_inited(datum/source, atom/movable/movable)
/turf/open/water/hot_spring/proc/enter_initialized_movable(datum/source, atom/movable/movable)
SIGNAL_HANDLER
if(!immerse_added && !is_type_in_typecache(movable, GLOB.immerse_ignored_movable))
AddElement(/datum/element/immerse, icon, icon_state, "immerse", immerse_overlay_color, alpha = immerse_overlay_alpha)
immerse_added = TRUE
enter_hot_spring(movable)

///Registers the signals from the immerse element and calls dip_in if the movable has the required trait.
Expand Down

0 comments on commit 30159c3

Please sign in to comment.