mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
138 lines
44 KiB
HTML
138 lines
44 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/atom/movable - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="atom/movable.html#var">Var Details</a> - <a href="atom/movable.html#proc">Proc Details</a></header><main><h1>movable <aside>/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a></aside></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="atom/movable.html#var/active_movement">active_movement</a></th><td>A list containing arguments for Moved().</td></tr><tr><th><a href="atom/movable.html#var/blocks_emissive">blocks_emissive</a></th><td>Either FALSE, [EMISSIVE_BLOCK_GENERIC], or <a href="code/__DEFINES/lighting_defines.html#define/EMISSIVE_BLOCK_UNIQUE" title="EMISSIVE_BLOCK_UNIQUE">EMISSIVE_BLOCK_UNIQUE</a></td></tr><tr><th><a href="atom/movable.html#var/buckle_lying">buckle_lying</a></th><td>Bed-like behaviour, forces the mob to lie down if buckle_lying != -1</td></tr><tr><th><a href="atom/movable.html#var/buckle_offset">buckle_offset</a></th><td>The Pixel_y to offset the buckled mob by</td></tr><tr><th><a href="atom/movable.html#var/buckle_prevents_pull">buckle_prevents_pull</a></th><td>Can we pull the mob while they're buckled. Currently set to false on every movable</td></tr><tr><th><a href="atom/movable.html#var/buckle_requires_restraints">buckle_requires_restraints</a></th><td>Require people to be handcuffed before being able to buckle. eg: pipes</td></tr><tr><th><a href="atom/movable.html#var/buckled_mobs">buckled_mobs</a></th><td>Lazylist of the mobs buckled to this object.</td></tr><tr><th><a href="atom/movable.html#var/can_be_unanchored">can_be_unanchored</a></th><td>Used for icon smoothing. Won't smooth if it ain't anchored and can be unanchored. Only set to true on windows</td></tr><tr><th><a href="atom/movable.html#var/em_block">em_block</a></th><td>Internal holder for emissive blocker object, do not use directly use blocks_emissive</td></tr><tr><th><a href="atom/movable.html#var/face_while_pulling">face_while_pulling</a></th><td>Face towards the atom while pulling it</td></tr><tr><th><a href="atom/movable.html#var/important_recursive_contents">important_recursive_contents</a></th><td>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.</td></tr><tr><th><a href="atom/movable.html#var/inertia_move_delay">inertia_move_delay</a></th><td>Delay in deciseconds between inertia based movement</td></tr><tr><th><a href="atom/movable.html#var/inertia_moving">inertia_moving</a></th><td>Are we moving with inertia? Mostly used as an optimization</td></tr><tr><th><a href="atom/movable.html#var/last_pushoff">last_pushoff</a></th><td>The last time we pushed off something
|
||
This is a hack to get around dumb him him me scenarios</td></tr><tr><th><a href="atom/movable.html#var/max_buckled_mobs">max_buckled_mobs</a></th><td>The max amount of mobs that can be buckled to this object. Currently set to 1 on every movable</td></tr><tr><th><a href="atom/movable.html#var/move_packet">move_packet</a></th><td>Holds information about any movement loops currently running/waiting to run on the movable. Lazy, will be null if nothing's going on</td></tr><tr><th><a href="atom/movable.html#var/moving_from_pull">moving_from_pull</a></th><td>attempt to resume grab after moving instead of before.</td></tr><tr><th><a href="atom/movable.html#var/orbiting_uid">orbiting_uid</a></th><td>UID for the atom which the current atom is orbiting</td></tr><tr><th><a href="atom/movable.html#var/scatter_distance">scatter_distance</a></th><td>How far (in pixels) should this atom scatter when created/dropped/etc. Does not apply to mapped-in items.</td></tr><tr><th><a href="atom/movable.html#var/set_dir_on_move">set_dir_on_move</a></th><td>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.
|
||
PARA: Doesn't set this currently to maintain current behavior for pulling items around,
|
||
because modifying direction on pull is expected.</td></tr><tr><th><a href="atom/movable.html#var/spatial_grid_key">spatial_grid_key</a></th><td>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</td></tr><tr><th><a href="atom/movable.html#var/thought_bubble_image">thought_bubble_image</a></th><td>Icon state for thought bubbles. Normally set by mobs.</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="atom/movable.html#proc/Crossed">Crossed</a></th><td>default byond proc that is deprecated for us in lieu of signals. do not call</td></tr><tr><th><a href="atom/movable.html#proc/Moved">Moved</a></th><td>Called after a successful Move(). By this point, we've already moved.
|
||
Arguments:</td></tr><tr><th><a href="atom/movable.html#proc/Process_Spacemove">Process_Spacemove</a></th><td>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][/atom/movable/proc/newtonian_move]</td></tr><tr><th><a href="atom/movable.html#proc/Uncross">Uncross</a></th><td><code>Uncross()</code> is a default BYOND proc that is called when something is <em>going</em>
|
||
to exit this atom's turf. It is prefered over <code>Uncrossed</code> 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).</td></tr><tr><th><a href="atom/movable.html#proc/Uncrossed">Uncrossed</a></th><td>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</td></tr><tr><th><a href="atom/movable.html#proc/abstract_move">abstract_move</a></th><td>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()].</td></tr><tr><th><a href="atom/movable.html#proc/admin_Freeze">admin_Freeze</a></th><td>Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen.</td></tr><tr><th><a href="atom/movable.html#proc/become_area_sensitive">become_area_sensitive</a></th><td>allows this movable to know when it has "entered" another area no matter how many movable atoms its stuffed into, uses important_recursive_contents</td></tr><tr><th><a href="atom/movable.html#proc/become_hearing_sensitive">become_hearing_sensitive</a></th><td>allows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in</td></tr><tr><th><a href="atom/movable.html#proc/can_reach">can_reach</a></th><td>A backwards depth-limited breadth-first-search to see if the target is
|
||
logically "in" anything adjacent to us.</td></tr><tr><th><a href="atom/movable.html#proc/can_reach_nested_adjacent">can_reach_nested_adjacent</a></th><td>A backwards depth-limited breadth-first-search to see if the target is
|
||
logically "in" anything adjacent to us.</td></tr><tr><th><a href="atom/movable.html#proc/create_point_bubble">create_point_bubble</a></th><td>Create a bubble pointing at a particular icon and icon state.
|
||
See args for create_point_bubble_from_atom.</td></tr><tr><th><a href="atom/movable.html#proc/create_point_bubble_from_atom">create_point_bubble_from_atom</a></th><td>Create a point bubble towards a given item.</td></tr><tr><th><a href="atom/movable.html#proc/create_point_bubble_from_icons">create_point_bubble_from_icons</a></th><td>Create a point bubble towards a given item, from an icon/icon state.</td></tr><tr><th><a href="atom/movable.html#proc/create_point_bubble_from_path">create_point_bubble_from_path</a></th><td>See above, this uses an uninstantiated path.</td></tr><tr><th><a href="atom/movable.html#proc/deadchat_plays">deadchat_plays</a></th><td>Adds the deadchat_plays component to this atom with simple movement commands.</td></tr><tr><th><a href="atom/movable.html#proc/end_throw">end_throw</a></th><td>called after an items throw is ended.</td></tr><tr><th><a href="atom/movable.html#proc/fall_and_crush">fall_and_crush</a></th><td>Tip over this atom onto a turf, crushing things in its path.</td></tr><tr><th><a href="atom/movable.html#proc/key_loop">key_loop</a></th><td>Key loop to check for movement keys held and move in the desired direction.</td></tr><tr><th><a href="atom/movable.html#proc/lose_area_sensitivity">lose_area_sensitivity</a></th><td>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</td></tr><tr><th><a href="atom/movable.html#proc/lose_hearing_sensitivity">lose_hearing_sensitivity</a></th><td>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</td></tr><tr><th><a href="atom/movable.html#proc/move_from_pull">move_from_pull</a></th><td>Called when src is being moved to a target turf because another movable (puller) is moving around.</td></tr><tr><th><a href="atom/movable.html#proc/on_changed_z_level">on_changed_z_level</a></th><td>Called when a movable changes z-levels.</td></tr><tr><th><a href="atom/movable.html#proc/on_crush_thing">on_crush_thing</a></th><td>useful callback for things that want special behavior on crush</td></tr><tr><th><a href="atom/movable.html#proc/orbit">orbit</a></th><td>Set an atom to orbit around another one. This atom will follow the base atom's movement and rotate around it.</td></tr><tr><th><a href="atom/movable.html#proc/point_at">point_at</a></th><td>Point at an atom</td></tr><tr><th><a href="atom/movable.html#proc/scatter_atom">scatter_atom</a></th><td>Used to scatter atoms so that multiple copies aren't all at the exact same spot.</td></tr><tr><th><a href="atom/movable.html#proc/set_glide_size">set_glide_size</a></th><td>This proc is recursive, and calls itself to constantly set the glide size of an atom/movable</td></tr><tr><th><a href="atom/movable.html#proc/set_loc">set_loc</a></th><td>Used in shuttle movement and camera eye stuff.
|
||
Primarily used to notify objects being moved by a shuttle/bluespace fuckup.</td></tr><tr><th><a href="atom/movable.html#proc/shove_impact">shove_impact</a></th><td>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.</td></tr><tr><th><a href="atom/movable.html#proc/stop_deadchat_plays">stop_deadchat_plays</a></th><td>Easy way to remove the component when the fun has been played out</td></tr><tr><th><a href="atom/movable.html#proc/stop_orbit">stop_orbit</a></th><td>Stop this atom from orbiting whatever it's orbiting.</td></tr><tr><th><a href="atom/movable.html#proc/tilt_over">tilt_over</a></th><td>Tip over an atom without too much fuss. This won't cause damage to anything, and just rotates the thing and (optionally) adds the component.</td></tr><tr><th><a href="atom/movable.html#proc/untilt">untilt</a></th><td>Untilt a tilted object.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/active_movement"><aside class="declaration">var </aside>active_movement <aside>– /tmp/list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L7"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 7"></a></h3><p>A list containing arguments for Moved().</p><h3 id="var/blocks_emissive"><aside class="declaration">var </aside>blocks_emissive <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L45"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 45"></a></h3><p>Either FALSE, [EMISSIVE_BLOCK_GENERIC], or <a href="code/__DEFINES/lighting_defines.html#define/EMISSIVE_BLOCK_UNIQUE" title="EMISSIVE_BLOCK_UNIQUE">EMISSIVE_BLOCK_UNIQUE</a></p><h3 id="var/buckle_lying"><aside class="declaration">var </aside>buckle_lying <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L63"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 63"></a></h3><p>Bed-like behaviour, forces the mob to lie down if buckle_lying != -1</p><h3 id="var/buckle_offset"><aside class="declaration">var </aside>buckle_offset <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L69"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 69"></a></h3><p>The Pixel_y to offset the buckled mob by</p><h3 id="var/buckle_prevents_pull"><aside class="declaration">var </aside>buckle_prevents_pull <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L73"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 73"></a></h3><p>Can we pull the mob while they're buckled. Currently set to false on every movable</p><h3 id="var/buckle_requires_restraints"><aside class="declaration">var </aside>buckle_requires_restraints <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L65"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 65"></a></h3><p>Require people to be handcuffed before being able to buckle. eg: pipes</p><h3 id="var/buckled_mobs"><aside class="declaration">var </aside>buckled_mobs <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L67"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 67"></a></h3><p>Lazylist of the mobs buckled to this object.</p><h3 id="var/can_be_unanchored"><aside class="declaration">var </aside>can_be_unanchored <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L76"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 76"></a></h3><p>Used for icon smoothing. Won't smooth if it ain't anchored and can be unanchored. Only set to true on windows</p><h3 id="var/em_block"><aside class="declaration">var </aside>em_block <aside>– /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/<a href="atom/movable/emissive_blocker.html">emissive_blocker</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L47"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 47"></a></h3><p>Internal holder for emissive blocker object, do not use directly use blocks_emissive</p><h3 id="var/face_while_pulling"><aside class="declaration">var </aside>face_while_pulling <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L24"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 24"></a></h3><p>Face towards the atom while pulling it</p><h3 id="var/important_recursive_contents"><aside class="declaration">var </aside>important_recursive_contents <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L90"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 90"></a></h3><p>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.</p><h3 id="var/inertia_move_delay"><aside class="declaration">var </aside>inertia_move_delay <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L36"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 36"></a></h3><p>Delay in deciseconds between inertia based movement</p><h3 id="var/inertia_moving"><aside class="declaration">var </aside>inertia_moving <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L34"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 34"></a></h3><p>Are we moving with inertia? Mostly used as an optimization</p><h3 id="var/last_pushoff"><aside class="declaration">var </aside>last_pushoff <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L39"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 39"></a></h3><p>The last time we pushed off something
|
||
This is a hack to get around dumb him him me scenarios</p><h3 id="var/max_buckled_mobs"><aside class="declaration">var </aside>max_buckled_mobs <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L71"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 71"></a></h3><p>The max amount of mobs that can be buckled to this object. Currently set to 1 on every movable</p><h3 id="var/move_packet"><aside class="declaration">var </aside>move_packet <aside>– /<a href="datum.html">datum</a>/<a href="datum/movement_packet.html">movement_packet</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L81"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 81"></a></h3><p>Holds information about any movement loops currently running/waiting to run on the movable. Lazy, will be null if nothing's going on</p><h3 id="var/moving_from_pull"><aside class="declaration">var </aside>moving_from_pull <aside>– /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L79"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 79"></a></h3><p>attempt to resume grab after moving instead of before.</p><h3 id="var/orbiting_uid"><aside class="declaration">var </aside>orbiting_uid <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L56"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 56"></a></h3><p>UID for the atom which the current atom is orbiting</p><h3 id="var/scatter_distance"><aside class="declaration">var </aside>scatter_distance <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L83"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 83"></a></h3><p>How far (in pixels) should this atom scatter when created/dropped/etc. Does not apply to mapped-in items.</p><h3 id="var/set_dir_on_move"><aside class="declaration">var </aside>set_dir_on_move <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L30"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 30"></a></h3><p>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.
|
||
PARA: Doesn't set this currently to maintain current behavior for pulling items around,
|
||
because modifying direction on pull is expected.</p><h3 id="var/spatial_grid_key"><aside class="declaration">var </aside>spatial_grid_key <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L95"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 95"></a></h3><p>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</p><h3 id="var/thought_bubble_image"><aside class="declaration">var </aside>thought_bubble_image <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L49"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 49"></a></h3><p>Icon state for thought bubbles. Normally set by mobs.</p><h2 id="proc">Proc Details</h2><h3 id="proc/Crossed">Crossed<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/crossed_atom, oldloc) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L496"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 496"></a></aside></h3><p>default byond proc that is deprecated for us in lieu of signals. do not call</p><h3 id="proc/Moved"><aside class="declaration">proc </aside>Moved<aside>(/<a href="atom.html">atom</a>/old_loc, movement_dir, forced, /list/old_locs, momentum_change) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L432"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 432"></a></aside></h3><p>Called after a successful Move(). By this point, we've already moved.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>old_loc is the location prior to the move. Can be null to indicate nullspace.</li>
|
||
<li>movement_dir is the direction the movement took place. Can be NONE if it was some sort of teleport.</li>
|
||
<li>The forced flag indicates whether this was a forced move, which skips many checks of regular movement.</li>
|
||
<li>The old_locs is an optional argument, in case the moved movable was present in multiple locations before the movement.</li>
|
||
<li>momentum_change represents whether this movement is due to a "new" force if TRUE or an already "existing" force if FALSE</li>
|
||
</ul><h3 id="proc/Process_Spacemove"><aside class="declaration">proc </aside>Process_Spacemove<aside>(movement_dir, continuous_move) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L683"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 683"></a></aside></h3><p>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][/atom/movable/proc/newtonian_move]</p>
|
||
<p>Return FALSE to have src start/keep drifting in a no-grav area and TRUE to stop/not start drifting</p>
|
||
<p>Mobs should return TRUE if they should be able to move of their own volition, see [/client/proc/Move]</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>movement_dir - 0 when stopping or any dir when trying to move</li>
|
||
<li>continuous_move - If this check is coming from something in the context of already drifting</li>
|
||
</ul><h3 id="proc/Uncross">Uncross<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L516"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 516"></a></aside></h3><p><code>Uncross()</code> is a default BYOND proc that is called when something is <em>going</em>
|
||
to exit this atom's turf. It is prefered over <code>Uncrossed</code> 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).</p>
|
||
<p>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.</p>
|
||
<p>If you want to replicate the old <code>Uncross()</code> behavior, the most apt
|
||
replacement is [<code>/datum/element/connect_loc</code>] while hooking onto
|
||
[<code>COMSIG_ATOM_EXIT</code>].</p><h3 id="proc/Uncrossed">Uncrossed<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/uncrossed_atom) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L526"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 526"></a></aside></h3><p>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</p><h3 id="proc/abstract_move"><aside class="declaration">proc </aside>abstract_move<aside>(/<a href="atom.html">atom</a>/new_loc) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L251"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 251"></a></aside></h3><p>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()].</p><h3 id="proc/admin_Freeze"><aside class="declaration">proc </aside>admin_Freeze<aside>(/<a href="client.html">client</a>/admin) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/admin/verbs/freeze.dm#L15"><img src="git.png" width="16" height="16" title="code/modules/admin/verbs/freeze.dm 15"></a></aside></h3><p>Created here as a base proc. Override as needed for any type of object or mob you want able to be frozen.</p><h3 id="proc/become_area_sensitive"><aside class="declaration">proc </aside>become_area_sensitive<aside>(trait_source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1308"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1308"></a></aside></h3><p>allows this movable to know when it has "entered" another area no matter how many movable atoms its stuffed into, uses important_recursive_contents</p><h3 id="proc/become_hearing_sensitive"><aside class="declaration">proc </aside>become_hearing_sensitive<aside>(trait_source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1266"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1266"></a></aside></h3><p>allows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in</p><h3 id="proc/can_reach"><aside class="declaration">proc </aside>can_reach<aside>(/<a href="atom.html">atom</a>/ultimate_target, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/tool, view_only) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/_onclick/click.dm#L180"><img src="git.png" width="16" height="16" title="code/_onclick/click.dm 180"></a></aside></h3><p>A backwards depth-limited breadth-first-search to see if the target is
|
||
logically "in" anything adjacent to us.</p><h3 id="proc/can_reach_nested_adjacent"><aside class="declaration">proc </aside>can_reach_nested_adjacent<aside>(/<a href="atom.html">atom</a>/ultimate_target, /<a href="obj.html">obj</a>/<a href="obj/item.html">item</a>/tool, view_only) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1200"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1200"></a></aside></h3><p>A backwards depth-limited breadth-first-search to see if the target is
|
||
logically "in" anything adjacent to us.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>ultimate_target - the specific item we're attempting to reach.</li>
|
||
<li>tool - if present, checked to see if the tool can reach the target via <a href="obj/item.html#var/reach" title="/obj/item">/obj/item/var/reach</a>.</li>
|
||
<li>view_only - if TRUE, only considers locations in atoms visible to us, as opposed to nested inventories.</li>
|
||
</ul><h3 id="proc/create_point_bubble"><aside class="declaration">proc </aside>create_point_bubble<aside>(/mutable_appearance/pointed_atom_appearance, include_arrow) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/point/point.dm#L31"><img src="git.png" width="16" height="16" title="code/modules/point/point.dm 31"></a></aside></h3><p>Create a bubble pointing at a particular icon and icon state.
|
||
See args for create_point_bubble_from_atom.</p><h3 id="proc/create_point_bubble_from_atom"><aside class="declaration">proc </aside>create_point_bubble_from_atom<aside>(/<a href="atom.html">atom</a>/pointed_atom, include_arrow) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/point/point.dm#L76"><img src="git.png" width="16" height="16" title="code/modules/point/point.dm 76"></a></aside></h3><p>Create a point bubble towards a given item.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>pointed_atom - Atom to show in the bubble.</li>
|
||
<li>include_arrow - If true, show an arrow pointing downwards.</li>
|
||
</ul><h3 id="proc/create_point_bubble_from_icons"><aside class="declaration">proc </aside>create_point_bubble_from_icons<aside>(icon, icon_state, include_arrow) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/point/point.dm#L93"><img src="git.png" width="16" height="16" title="code/modules/point/point.dm 93"></a></aside></h3><p>Create a point bubble towards a given item, from an icon/icon state.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>icon - Icon source for the bubble's icon.</li>
|
||
<li>icon_state - Icon state for the bubble's icon.</li>
|
||
<li>include_arrow - If true, show an arrow pointing downwards.</li>
|
||
</ul><h3 id="proc/create_point_bubble_from_path"><aside class="declaration">proc </aside>create_point_bubble_from_path<aside>(/<a href="atom.html">atom</a>/pointed_atom_path, include_arrow) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/point/point.dm#L101"><img src="git.png" width="16" height="16" title="code/modules/point/point.dm 101"></a></aside></h3><p>See above, this uses an uninstantiated path.</p><h3 id="proc/deadchat_plays"><aside class="declaration">proc </aside>deadchat_plays<aside>(mode, cooldown) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L998"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 998"></a></aside></h3><p>Adds the deadchat_plays component to this atom with simple movement commands.</p>
|
||
<p>Returns the component added.
|
||
Arguments:</p>
|
||
<ul>
|
||
<li>mode - Either DEADCHAT_ANARCHY_MODE or DEADCHAT_DEMOCRACY_MODE passed to the deadchat_control component. See <a href="datum/component/deadchat_control.html" title="/datum/component/deadchat_control">/datum/component/deadchat_control</a> for more info.</li>
|
||
<li>cooldown - The cooldown between command inputs passed to the deadchat_control component. See <a href="datum/component/deadchat_control.html" title="/datum/component/deadchat_control">/datum/component/deadchat_control</a> for more info.</li>
|
||
</ul><h3 id="proc/end_throw"><aside class="declaration">proc </aside>end_throw<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L725"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 725"></a></aside></h3><p>called after an items throw is ended.</p><h3 id="proc/fall_and_crush"><aside class="declaration">proc </aside>fall_and_crush<aside>(/<a href="turf.html">turf</a>/target_turf, crush_damage, should_crit, crit_damage_factor, /<a href="datum.html">datum</a>/<a href="datum/tilt_crit.html">tilt_crit</a>/forced_crit, weaken_time, knockdown_time, ignore_gravity, should_rotate, angle, rightable, block_interactions_until_righted, crush_dir) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1080"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1080"></a></aside></h3><p>Tip over this atom onto a turf, crushing things in its path.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>target_turf - The turf to fall onto.</li>
|
||
<li>should_crit - If true, we'll try to crit things that we crush.</li>
|
||
<li>crit_damage_factor - If a crit is rolled, crush_damage will be multiplied by this amount.</li>
|
||
<li>forced_crit - If passed, this crit will be applied to everything it crushes.</li>
|
||
<li>weaken_time - The amount of time that weaken will be applied to crushed mobs.</li>
|
||
<li>knockdown_time - The amount of time that knockdown will be applied to crushed mobs.</li>
|
||
<li>ignore_gravity - If false, we won't fall over in zero G.</li>
|
||
<li>should_rotate - If false, we won't rotate when we fall.</li>
|
||
<li>angle - The angle by which we'll rotate. If this is null/0, we'll randomly rotate 90 degrees clockwise or counterclockwise.</li>
|
||
<li>rightable - If true, the tilted component will be applied, allowing people to alt-click to right it.</li>
|
||
<li>block_interactions_until_righted - If true, interactions with the object will be blocked until it's righted.</li>
|
||
<li>crush_dir - An override on the cardinal direction we're crushing.</li>
|
||
</ul><h3 id="proc/key_loop">key_loop<aside>(/<a href="client.html">client</a>/C) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/input/movement.dm#L5"><img src="git.png" width="16" height="16" title="code/modules/input/movement.dm 5"></a></aside></h3><p>Key loop to check for movement keys held and move in the desired direction.</p><h3 id="proc/lose_area_sensitivity"><aside class="declaration">proc </aside>lose_area_sensitivity<aside>(trait_source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1315"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1315"></a></aside></h3><p>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</p><h3 id="proc/lose_hearing_sensitivity"><aside class="declaration">proc </aside>lose_hearing_sensitivity<aside>(trait_source) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1288"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1288"></a></aside></h3><p>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</p>
|
||
<ul>
|
||
<li>trait_source - trait source define or ALL, if ALL, force removes hearing sensitivity. if a trait source define, removes hearing sensitivity only if the trait is removed</li>
|
||
</ul><h3 id="proc/move_from_pull"><aside class="declaration">proc </aside>move_from_pull<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/puller, /<a href="turf.html">turf</a>/target_turf, puller_glide_size) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L468"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 468"></a></aside></h3><p>Called when src is being moved to a target turf because another movable (puller) is moving around.</p><h3 id="proc/on_changed_z_level"><aside class="declaration">proc </aside>on_changed_z_level<aside>(/<a href="turf.html">turf</a>/old_turf, /<a href="turf.html">turf</a>/new_turf, notify_contents) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L646"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 646"></a></aside></h3><p>Called when a movable changes z-levels.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>old_turf - The previous turf they were on before.</li>
|
||
<li>new_turf - The turf they have now entered.</li>
|
||
<li>notify_contents - Whether or not to notify the movable's contents that their z-level has changed.</li>
|
||
</ul><h3 id="proc/on_crush_thing"><aside class="declaration">proc </aside>on_crush_thing<aside>(/<a href="atom.html">atom</a>/thing) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1183"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1183"></a></aside></h3><p>useful callback for things that want special behavior on crush</p><h3 id="proc/orbit"><aside class="declaration">proc </aside>orbit<aside>(/<a href="atom.html">atom</a>/A, radius, clockwise, rotation_speed, rotation_segments, pre_rotation, lock_in_orbit, force_move, orbit_layer) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L394"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 394"></a></aside></h3><p>Set an atom to orbit around another one. This atom will follow the base atom's movement and rotate around it.</p>
|
||
<p>orbiter: atom which will be doing the orbiting
|
||
radius: range to orbit at, radius of the circle formed by orbiting
|
||
clockwise: whether you orbit clockwise or anti clockwise
|
||
rotation_speed: how fast to rotate
|
||
rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default.
|
||
pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts
|
||
lock_in_orbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts)
|
||
force_move: If true, ghosts will be ForceMoved instead of having their .loc updated directly.
|
||
orbit_layer: layer that the orbiter should be on. The original layer will be restored on orbit end.</p><h3 id="proc/point_at"><aside class="declaration">proc </aside>point_at<aside>(/<a href="atom.html">atom</a>/pointed_atom, make_bubble) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/modules/point/point.dm#L10"><img src="git.png" width="16" height="16" title="code/modules/point/point.dm 10"></a></aside></h3><p>Point at an atom</p>
|
||
<p>Intended to enable and standardise the pointing animation for all atoms</p>
|
||
<p>Not intended as a replacement for the mob verb</p><h3 id="proc/scatter_atom"><aside class="declaration">proc </aside>scatter_atom<aside>(x_offset, y_offset) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1187"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1187"></a></aside></h3><p>Used to scatter atoms so that multiple copies aren't all at the exact same spot.</p><h3 id="proc/set_glide_size"><aside class="declaration">proc </aside>set_glide_size<aside>(target) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L810"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 810"></a></aside></h3><p>This proc is recursive, and calls itself to constantly set the glide size of an atom/movable</p><h3 id="proc/set_loc"><aside class="declaration">proc </aside>set_loc<aside>(T, teleported) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L240"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 240"></a></aside></h3><p>Used in shuttle movement and camera eye stuff.
|
||
Primarily used to notify objects being moved by a shuttle/bluespace fuckup.</p><h3 id="proc/shove_impact"><aside class="declaration">proc </aside>shove_impact<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/target, /<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/attacker) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L986"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 986"></a></aside></h3><p>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.</p><h3 id="proc/stop_deadchat_plays"><aside class="declaration">proc </aside>stop_deadchat_plays<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1002"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1002"></a></aside></h3><p>Easy way to remove the component when the fun has been played out</p><h3 id="proc/stop_orbit"><aside class="declaration">proc </aside>stop_orbit<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L403"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 403"></a></aside></h3><p>Stop this atom from orbiting whatever it's orbiting.</p><h3 id="proc/tilt_over"><aside class="declaration">proc </aside>tilt_over<aside>(/<a href="turf.html">turf</a>/target, rotation_angle, should_rotate, rightable, block_interactions_until_righted) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1164"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1164"></a></aside></h3><p>Tip over an atom without too much fuss. This won't cause damage to anything, and just rotates the thing and (optionally) adds the component.</p>
|
||
<p>Arguments:</p>
|
||
<ul>
|
||
<li>target - The turf to tilt over onto</li>
|
||
<li>rotation_angle - The angle to rotate by. If not given, defaults to random rotating by 90 degrees clockwise or counterclockwise</li>
|
||
<li>should_rotate - Whether or not we should rotate at all</li>
|
||
<li>rightable - Whether or not this object should be rightable, attaching the tilted component to it</li>
|
||
<li>block_interactions_until_righted - If true, this object will need to be righted before it can be interacted with</li>
|
||
</ul><h3 id="proc/untilt"><aside class="declaration">proc </aside>untilt<aside>(/<a href="mob.html">mob</a>/<a href="mob/living.html">living</a>/user, duration) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/game/atoms_movable.dm#L1178"><img src="git.png" width="16" height="16" title="code/game/atoms_movable.dm 1178"></a></aside></h3><p>Untilt a tilted object.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |