Space Station 13 - Modules - TypesVar Details - Proc Details

movable

Vars

active_movementA list containing arguments for Moved().
affected_dynamic_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
buckle_lyingBed-like behaviour, forces mob.lying_angle = buckle_lying if not set to NO_BUCKLE_LYING. Its an ANGLE, not a BOOLEAN var! 0 means you will always stand up, after being buckled to this atom.
buckle_prevents_pullWhether things buckled to this atom can be pulled while they're buckled
buckle_requires_restraintsRequire people to be handcuffed before being able to buckle. eg: pipes
buckled_mobsThe mobs currently buckled to this atom
can_be_unanchoredUsed for the calculate_adjacencies proc for icon smoothing.
can_buckleWhether the atom allows mobs to be buckled to it. Can be ignored in [/atom/movable/proc/buckle_mob()] if force = TRUE
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?
demo_last_locLast location of the atom for demo recording purposes
em_blockInternal holder for emissive blocker object, do not use directly use blocks_emissive
face_mouseWhether a user will face atoms on entering them with a mouse. Despite being a mob variable, it is here for performance
generic_canpassIf false makes CanPass call CanPassThrough on this type instead of using default behaviour
grab_stateOur current grab state
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.
inertia_move_delayDelay in deciseconds between inertia based movement
inertia_movingAre we moving with inertia? Mostly used as an optimization
last_pushoffThe last time we pushed off something This is a hack to get around dumb him him me scenarios
max_buckled_mobsThe maximum number of mob/livings allowed to be buckled to this atom at once
max_grabThe strongest grab we can acomplish
move_packetHolds information about any movement loops currently running/waiting to run on the movable. Lazy, will be null if nothing's going on
movement_typeIn case you have multiple types, you automatically use the most useful one. IE: Skating on ice, flippers on water, flying over chasm/space, etc. I reccomend you use the movetype_handler system and not modify this directly, especially for living mobs.
moving_diagonallyNONE:0 not doing a diagonal move. FIRST_DIAG_STEP:1 and SECOND_DIAG_STEP:2 doing the first/second step of the diagonal move.
moving_from_pullAttempt to resume grab after moving instead of before.
pulledbyMob, who currently pulling/grabbing us
pullingMovable thing we are currently pulling/grabbing
pulling_glidesize_updateJust another var to avoid infinite recursion with double pulling. Move along.
set_dir_on_moveWhether this atom should have its dir automatically changed when it moves. Setting this to FALSE allows for things such as directional windows to retain dir on moving without snowflake code all of the place.
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
thought_bubble_imageIcon state for thought bubbles. Normally set by mobs.

Procs

AdjacentAdjacency (to anything else):
CanPassThroughReturns true or false to allow src to move through the blocker, mover has final say
CrossMake sure you know what you're doing if you call this. You probably want CanPass()
CrossedDefault byond proc that is deprecated for us in lieu of signals, do not call
Move_PulledMoves pulled thing to pull_loc with all the necessary checks.
MovedCalled after a successful Move(). By this point, we've already moved. Arguments:
Process_SpacemoveCalled whenever an object moves and by mobs when they attempt to move themselves through space And when an object or action applies a force on src, see newtonian_move
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
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()
admin_FreezeCreated here as a base proc. Override as needed for any type of object or mob you want able to be frozen.
admin_teleportProc to hook user-enacted teleporting behavior and keep logging of the event.
attempt_become_organCalled when a limb containing this object is placed back on a body.
become_area_sensitiveallows this movable to know when it has "entered" another area no matter how many movable atoms its stuffed into, uses important_recursive_contents
become_hearing_sensitiveallows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in
buckle_mobSet a mob as buckled to src
can_devourDoes all the checking for the [/proc/devoured()] to see if a mob can eat another with the grab.
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:
check_pullingChecks if the pulling and pulledby should be stopped because they're out of reach. If z_allowed is TRUE, the z level of the pulling will be ignored.This is to allow things to be dragged up and down stairs.
create_point_bubbleCreate a bubble pointing at a particular icon and icon state. pointed_atom - the atom at which being pointed
deadchat_playsAdds the deadchat_plays component to this atom with simple movement commands.
devouredSource is devoured by living mob.
end_throwcalled after an items throw is ended.
get_devour_timeReturns the time devourer has to wait before they eat a prey.
get_z_move_affectedReturns a list of movables that should also be affected when src moves through zlevels, and src.
has_buckled_mobsReturns amount of mobs buckled to us.
is_buckle_possibleSimple helper proc that runs a suite of checks to test whether it is possible or not to buckle the target mob to src.
is_user_buckle_possibleSimple helper proc that runs a suite of checks to test whether it is possible or not for user to buckle target mob to src.
keybind_face_directionA wrapper for setDir that should only be able to fail by living mobs.
lose_area_sensitivityremoves the area sensitive channel from the important_recursive_contents list of this and all nested locs containing us if there are no more source of the trait left
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
machine_washWhat happens to this object when washed inside a washing machine
mouse_buckle_handlingDoes some typechecks and then calls user_buckle_mob
move_from_pullCalled when src is being moved to a target turf because another movable (puller) is moving around.
newtonian_moveOnly moves the object if it's under no gravity Accepts the direction to move, if the push should be instant, and an optional parameter to fine tune the start delay
on_changed_z_levelCalled when a movable changes z-levels.
point_atPoint at an atom
post_buckle_mobHandle any extras after buckling. Called on buckle_mob()
post_unbuckle_mobHandle any extras after unbuckling. Called on unbuckle_mob()
proceed_attack_resultsCalled from /obj/item/proc/attack and /obj/item/proc/attack_obj
setGrabStateUpdates the grab state of the movable
set_anchoredSets the anchored var and returns if it was sucessfully changed or not.
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_light_range_power_colorHelper to change several lighting overlay settings.
set_pulledbyReports the event of the change in value of the pulledby variable.
shove_impactcalled when a mob gets shoved into an items turf. false means the mob will be shoved backwards normally, true means the mob will not be moved by the disarm proc.
shuttle_crush_reactAtom crushed by shuttle feedback. Avoid any visible messages here, since it will clutter the chat tremendously.
stop_deadchat_playsEasy way to remove the component when the fun has been played out
tompost_bump_overrideUse this to override topmost bump thing in [/turf/proc/Enter()]. Should return an atom to bump.
unbuckle_all_mobsCall /atom/movable/proc/unbuckle_mob for all buckled mobs
unbuckle_mobSet a mob as unbuckled from src
update_dynamic_luminosityKeeps track of the sources of dynamic luminosity and updates our visibility with the highest.
user_buckle_mobHandles a mob buckling another mob to src and sends a visible_message
user_unbuckle_mobHandles a user unbuckling a mob from src and sends a visible_message

