immerse 
A visual element that makes movables entering the attached turfs look immersed into that turf. May the gods forgive me for the bullshit you're about to witness
Vars | |
alpha | Alpha of the mask, to make the liquid partially transparent |
---|---|
attached_turf_contents | An association list of turfs that have this element attached and their affected contents. |
generated_visual_overlays | An assoc list of instances of /atom/movable/immerse_mask used as abstract effect relays, because god is dead |
immersion_masks | A list of generated immersion masks based on object width, height and whever they're fully immersed underwater |
mask_icon | icon_state used as a mask by our turf |
Procs | |
generate_immerse_mask | Generate a mask filter mutable to use as render_source for the alpha filter based on provided width, height and immersion state |
on_atom_exited | Called when a movable exits the turf. If its new location is not in the list of turfs with this element, remove the movable from the element. |
on_init_or_entered | If the movable is within the right layers and planes, not in the list of movable types to ignore, or already affected by the element for that matter, signals will be registered and, unless the movable is flying, it'll appear as if immersed in that water. |
on_move_flag_disabled | Readds the overlay to the mob and bucklees if no longer flying. |
on_move_flag_enabled | Removes the overlay from mob and bucklees is flying. |
on_spin_animation | Spin the overlay in the opposite direction so it doesn't look like it's spinning at all. |
on_throw | Works just like on_move_flag_enabled, except it only has to check that movable isn't flying |
on_throw_landed | Works just like on_move_flag_disabled, except it only has to check that movable isn't flying |
on_update_transform | A band-aid to keep the (unique) visual overlay from scaling and rotating along with its owner. I'm sorry. |
remove_from_element | Remove any signal, overlay, trait given to the movable and reference to it within the element. |
start_immersion | Makes the element start affecting the turf and its contents. Called on Attach() or when TRAIT_IMMERSE_STOPPED is removed. |
stop_immersion | Stops the element from affecting on the turf and its contents. Called on Detach() or when TRAIT_IMMERSE_STOPPED is added. |
try_immerse | Called by init_or_entered() and on_set_buckled(). This applies the overlay if neither the movable or whatever is buckled to (exclusive to living mobs) are flying as well as movetype signals when the movable isn't buckled. |
try_unimmerse | Called by on_set_buckled() and remove_from_element(). This removes the filter and signals from the movable unless it doesn't have them. |
Var Details
alpha 
Alpha of the mask, to make the liquid partially transparent
attached_turf_contents 
An association list of turfs that have this element attached and their affected contents.
generated_visual_overlays 
An assoc list of instances of /atom/movable/immerse_mask used as abstract effect relays, because god is dead
immersion_masks 
A list of generated immersion masks based on object width, height and whever they're fully immersed underwater
mask_icon 
icon_state used as a mask by our turf
Proc Details
generate_immerse_mask
Generate a mask filter mutable to use as render_source for the alpha filter based on provided width, height and immersion state
on_atom_exited
Called when a movable exits the turf. If its new location is not in the list of turfs with this element, remove the movable from the element.
on_init_or_entered
If the movable is within the right layers and planes, not in the list of movable types to ignore, or already affected by the element for that matter, signals will be registered and, unless the movable is flying, it'll appear as if immersed in that water.
on_move_flag_disabled
Readds the overlay to the mob and bucklees if no longer flying.
on_move_flag_enabled
Removes the overlay from mob and bucklees is flying.
on_spin_animation
Spin the overlay in the opposite direction so it doesn't look like it's spinning at all.
on_throw
Works just like on_move_flag_enabled, except it only has to check that movable isn't flying
on_throw_landed
Works just like on_move_flag_disabled, except it only has to check that movable isn't flying
on_update_transform
A band-aid to keep the (unique) visual overlay from scaling and rotating along with its owner. I'm sorry.
remove_from_element
Remove any signal, overlay, trait given to the movable and reference to it within the element.
start_immersion
Makes the element start affecting the turf and its contents. Called on Attach() or when TRAIT_IMMERSE_STOPPED is removed.
stop_immersion
Stops the element from affecting on the turf and its contents. Called on Detach() or when TRAIT_IMMERSE_STOPPED is added.
try_immerse
Called by init_or_entered() and on_set_buckled(). This applies the overlay if neither the movable or whatever is buckled to (exclusive to living mobs) are flying as well as movetype signals when the movable isn't buckled.
try_unimmerse
Called by on_set_buckled() and remove_from_element(). This removes the filter and signals from the movable unless it doesn't have them.