Goonstation 13 - Modules - TypesDefine Details

_std/pathfinding.dm

POP_MAX_DISTPathfind option key; The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)
POP_MAX_SEENPathfind option key; The maximum number of actual tiles seen. Sometimes a better limiter maybe?
POP_MIN_DISTPathfind option key; Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.
POP_IDPathfind option key; An ID card representing what access we have and what doors we can open. Its location relative to the pathing atom is irrelevant
POP_SIMULATED_ONLYPathfind option key; Whether we consider turfs without atmos simulation (AKA do we want to ignore space)
POP_EXCLUDEPathfind option key; If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf
POP_CARDINAL_ONLYPathfind option key; Whether to find only paths consisting of cardinal steps.
POP_DOOR_CHECKPathfind option key; Whether or not to check if doors are blocked (welded, out of power, locked, etc...)
POP_IGNORE_CACHEPathfind option key; Whether to ignore passability caching (for extremely weird cases; like pods.)
/proc/get_path_to This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing".
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.
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
/proc/jpsTurfPassable this is a slight modification of /proc/checkTurfPassable to avoid indirect proc call overhead Returns false if there is a dense atom on the turf, unless a custom hueristic is passed.
/proc/checkTurfPassable Returns false if there is a dense atom on the turf, unless a custom hueristic is passed.

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.

POP_CARDINAL_ONLY

Pathfind option key; Whether to find only paths consisting of cardinal steps.

POP_DOOR_CHECK

Pathfind option key; Whether or not to check if doors are blocked (welded, out of power, locked, etc...)

POP_EXCLUDE

Pathfind option key; If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf

POP_ID

Pathfind option key; An ID card representing what access we have and what doors we can open. Its location relative to the pathing atom is irrelevant

POP_IGNORE_CACHE

Pathfind option key; Whether to ignore passability caching (for extremely weird cases; like pods.)

POP_MAX_DIST

Pathfind option key; The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite)

POP_MAX_SEEN

Pathfind option key; The maximum number of actual tiles seen. Sometimes a better limiter maybe?

POP_MIN_DIST

Pathfind option key; Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example.

POP_SIMULATED_ONLY

Pathfind option key; Whether we consider turfs without atmos simulation (AKA do we want to ignore space)

STEP_NOT_HERE_BUT_THERE

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