/tg/ Station 13 - Modules - TypesDefine Details

code/__HELPERS/path.dm

/proc/get_path_to This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions. Mind that diagonals cost the same as cardinal moves currently, so paths may look a bit strange, but should still be optimal.
/proc/pathfinding_finished Uses funny pass by reference bullshit to take the path created by pathfinding, and insert it into a return list We'll be able to use this return list to tell a sleeping proc to continue execution
CAN_STEPA helper macro to see if it's possible to step from the first turf into the second one, minding things like door access and directional windows. Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum. If you really want to optimize things, optimize this, cuz this gets called a lot. We do early next.density check despite it being already checked in LinkBlockedWithAccess for short-circuit performance
STEP_NOT_HERE_BUT_THEREAnother helper macro for JPS, for telling when a node has forced neighbors that need expanding
/datum/jps_nodeThe JPS Node datum represents a turf that we find interesting enough to add to the open list and possibly search for new tiles from
/proc/HeapPathWeightCompare TODO: Macro this to reduce proc overhead
/datum/pathfindThe datum used to handle the JPS pathfinding, completely self-contained

Define Details

CAN_STEP

A helper macro to see if it's possible to step from the first turf into the second one, minding things like door access and directional windows. Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum. If you really want to optimize things, optimize this, cuz this gets called a lot. We do early next.density check despite it being already checked in LinkBlockedWithAccess for short-circuit performance

STEP_NOT_HERE_BUT_THERE

Another helper macro for JPS, for telling when a node has forced neighbors that need expanding