byond - Modules - TypesVar Details - Proc Details

movable

Vars

active_movementA list containing arguments for Moved().
affected_movable_lightsLazylist to keep track on the sources of illumination.
affecting_dynamic_lumiHighest-intensity light affecting us, which determines our visibility.
blocks_emissiveEither FALSE, EMISSIVE_BLOCK_GENERIC, or EMISSIVE_BLOCK_UNIQUE
client_mobs_in_contentscontains every client mob corresponding to every client eye in this container. lazily updated by SSparallax and is sparse: only the last container of a client eye has this list assuming no movement since SSparallax's last fire
currently_z_movingis the mob currently ascending or descending through z levels?
drag_delayDelay added to mob's move_delay when pulling it.
drag_windupWind-up before the mob can pull an object.
em_blockInternal holder for emissive blocker object, do not use directly use blocks_emissive
factionThe faction this AM is associated with, if any
important_recursive_contentsan associative lazylist of relevant nested contents by "channel", the list is of the form: list(channel = list(important nested contents of that type)) each channel has a specific purpose and is meant to replace potentially expensive nested contents iteration. do NOT add channels to this for little reason as it can add considerable memory usage.
move_forceHow much the atom tries to push things out its way
move_resistHow much the atom resists being thrown or moved.
moving_diagonallyTRUE if we should not push or shuffle on bump/enter
pass_flagsWhat things this atom can move past, if it has the corrosponding flag. Should not be directly modified
pitchThe pitch adjustment that this movable uses when speaking.
pulledbyAM that is pulling us
pullingAM we are pulling
spatial_grid_keyString representing the spatial grid groups we want to be held in. acts as a key to the list of spatial grid contents types we exist in via SSspatial_grid.spatial_grid_categories. We do it like this to prevent people trying to mutate them and to save memory on holding the lists ourselves
thrown_speedSpeed of the current throw. 0 When not throwing.
tts_silicon_voice_effectSet to anything other than "" to activate the silicon voice effect for TTS messages.
voiceThe voice that this movable makes when speaking
voice_filterThe filter to apply to the voice when processing the TTS audio message.

Procs

CanPassThroughReturns true or false to allow src to move through the blocker, mover has final say
CanReachA backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.
Crosseddefault byond proc that is deprecated for us in lieu of signals. do not call
MoveThe move proc is responsible for (in order):
UncrossUncross() is a default BYOND proc that is called when something is going to exit this atom's turf. It is prefered over Uncrossed when you want to deny that movement, such as in the case of border objects, objects that allow you to walk through them in any direction except the one they block (think side windows).
Uncrosseddefault byond proc that is normally called on everything inside the previous turf a movable was in after moving to its current turf this is wasteful since the vast majority of objects do not use Uncrossed use connect_loc to register to COMSIG_ATOM_EXITED instead
_do_submergeAdds submerge effects to the AM. Should never be called directly
_reset_transformation_animationResets filters and removes transformation animations helper objects from vis contents.
abstract_movemeant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts) if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this most of the time you want forceMove()
add_nosubmerge_traitWrapper for setting the submerge trait. This trait should ALWAYS be set via this proc so we can listen for the trait removal in all cases
add_pass_flagsCorrectly sets pass_flags with their source
ai_should_stay_buckledWhether an NPC mob should stay buckled to this atom or not
become_hearing_sensitiveallows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in
become_warped_invisibleAdds a warping effect to the provided atom, while making it invisible Note: alpha on the target decreases the strength of the effect Also overrides any render target on the target atom temporarily while active do we want to consider a managed render target thing for this? @param invis_atom The atom to apply the effect to @param strength The strength of the effect, 100 is highest, 0 means no effect
can_z_moveChecks if the destination turf is elegible for z movement from the start turf to a given direction and returns it if so. Args:
cancel_override_minimap_trackingStops minimap override tracking
compose_name_hrefAllows us to wrap the name for specific cases like AI tracking or observer tracking
face_atomChange the direction of the atom to face the targeted atom
footstep_overrideoverrides the turf's normal footstep sound
force_pushreturns bool for if we want to get handle forcepushing, return is bool if we can move an anchored obj
force_pushedreturns bool for if we want to get forcepushed
get_export_valueGetter proc for the point value of this object
get_gravityChecks the gravity the atom is subjected to
get_z_move_affectedReturns a list of movables that should also be affected when src moves through zlevels, and src.
is_jumpableCan this be jumped over
keybind_face_directionA wrapper for setDir that should only be able to fail by living mobs.
lose_hearing_sensitivityremoves the hearing sensitivity channel from the important_recursive_contents list of this and all nested locs containing us if there are no more sources of the trait left since RECURSIVE_CONTENTS_HEARING_SENSITIVE is also a spatial grid content type, removes us from the spatial grid if the trait is removed
move_crushreturns bool for if we want to get handle move crushing, return is bool if we can move an anchored obj
move_crushedreturns bool for if we want to get crushed
move_from_pullCalled when src is being moved to a target turf because another movable (puller) is moving around.
on_changed_z_levelCalled when a movable changes z-levels.
on_warped_overlayssignal handler to remove any emissives while we're warped invis
override_minimap_trackingUsed to handle minimap tracking inside other movables
remove_pass_flagsCorrectly removes sources and pass_flags as required
set_currently_z_movingSets the currently_z_moving variable to a new value. Used to allow some zMovement sources to have precedence over others.
set_flyingToggles AM between flying states
set_light_range_power_colorHelper to change several lighting overlay settings.
set_submerge_levelSets the submerged level of an AM based on its turf
set_throwingToggles AM between throwing states
stop_throwClean up all throw vars
stop_warped_invisibleStops the warped invisibility effect
supply_exportFunction that sells whatever object this is to the faction_selling; returns a /datum/export_report if successful
throw_bounceBounces the AM off hit_atom
throw_impactcalled when src is thrown into hit_atom
transformation_animationCreates animation that turns current icon into result appearance from top down.
turf_collisionThis is called when the AM is thrown into a dense turf
turf_cover_checkreturns that src is covering its turf. Used to prevent turf interactions such as water
update_dynamic_luminosityKeeps track of the sources of dynamic luminosity and updates our visibility with the highest.