Var Details

active_movement

A list containing arguments for Moved().

affected_dynamic_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

buckle_lying

Bed-like behaviour, forces mob.lying_angle = buckle_lying if not set to NO_BUCKLE_LYING. Its an ANGLE, not a BOOLEAN var! 0 means you will always stand up, after being buckled to this atom.

buckle_prevents_pull

Whether things buckled to this atom can be pulled while they're buckled

buckle_requires_restraints

Require people to be handcuffed before being able to buckle. eg: pipes

buckled_mobs

The mobs currently buckled to this atom

can_be_unanchored

Used for the calculate_adjacencies proc for icon smoothing.

can_buckle

Whether the atom allows mobs to be buckled to it. Can be ignored in [/atom/movable/proc/buckle_mob()] if force = TRUE

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?

demo_last_loc

Last location of the atom for demo recording purposes

em_block

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

face_mouse

Whether a user will face atoms on entering them with a mouse. Despite being a mob variable, it is here for performance

generic_canpass

If false makes CanPass call CanPassThrough on this type instead of using default behaviour

grab_state

Our current grab state

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.

inertia_move_delay

Delay in deciseconds between inertia based movement

inertia_moving

Are we moving with inertia? Mostly used as an optimization

last_pushoff

The last time we pushed off something This is a hack to get around dumb him him me scenarios

max_buckled_mobs

The maximum number of mob/livings allowed to be buckled to this atom at once

max_grab

The strongest grab we can acomplish

move_packet

Holds information about any movement loops currently running/waiting to run on the movable. Lazy, will be null if nothing's going on

movement_type

In case you have multiple types, you automatically use the most useful one. IE: Skating on ice, flippers on water, flying over chasm/space, etc. I reccomend you use the movetype_handler system and not modify this directly, especially for living mobs.

moving_diagonally

NONE:0 not doing a diagonal move. FIRST_DIAG_STEP:1 and SECOND_DIAG_STEP:2 doing the first/second step of the diagonal move.

moving_from_pull

Attempt to resume grab after moving instead of before.

pulledby

Mob, who currently pulling/grabbing us

pulling

Movable thing we are currently pulling/grabbing

pulling_glidesize_update

Just another var to avoid infinite recursion with double pulling. Move along.

set_dir_on_move

Whether this atom should have its dir automatically changed when it moves. Setting this to FALSE allows for things such as directional windows to retain dir on moving without snowflake code all of the place.

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

thought_bubble_image

Icon state for thought bubbles. Normally set by mobs.

Proc Details

Adjacent

Adjacency (to anything else):

CanPassThrough

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

Cross

Make sure you know what you're doing if you call this. You probably want CanPass()

Crossed

Default byond proc that is deprecated for us in lieu of signals, do not call

Move_Pulled

Moves pulled thing to pull_loc with all the necessary checks.

Moved

Called after a successful Move(). By this point, we've already moved. Arguments:

Process_Spacemove

