mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
33 lines
16 KiB
HTML
33 lines
16 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/component/orbiter - 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="datum/component/orbiter.html#var">Var Details</a> - <a href="datum/component/orbiter.html#proc">Proc Details</a></header><main><h1>orbiter <aside>/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/orbiter.html">orbiter</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L36"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 36"></a></h1><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/component/orbiter.html#var/orbit_data">orbit_data</a></th><td>Cached transforms from before the orbiter started orbiting, to be restored on stopping their orbit</td></tr><tr><th><a href="datum/component/orbiter.html#var/orbiter_list">orbiter_list</a></th><td>List of observers orbiting the parent</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/component/orbiter.html#proc/InheritComponent">InheritComponent</a></th><td>See atom/movable/proc/orbit for parameter definitions</td></tr><tr><th><a href="datum/component/orbiter.html#proc/Initialize">Initialize</a></th><td>See atom/movable/proc/orbit for parameter definitions</td></tr><tr><th><a href="datum/component/orbiter.html#proc/begin_orbit">begin_orbit</a></th><td>See atom/movable/proc/orbit for parameter definitions</td></tr><tr><th><a href="datum/component/orbiter.html#proc/end_orbit">end_orbit</a></th><td>End the orbit and clean up our transformation.
|
||
If this removes the last atom orbiting us, then qdel ourselves.
|
||
Howver, if refreshing == TRUE, src will not be qdeleted if this leaves us with 0 orbiters.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/get_cached_transform">get_cached_transform</a></th><td>Get cached transform of the given orbiter.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/get_orbit_params">get_orbit_params</a></th><td>Get the given orbiter's orbit parameters bitfield</td></tr><tr><th><a href="datum/component/orbiter.html#proc/get_orbiter_layer">get_orbiter_layer</a></th><td>Get the layer the given orbiter was on before they started orbiting</td></tr><tr><th><a href="datum/component/orbiter.html#proc/handle_parent_move">handle_parent_move</a></th><td>The actual implementation function of the move react.
|
||
<strong>if you're trying to call this from a signal, call parent_move_react instead.</strong>
|
||
This implementation is separate so the orbited atom's old location and new location can be passed in separately.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/is_in_hierarchy">is_in_hierarchy</a></th><td>Returns TRUE if atom_to_find is transitively a parent of src.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/on_intermediate_move">on_intermediate_move</a></th><td>Called when an intermediate (somewhere between the topmost and the orbited) atom moves.
|
||
This atom will now become the leader.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/on_remove_child">on_remove_child</a></th><td>Callback fired when an item is removed from a tracked atom.
|
||
Removes all orbit-related signals up its hierarchy and moves orbiters to the current child.
|
||
As this will never be called by a turf, this should not conflict with parent_move_react.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/orbiter_move_react">orbiter_move_react</a></th><td>Called when the orbiter themselves moves.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/parent_move_react">parent_move_react</a></th><td>Signal handler for COMSIG_MOVABLE_MOVED. Special wrapper to handle the arguments that come from the signal.
|
||
If you want to call this directly, just call handle_parent_move.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/register_signals">register_signals</a></th><td>Register signals up the hierarchy, adding them to each parent (and their parent, and so on) up to the turf they're on.
|
||
The last atom in the hierarchy (the one whose .loc is the turf) becomes the leader, the atom ghosts will follow.
|
||
Registers on_intermediate_move for every non-leader atom so that if they move (removing them from the hierarchy), they will be set as the new leader.
|
||
Also registers on_remove_child to remove signals up the hierarchy when a child gets removed.
|
||
start: the first atom to register signals on. If start isn't inside of anything (or if its .loc is a turf), then it will become the leader.
|
||
Returns the new "leader", the atom that ghosts will follow.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/remove_signals">remove_signals</a></th><td>Remove all orbit-related signals in the object hierarchy above start.</td></tr><tr><th><a href="datum/component/orbiter.html#proc/store_orbit_data">store_orbit_data</a></th><td>orbit data helper functions
|
||
Store a collection of data for an orbiter.
|
||
orbiter: orbiter atom itself. The orbiter's transform and layer at this point will be captured and cached.
|
||
orbit_flags: bitfield consisting of flags describing the orbit.</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/orbit_data"><aside class="declaration">var </aside>orbit_data <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L42"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 42"></a></h3><p>Cached transforms from before the orbiter started orbiting, to be restored on stopping their orbit</p><h3 id="var/orbiter_list"><aside class="declaration">var </aside>orbiter_list <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L40"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 40"></a></h3><p>List of observers orbiting the parent</p><h2 id="proc">Proc Details</h2><h3 id="proc/InheritComponent"><aside class="parent"><a title="/datum/component" href="datum/component.html#proc/InheritComponent">↑</a></aside>InheritComponent<aside>(/<a href="datum.html">datum</a>/<a href="datum/component.html">component</a>/<a href="datum/component/orbiter.html">orbiter</a>/new_comp, original, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, 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#L71"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 71"></a></aside></h3><p>See atom/movable/proc/orbit for parameter definitions</p><h3 id="proc/Initialize"><aside class="parent"><a title="/datum/component" href="datum/component.html#proc/Initialize">↑</a></aside>Initialize<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, 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#L45"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 45"></a></aside></h3><p>See atom/movable/proc/orbit for parameter definitions</p><h3 id="proc/begin_orbit"><aside class="declaration">proc </aside>begin_orbit<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, 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#L88"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 88"></a></aside></h3><p>See atom/movable/proc/orbit for parameter definitions</p><h3 id="proc/end_orbit"><aside class="declaration">proc </aside>end_orbit<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, refreshing) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L156"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 156"></a></aside></h3><p>End the orbit and clean up our transformation.
|
||
If this removes the last atom orbiting us, then qdel ourselves.
|
||
Howver, if refreshing == TRUE, src will not be qdeleted if this leaves us with 0 orbiters.</p><h3 id="proc/get_cached_transform"><aside class="declaration">proc </aside>get_cached_transform<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L353"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 353"></a></aside></h3><p>Get cached transform of the given orbiter.</p><h3 id="proc/get_orbit_params"><aside class="declaration">proc </aside>get_orbit_params<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L362"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 362"></a></aside></h3><p>Get the given orbiter's orbit parameters bitfield</p><h3 id="proc/get_orbiter_layer"><aside class="declaration">proc </aside>get_orbiter_layer<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L371"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 371"></a></aside></h3><p>Get the layer the given orbiter was on before they started orbiting</p><h3 id="proc/handle_parent_move"><aside class="declaration">proc </aside>handle_parent_move<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbited, /<a href="atom.html">atom</a>/old_loc, /<a href="atom.html">atom</a>/new_loc, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L191"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 191"></a></aside></h3><p>The actual implementation function of the move react.
|
||
<strong>if you're trying to call this from a signal, call parent_move_react instead.</strong>
|
||
This implementation is separate so the orbited atom's old location and new location can be passed in separately.</p><h3 id="proc/is_in_hierarchy"><aside class="declaration">proc </aside>is_in_hierarchy<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/atom_to_find) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L324"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 324"></a></aside></h3><p>Returns TRUE if atom_to_find is transitively a parent of src.</p><h3 id="proc/on_intermediate_move"><aside class="declaration">proc </aside>on_intermediate_move<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/tracked, /<a href="atom.html">atom</a>/old_loc) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L309"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 309"></a></aside></h3><p>Called when an intermediate (somewhere between the topmost and the orbited) atom moves.
|
||
This atom will now become the leader.</p><h3 id="proc/on_remove_child"><aside class="declaration">proc </aside>on_remove_child<aside>(/<a href="datum.html">datum</a>/source, /<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/exiting, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L292"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 292"></a></aside></h3><p>Callback fired when an item is removed from a tracked atom.
|
||
Removes all orbit-related signals up its hierarchy and moves orbiters to the current child.
|
||
As this will never be called by a turf, this should not conflict with parent_move_react.</p><h3 id="proc/orbiter_move_react"><aside class="declaration">proc </aside>orbiter_move_react<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, /<a href="atom.html">atom</a>/oldloc, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L244"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 244"></a></aside></h3><p>Called when the orbiter themselves moves.</p><h3 id="proc/parent_move_react"><aside class="declaration">proc </aside>parent_move_react<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbited, /<a href="atom.html">atom</a>/old_loc, direction) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L237"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 237"></a></aside></h3><p>Signal handler for COMSIG_MOVABLE_MOVED. Special wrapper to handle the arguments that come from the signal.
|
||
If you want to call this directly, just call handle_parent_move.</p><h3 id="proc/register_signals"><aside class="declaration">proc </aside>register_signals<aside>(/<a href="atom.html">atom</a>/start) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L273"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 273"></a></aside></h3><p>Register signals up the hierarchy, adding them to each parent (and their parent, and so on) up to the turf they're on.
|
||
The last atom in the hierarchy (the one whose .loc is the turf) becomes the leader, the atom ghosts will follow.
|
||
Registers on_intermediate_move for every non-leader atom so that if they move (removing them from the hierarchy), they will be set as the new leader.
|
||
Also registers on_remove_child to remove signals up the hierarchy when a child gets removed.
|
||
start: the first atom to register signals on. If start isn't inside of anything (or if its .loc is a turf), then it will become the leader.
|
||
Returns the new "leader", the atom that ghosts will follow.</p><h3 id="proc/remove_signals"><aside class="declaration">proc </aside>remove_signals<aside>(/<a href="atom.html">atom</a>/start) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L258"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 258"></a></aside></h3><p>Remove all orbit-related signals in the object hierarchy above start.</p><h3 id="proc/store_orbit_data"><aside class="declaration">proc </aside>store_orbit_data<aside>(/<a href="atom.html">atom</a>/<a href="atom/movable.html">movable</a>/orbiter, orbit_flags) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/components/orbiter.dm#L341"><img src="git.png" width="16" height="16" title="code/datums/components/orbiter.dm 341"></a></aside></h3><p>orbit data helper functions
|
||
Store a collection of data for an orbiter.
|
||
orbiter: orbiter atom itself. The orbiter's transform and layer at this point will be captured and cached.
|
||
orbit_flags: bitfield consisting of flags describing the orbit.</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> |