Var Details

active_movement

A list containing arguments for Moved().

affected_movable_lights

Lazylist to keep track on the sources of illumination.

affecting_dynamic_lumi

Highest-intensity light affecting us, which determines our visibility.

blocks_emissive

Either FALSE, EMISSIVE_BLOCK_GENERIC, or EMISSIVE_BLOCK_UNIQUE

client_mobs_in_contents

contains every client mob corresponding to every client eye in this container. lazily updated by SSparallax and is sparse: only the last container of a client eye has this list assuming no movement since SSparallax's last fire

currently_z_moving

is the mob currently ascending or descending through z levels?

drag_delay

Delay added to mob's move_delay when pulling it.

drag_windup

Wind-up before the mob can pull an object.

em_block

Internal holder for emissive blocker object, do not use directly use blocks_emissive

faction

The faction this AM is associated with, if any

important_recursive_contents

an associative lazylist of relevant nested contents by "channel", the list is of the form: list(channel = list(important nested contents of that type)) each channel has a specific purpose and is meant to replace potentially expensive nested contents iteration. do NOT add channels to this for little reason as it can add considerable memory usage.

move_force

How much the atom tries to push things out its way

move_resist

How much the atom resists being thrown or moved.

moving_diagonally

TRUE if we should not push or shuffle on bump/enter

pass_flags

What things this atom can move past, if it has the corrosponding flag. Should not be directly modified

pitch

The pitch adjustment that this movable uses when speaking.

pulledby

AM that is pulling us

pulling

AM we are pulling

spatial_grid_key

String representing the spatial grid groups we want to be held in. acts as a key to the list of spatial grid contents types we exist in via SSspatial_grid.spatial_grid_categories. We do it like this to prevent people trying to mutate them and to save memory on holding the lists ourselves

thrown_speed

Speed of the current throw. 0 When not throwing.

tts_silicon_voice_effect

Set to anything other than "" to activate the silicon voice effect for TTS messages.

voice

The voice that this movable makes when speaking

voice_filter

The filter to apply to the voice when processing the TTS audio message.

Proc Details

CanPassThrough

Returns true or false to allow src to move through the blocker, mover has final say

CanReach

A backwards depth-limited breadth-first-search to see if the target is logically "in" anything adjacent to us.

Crossed

default byond proc that is deprecated for us in lieu of signals. do not call

Move

The move proc is responsible for (in order):

A diagonal move is slightly different as Moved, entered and exited is called only once In order of calling:

Warning : Doesn't support well multi-tile diagonal moves

Uncross

Uncross() is a default BYOND proc that is called when something is going to exit this atom's turf. It is prefered over Uncrossed when you want to deny that movement, such as in the case of border objects, objects that allow you to walk through them in any direction except the one they block (think side windows).