Called whenever an object moves and by mobs when they attempt to move themselves through space And when an object or action applies a force on src, see newtonian_move

Return FALSE to have src start/keep drifting in a no-grav area and TRUE to stop/not start drifting

Mobs should return TRUE if they should be able to move of their own volition, see /client/proc/Move

Arguments:

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.

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

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()

admin_Freeze

Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen.

admin_teleport

Proc to hook user-enacted teleporting behavior and keep logging of the event.

attempt_become_organ

Called when a limb containing this object is placed back on a body.

Arguments:

become_area_sensitive

allows this movable to know when it has "entered" another area no matter how many movable atoms its stuffed into, uses important_recursive_contents

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

buckle_mob

Set a mob as buckled to src

If you want to have a mob buckling another mob to something, or you want a chat message sent, use user_buckle_mob instead. Arguments:

can_devour

Does all the checking for the [/proc/devoured()] to see if a mob can eat another with the grab.

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:

check_pulling

Checks if the pulling and pulledby should be stopped because they're out of reach. If z_allowed is TRUE, the z level of the pulling will be ignored.This is to allow things to be dragged up and down stairs.

create_point_bubble

Create a bubble pointing at a particular icon and icon state. pointed_atom - the atom at which being pointed

deadchat_plays

Adds the deadchat_plays component to this atom with simple movement commands.

Returns the component added. Arguments:

devoured

Source is devoured by living mob.

end_throw

called after an items throw is ended.

get_devour_time

Returns the time devourer has to wait before they eat a prey.

get_z_move_affected

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

has_buckled_mobs

Returns amount of mobs buckled to us.

is_buckle_possible

Simple helper proc that runs a suite of checks to test whether it is possible or not to buckle the target mob to src.

Returns FALSE if any conditions that should prevent buckling are satisfied. Returns TRUE otherwise. Called from /atom/movable/proc/buckle_mob and /atom/movable/proc/is_user_buckle_possible. Arguments:

is_user_buckle_possible

Simple helper proc that runs a suite of checks to test whether it is possible or not for user to buckle target mob to src.

Returns FALSE if any conditions that should prevent buckling are satisfied. Returns TRUE otherwise. Called from /atom/movable/proc/user_buckle_mob. Arguments:

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_area_sensitivity

removes the area sensitive channel from the important_recursive_contents list of this and all nested locs containing us if there are no more source of the trait left

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

machine_wash

What happens to this object when washed inside a washing machine

mouse_buckle_handling

Does some typechecks and then calls user_buckle_mob

Arguments: target - The mob being buckled to src user - The mob buckling target to src

move_from_pull

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

newtonian_move

Only moves the object if it's under no gravity Accepts the direction to move, if the push should be instant, and an optional parameter to fine tune the start delay

on_changed_z_level

Called when a movable changes z-levels.

Arguments:

point_at

Point at an atom

Intended to enable and standardise the pointing animation for all atoms

Not intended as a replacement for the mob verb

post_buckle_mob

Handle any extras after buckling. Called on buckle_mob()

post_unbuckle_mob

Handle any extras after unbuckling. Called on unbuckle_mob()

proceed_attack_results

Called from /obj/item/proc/attack and /obj/item/proc/attack_obj

Arguments:

setGrabState

Updates the grab state of the movable

This exists to act as a hook for behaviour

set_anchored

Sets the anchored var and returns if it was sucessfully changed or not.

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_light_range_power_color

Helper to change several lighting overlay settings.

set_pulledby

Reports the event of the change in value of the pulledby variable.

shove_impact

called when a mob gets shoved into an items turf. false means the mob will be shoved backwards normally, true means the mob will not be moved by the disarm proc.

shuttle_crush_react

Atom crushed by shuttle feedback. Avoid any visible messages here, since it will clutter the chat tremendously.

Return TRUE if atom was crushed and it must be noticed by viewers of stationary_turf .

stop_deadchat_plays

Easy way to remove the component when the fun has been played out

tompost_bump_override

Use this to override topmost bump thing in [/turf/proc/Enter()]. Should return an atom to bump.

unbuckle_all_mobs

Call /atom/movable/proc/unbuckle_mob for all buckled mobs

unbuckle_mob

Set a mob as unbuckled from src

The mob must actually be buckled to src or else bad things will happen. Arguments:

update_dynamic_luminosity

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

user_buckle_mob

Handles a mob buckling another mob to src and sends a visible_message

Basically exists to do some checks on the user and then call buckle_mob where the real buckling happens. First, checks if the buckle is valid and cancels if it isn't. Second, checks if src is on a different turf from the target; if it is, does a do_after and another check for sanity Finally, calls /atom/movable/proc/buckle_mob to buckle the target to src then gives chat feedback Arguments:

user_unbuckle_mob

Handles a user unbuckling a mob from src and sends a visible_message

Basically just calls unbuckle_mob, sets fingerprint, and sends a visible_message about the user unbuckling the mob Arguments: