Files
Paradise/datum/pathfind.html

9 lines
8.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/pathfind - 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/pathfind.html#var">Var Details</a> - <a href="datum/pathfind.html#proc">Proc Details</a></header><main><h1>pathfind <aside>/<a href="datum.html">datum</a>/<a href="datum/pathfind.html">pathfind</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L83"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 83"></a></h1><p>The datum used to handle the JPS pathfinding, completely self-contained</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/pathfind.html#var/avoid">avoid</a></th><td>A specific turf we're avoiding, like if a mulebot is being blocked by someone t-posing in a doorway we're trying to get through</td></tr><tr><th><a href="datum/pathfind.html#var/max_distance">max_distance</a></th><td>Limits how far we can search before giving up on a path</td></tr><tr><th><a href="datum/pathfind.html#var/on_finish">on_finish</a></th><td>The callbacks to invoke when we're done working, passing in the completed product
Invoked in order</td></tr><tr><th><a href="datum/pathfind.html#var/pass_info">pass_info</a></th><td>Datum that holds the canpass info of this pathing attempt. This is what CanPathfindPass sees</td></tr><tr><th><a href="datum/pathfind.html#var/simulated_only">simulated_only</a></th><td>Space is big and empty, if this is TRUE then we ignore pathing through unsimulated tiles</td></tr><tr><th><a href="datum/pathfind.html#var/start">start</a></th><td>The turf we started at</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/pathfind.html#proc/early_exit">early_exit</a></th><td>early_exit() is called when something goes wrong in processing, and we need to halt the pathfinding NOW</td></tr><tr><th><a href="datum/pathfind.html#proc/finished">finished</a></th><td>Cleanup pass for the pathfinder. This tidies up the path, and fufills the pathfind's obligations</td></tr><tr><th><a href="datum/pathfind.html#proc/hand_back">hand_back</a></th><td>Call to return a value to whoever spawned this pathfinding work
Will fail if it's already been called</td></tr><tr><th><a href="datum/pathfind.html#proc/search_step">search_step</a></th><td>search_step() is the workhorse of pathfinding. It'll do the searching logic, and will slowly build up a path
returns TRUE if everything is stable, FALSE if the pathfinding logic has failed, and we need to abort</td></tr><tr><th><a href="datum/pathfind.html#proc/start">start</a></th><td>&quot;starts&quot; off the pathfinding, by storing the values this datum will need to work later on
returns FALSE if it fails to setup properly, TRUE otherwise</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/avoid"><aside class="declaration">var </aside>avoid <aside> /<a href="turf.html">turf</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L93"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 93"></a></h3><p>A specific turf we're avoiding, like if a mulebot is being blocked by someone t-posing in a doorway we're trying to get through</p><h3 id="var/max_distance"><aside class="declaration">var </aside>max_distance <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L89"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 89"></a></h3><p>Limits how far we can search before giving up on a path</p><h3 id="var/on_finish"><aside class="declaration">var </aside>on_finish <aside> /list/<a href="datum.html">datum</a>/callback</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L96"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 96"></a></h3><p>The callbacks to invoke when we're done working, passing in the completed product
Invoked in order</p><h3 id="var/pass_info"><aside class="declaration">var </aside>pass_info <aside> /<a href="datum.html">datum</a>/<a href="datum/can_pass_info.html">can_pass_info</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L98"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 98"></a></h3><p>Datum that holds the canpass info of this pathing attempt. This is what CanPathfindPass sees</p><h3 id="var/simulated_only"><aside class="declaration">var </aside>simulated_only <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L91"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 91"></a></h3><p>Space is big and empty, if this is TRUE then we ignore pathing through unsimulated tiles</p><h3 id="var/start"><aside class="declaration">var </aside>start <aside> /<a href="turf.html">turf</a></aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L85"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 85"></a></h3><p>The turf we started at</p><h2 id="proc">Proc Details</h2><h3 id="proc/early_exit"><aside class="declaration">proc </aside>early_exit<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L127"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 127"></a></aside></h3><p>early_exit() is called when something goes wrong in processing, and we need to halt the pathfinding NOW</p><h3 id="proc/finished"><aside class="declaration">proc </aside>finished<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L134"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 134"></a></aside></h3><p>Cleanup pass for the pathfinder. This tidies up the path, and fufills the pathfind's obligations</p><h3 id="proc/hand_back"><aside class="declaration">proc </aside>hand_back<aside>(value) <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L141"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 141"></a></aside></h3><p>Call to return a value to whoever spawned this pathfinding work
Will fail if it's already been called</p><h3 id="proc/search_step"><aside class="declaration">proc </aside>search_step<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L121"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 121"></a></aside></h3><p>search_step() is the workhorse of pathfinding. It'll do the searching logic, and will slowly build up a path
returns TRUE if everything is stable, FALSE if the pathfinding logic has failed, and we need to abort</p><h3 id="proc/start"><aside class="declaration">proc </aside>start<aside>() <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__HELPERS/paths/path.dm#L111"><img src="git.png" width="16" height="16" title="code/__HELPERS/paths/path.dm 111"></a></aside></h3><p>&quot;starts&quot; off the pathfinding, by storing the values this datum will need to work later on
returns FALSE if it fails to setup properly, TRUE otherwise</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>