While being seemingly harmless, most everything doesn't actually want to use this, meaning that we are wasting proc calls for every single atom on a turf, every single time something exits it, when basically nothing cares.

This overhead caused real problems on Sybil round #159709, where lag attributed to Uncross was so bad that the entire master controller collapsed and people made Among Us lobbies in OOC.

If you want to replicate the old Uncross() behavior, the most apt replacement is [/datum/element/connect_loc] while hooking onto [COMSIG_ATOM_EXIT].

Uncrossed

default byond proc that is normally called on everything inside the previous turf a movable was in after moving to its current turf this is wasteful since the vast majority of objects do not use Uncrossed use connect_loc to register to COMSIG_ATOM_EXITED instead

_do_submerge

Adds submerge effects to the AM. Should never be called directly

_reset_transformation_animation

Resets filters and removes transformation animations helper objects from vis contents.

abstract_move

meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts) if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this most of the time you want forceMove()

add_nosubmerge_trait

Wrapper for setting the submerge trait. This trait should ALWAYS be set via this proc so we can listen for the trait removal in all cases

add_pass_flags

Correctly sets pass_flags with their source

ai_should_stay_buckled

Whether an NPC mob should stay buckled to this atom or not

become_hearing_sensitive

allows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in

become_warped_invisible

Adds a warping effect to the provided atom, while making it invisible Note: alpha on the target decreases the strength of the effect Also overrides any render target on the target atom temporarily while active do we want to consider a managed render target thing for this? @param invis_atom The atom to apply the effect to @param strength The strength of the effect, 100 is highest, 0 means no effect

can_z_move

Checks if the destination turf is elegible for z movement from the start turf to a given direction and returns it if so. Args:

cancel_override_minimap_tracking

Stops minimap override tracking

compose_name_href

Allows us to wrap the name for specific cases like AI tracking or observer tracking

Arguments

face_atom

Change the direction of the atom to face the targeted atom

footstep_override

overrides the turf's normal footstep sound

force_push

returns bool for if we want to get handle forcepushing, return is bool if we can move an anchored obj

force_pushed

returns bool for if we want to get forcepushed

get_export_value

Getter proc for the point value of this object

Returns:

get_gravity

Checks the gravity the atom is subjected to

get_z_move_affected

Returns a list of movables that should also be affected when src moves through zlevels, and src.

is_jumpable

Can this be jumped over

keybind_face_direction

A wrapper for setDir that should only be able to fail by living mobs.

Called from [/atom/movable/proc/keyLoop], this exists to be overwritten by living mobs with a check to see if we're actually alive enough to change directions

lose_hearing_sensitivity

removes the hearing sensitivity channel from the important_recursive_contents list of this and all nested locs containing us if there are no more sources of the trait left since RECURSIVE_CONTENTS_HEARING_SENSITIVE is also a spatial grid content type, removes us from the spatial grid if the trait is removed

move_crush

returns bool for if we want to get handle move crushing, return is bool if we can move an anchored obj

move_crushed

returns bool for if we want to get crushed

move_from_pull

Called when src is being moved to a target turf because another movable (puller) is moving around.

on_changed_z_level

Called when a movable changes z-levels.

Arguments:

on_warped_overlays

signal handler to remove any emissives while we're warped invis

override_minimap_tracking

Used to handle minimap tracking inside other movables

remove_pass_flags

Correctly removes sources and pass_flags as required

set_currently_z_moving

Sets the currently_z_moving variable to a new value. Used to allow some zMovement sources to have precedence over others.

set_flying

Toggles AM between flying states

set_light_range_power_color

Helper to change several lighting overlay settings.

set_submerge_level

Sets the submerged level of an AM based on its turf

set_throwing

Toggles AM between throwing states

stop_throw

Clean up all throw vars

stop_warped_invisible

Stops the warped invisibility effect

supply_export

Function that sells whatever object this is to the faction_selling; returns a /datum/export_report if successful

throw_bounce

Bounces the AM off hit_atom

throw_impact

called when src is thrown into hit_atom

transformation_animation

Creates animation that turns current icon into result appearance from top down.

result_appearance - End result appearance/atom/image time - Animation duration transform_appearance - Appearance/atom/image of effect that moves along the animation - should be horizonatally centered

turf_collision

This is called when the AM is thrown into a dense turf

turf_cover_check

returns that src is covering its turf. Used to prevent turf interactions such as water

update_dynamic_luminosity

Keeps track of the sources of dynamic luminosity and updates our visibility with the highest.