/atom/movable
Vars | |
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. |
Procs | |
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. |
point_at | Point at an atom |
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 |
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 |
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:
- old_loc is the location prior to the move. Can be null to indicate nullspace.
- movement_dir is the direction the movement took place. Can be NONE if it was some sort of teleport.
- The forced flag indicates whether this was a forced move, which skips many checks of regular movement.
- The old_locs is an optional argument, in case the moved movable was present in multiple locations before the movement.
- momentum_change represents whether this movement is due to a "new" force if TRUE or an already "existing" force if FALSE
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:
- direction: the direction to go, UP or DOWN, only relevant if target is null.
- start: Each destination has a starting point on the other end. This is it. Most of the times the location of the source.
- z_move_flags: bitflags used for various checks. See __DEFINES/movement.dm.
- rider: A living mob in control of the movable. Only non-null when a mob is riding a vehicle through z-levels.
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:
- old_turf - The previous turf they were on before.
- new_turf - The turf they have now entered.
- same_z_layer - If their old and new z levels are on the same level of plane offsets or not
- notify_contents - Whether or not to notify the movable's contents that their z-level has changed. NOTE, IF YOU SET THIS, YOU NEED TO MANUALLY SET PLANE OF THE CONTENTS LATER
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