Yogstation 13 - Modules - TypesVar Details - Proc Details

/atom/movable

Vars

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
can_be_unanchoredUsed for the calculate_adjacencies proc for icon smoothing.
contents_pressure_protectionThe degree of pressure protection that mobs in list/contents have from the external environment, between 0 and 1
contents_thermal_insulationThe degree of thermal insulation that mobs in list/contents have from the external environment, between 0 and 1
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
generic_canpassIf false makes CanPass call CanPassThrough on this type instead of using default behaviour
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.

Procs

CanPassThroughReturns true or false to allow src to move through the blocker, mover has final say
MovedCalled after a successful Move(). By this point, we've already moved. Arguments:
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_blocked_languageAdds a language to the blocked language list. Use this over remove_language in cases where you will give languages back later.
can_speak_languageChecks if atom can speak the language.
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.
copy_languagesCopies all languages into the supplied atom/language holder. Source should be overridden when you do not want the language overwritten by later atom updates or want to avoid blocked languages.
could_speak_languageReturns the result of tongue specific limitations on spoken languages.
get_language_holderGets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.
get_random_spoken_languageGets a random spoken language, useful for forced speech and such.
get_random_understood_languageGets a random understood language, useful for hallucinations and such.
get_selected_languageReturns selected language, if it can be spoken, or finds, sets and returns a new selected language if possible.
get_z_move_affectedReturns a list of movables that should also be affected when src moves through zlevels, and src.
grant_all_languagesGrants every language.
grant_languageGrants the supplied language and sets omnitongue true.
has_languageChecks if atom has the language. If spoken is true, only checks if atom can speak the language.
move_from_pullCalled when src is being moved to a target turf because another movable (puller) is moving around.
onShuttleMoveCalled on atoms to move the atom to the new location
on_changed_z_levelzMove already handles whether a pull from another movable should be broken. Called when a movable changes z-levels.
point_atPoint at an atom
remove_all_languagesRemoves every language and sets omnitongue false.
remove_blocked_languageRemoves a language from the blocked language list.
remove_languageRemoves a single language.
setGrabStateUpdates the grab state of the movable
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.
shuttleRotateBase /atom/movable proc
update_atom_languagesEmpties out the atom specific languages and updates them according to the current atoms language holder. As a side effect, it also creates missing language holders in the process.
update_dynamic_luminosityKeeps track of the sources of dynamic luminosity and updates our visibility with the highest.
update_overlaysAny color becomes white. Anything else is black, and it's fully opaque Ought to work

Var Details

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

can_be_unanchored

Used for the calculate_adjacencies proc for icon smoothing.

contents_pressure_protection

The degree of pressure protection that mobs in list/contents have from the external environment, between 0 and 1

contents_thermal_insulation

The degree of thermal insulation that mobs in list/contents have from the external environment, between 0 and 1

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

generic_canpass

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

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.

Proc Details

CanPassThrough

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

Moved

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

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_blocked_language

Adds a language to the blocked language list. Use this over remove_language in cases where you will give languages back later.

can_speak_language

Checks if atom can speak the language.

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.

copy_languages

Copies all languages into the supplied atom/language holder. Source should be overridden when you do not want the language overwritten by later atom updates or want to avoid blocked languages.

could_speak_language

Returns the result of tongue specific limitations on spoken languages.

get_language_holder

Gets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.

get_random_spoken_language

Gets a random spoken language, useful for forced speech and such.

get_random_understood_language

Gets a random understood language, useful for hallucinations and such.

get_selected_language

Returns selected language, if it can be spoken, or finds, sets and returns a new selected language if possible.

get_z_move_affected

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

grant_all_languages

Grants every language.

grant_language

Grants the supplied language and sets omnitongue true.

has_language

Checks if atom has the language. If spoken is true, only checks if atom can speak the language.

move_from_pull

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

onShuttleMove

Called on atoms to move the atom to the new location

on_changed_z_level

zMove already handles whether a pull from another movable should be broken. 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

remove_all_languages

Removes every language and sets omnitongue false.

remove_blocked_language

Removes a language from the blocked language list.

remove_language

Removes a single language.

setGrabState

Updates the grab state of the movable

This exists to act as a hook for behaviour

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.

shuttleRotate

Base /atom/movable proc

update_atom_languages

Empties out the atom specific languages and updates them according to the current atoms language holder. As a side effect, it also creates missing language holders in the process.

update_dynamic_luminosity

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

update_overlays

Any color becomes white. Anything else is black, and it's fully opaque Ought to work