astar 
Vars | |
closed | A k:v list of turf -> directions. The directions are directions the pathfinder attempted to step into the turf but failed. |
---|---|
end | The turf we're trying to path to (note that this won't track a moving target) |
heuristic | An optional callback to invoke to return a positive value to add to the path's distance. |
invoker | The thing that we're actually trying to path for |
mintargetdist | How far away we have to get to the end target before we can call it quits |
open_binary_tree | A binary search tree containing the discovered nodes. |
open_turf_to_node | A k:V list of turf -> astar node |
path | The list we compile at the end if successful to pass back |
skip_first | If we should delete the first step in the path or not. Used often because it is just the starting tile |
use_diagonals | Defines how we handle diagonal moves. See __DEFINES/path.dm |
Procs | |
finished | Cleanup pass for the pathfinder. This tidies up the path, and fufills the pathfind's obligations |
generic_heuristic | The generic heuristic, euclidean distance. |
search_step | 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 |
start | "starts" 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 |
unwind_path | Called when we've hit the goal with the node that represents the last tile, then sets the path var to that path so it can be returned by [datum/pathfind/proc/search] |
Var Details
closed 
A k:v list of turf -> directions. The directions are directions the pathfinder attempted to step into the turf but failed.
end 
The turf we're trying to path to (note that this won't track a moving target)
heuristic 
An optional callback to invoke to return a positive value to add to the path's distance.
invoker 
The thing that we're actually trying to path for
mintargetdist 
How far away we have to get to the end target before we can call it quits
open_binary_tree 
A binary search tree containing the discovered nodes.
open_turf_to_node 
A k:V list of turf -> astar node
path 
The list we compile at the end if successful to pass back
skip_first 
If we should delete the first step in the path or not. Used often because it is just the starting tile
use_diagonals 
Defines how we handle diagonal moves. See __DEFINES/path.dm
Proc Details
finished
Cleanup pass for the pathfinder. This tidies up the path, and fufills the pathfind's obligations
generic_heuristic
The generic heuristic, euclidean distance.
search_step
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
start
"starts" 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
unwind_path
Called when we've hit the goal with the node that represents the last tile, then sets the path var to that path so it can be returned by [datum/pathfind/proc/search]