mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
1 line
9.3 KiB
HTML
1 line
9.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/pathfinding_mover - 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/pathfinding_mover.html#var">Var Details</a> - <a href="datum/pathfinding_mover.html#proc">Proc Details</a></header><main><h1>pathfinding_mover <aside>/<a href="datum.html">datum</a>/<a href="datum/pathfinding_mover.html">pathfinding_mover</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L5"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 5"></a></h1><p>A generalized datum for pathfinding, and moving to a target.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/pathfinding_mover.html#var/consider_movement_delay">consider_movement_delay</a></th><td>Do we consider movement delay? Disable for non-mobs</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/last_movement_delay">last_movement_delay</a></th><td>Requires <code>consider_movement_delay = TRUE</code>, saves the last movement delay to prevent diagonal weirdness</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/max_tries">max_tries</a></th><td>max amount of tries before resetting path to null</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/move_speed">move_speed</a></th><td>How many 2-tick delays per move (5 = 1 second)</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/move_ticks">move_ticks</a></th><td>A counter for move_speed via modulo</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/on_set_path_null">on_set_path_null</a></th><td>Callback invoked on failure</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/on_success">on_success</a></th><td>Callback invoked on success</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/owner">owner</a></th><td>Can be a simplemob bot, a drone, or even a pathfinding modsuit module (currently only implemented for drones)</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/owner_move_delay">owner_move_delay</a></th><td>The delay called as part of Move()</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/path">path</a></th><td>List of turfs through which a mod 'steps' to reach the waypoint</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/target">target</a></th><td>The target turf we are after</td></tr><tr><th><a href="datum/pathfinding_mover.html#var/tries">tries</a></th><td>How many times have we tried to move?</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/pathfinding_mover.html#proc/generalized_step">generalized_step</a></th><td>Take our next step in our pathfinding algorithm</td></tr><tr><th><a href="datum/pathfinding_mover.html#proc/process">process</a></th><td>Using fast process, see if we should take the next step yet</td></tr><tr><th><a href="datum/pathfinding_mover.html#proc/start">start</a></th><td>Start moving towards our target, returns false if the path does not lead to the target</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/consider_movement_delay"><aside class="declaration">var </aside>consider_movement_delay <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L30"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 30"></a></h3><p>Do we consider movement delay? Disable for non-mobs</p><h3 id="var/last_movement_delay"><aside class="declaration">var </aside>last_movement_delay <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L32"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 32"></a></h3><p>Requires <code>consider_movement_delay = TRUE</code>, saves the last movement delay to prevent diagonal weirdness</p><h3 id="var/max_tries"><aside class="declaration">var </aside>max_tries <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L14"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 14"></a></h3><p>max amount of tries before resetting path to null</p><h3 id="var/move_speed"><aside class="declaration">var </aside>move_speed <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 18"></a></h3><p>How many 2-tick delays per move (5 = 1 second)</p><h3 id="var/move_ticks"><aside class="declaration">var </aside>move_ticks <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L20"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 20"></a></h3><p>A counter for move_speed via modulo</p><h3 id="var/on_set_path_null"><aside class="declaration">var </aside>on_set_path_null <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L23"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 23"></a></h3><p>Callback invoked on failure</p><h3 id="var/on_success"><aside class="declaration">var </aside>on_success <aside>– /<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L25"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 25"></a></h3><p>Callback invoked on success</p><h3 id="var/owner"><aside class="declaration">var </aside>owner <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/datums/pathfinding_mover.dm#L7"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 7"></a></h3><p>Can be a simplemob bot, a drone, or even a pathfinding modsuit module (currently only implemented for drones)</p><h3 id="var/owner_move_delay"><aside class="declaration">var </aside>owner_move_delay <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/datums/pathfinding_mover.dm#L28"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 28"></a></h3><p>The delay called as part of Move()</p><h3 id="var/path"><aside class="declaration">var </aside>path <aside>– /list</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L12"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 12"></a></h3><p>List of turfs through which a mod 'steps' to reach the waypoint</p><h3 id="var/target"><aside class="declaration">var </aside>target <aside>– /<a href="turf.html">turf</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L9"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 9"></a></h3><p>The target turf we are after</p><h3 id="var/tries"><aside class="declaration">var </aside>tries <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L16"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 16"></a></h3><p>How many times have we tried to move?</p><h2 id="proc">Proc Details</h2><h3 id="proc/generalized_step"><aside class="declaration">proc </aside>generalized_step<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L109"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 109"></a></aside></h3><p>Take our next step in our pathfinding algorithm</p><h3 id="proc/process">process<aside>(wait) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L88"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 88"></a></aside></h3><p>Using fast process, see if we should take the next step yet</p><h3 id="proc/start"><aside class="declaration">proc </aside>start<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/datums/pathfinding_mover.dm#L72"><img src="git.png" width="16" height="16" title="code/datums/pathfinding_mover.dm 72"></a></aside></h3><p>Start moving towards our target, returns false if the path does not lead to the target</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> |