/tg/ Station 13 - Modules - Types

code/__HELPERS/paths/path.dm

/proc/get_path_to This is the proc you use whenever you want to have pathfinding more complex than "try stepping towards the thing". If no path was found, returns an empty list, which is important for bots like medibots who expect an empty list rather than nothing. It will yield until a path is returned, using magic
/proc/get_swarm_path_to POTENTIALLY cheaper version of get_path_to This proc generates a path map for the end atom's turf, which allows us to cheaply do pathing operations "at" it Generation is significantly SLOWER then get_path_to, but if many things are/might be pathing at something then it is much faster Runs the risk of returning an suboptimal or INVALID PATH if the delay between map creation and use is too long
/proc/pathfinding_finished Uses funny pass by reference bullshit to take the output 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
/datum/pathfindThe datum used to handle the JPS pathfinding, completely self-contained
/proc/remove_clunky_diagonals Processes a path (list of turfs), removes any diagonal moves that would lead to a weird bump
/proc/remove_diagonals Processes a path (list of turfs), removes any diagonal moves
/datum/can_pass_infoThese are generally cheaper than looping contents so they go first Holds all information about what an atom can move through Passed into CanAStarPass to provide context for a pathing attempt