path_map
Datum that describes the shortest path between a source turf and any turfs within a distance
Vars | |
avoid | Were we avoiding a turf? If so, which one? |
---|---|
building | Are we currently being built |
creation_time | The tick we were completed on, in case you want to hold onto this for a bit |
distances | List of distances from the starting turf, each index lines up with the next_closest list |
expanding | Are we currently being expanded? |
next_closest | Assoc list of turf -> the turf one step closer on the path Arranged in discovery order, so the last turf here will be the furthest from the start |
pass_info | The pass info datum used to create us |
pass_space | Were we allowed to path over space? |
start | Our starting turf, the location this map feeds into |
Procs | |
compare_against | Returns true if the passed in pass_map's pass logic matches ours False otherwise |
compare_against_args | Returns true if the passed in pass_info and start/pass_space/avoid match ours False otherwise |
copy_from | Copies the passed in path_map into this datum Saves some headache with updating refs if we want to modify a path_map |
expand | Expands this pathmap to cover a new range, assuming the arg is greater then the current range Returns true if this succeeded or was not required, false otherwise |
generate_path | Takes a turf to use as the other end, returns the path between the source node and it |
get_path_from | Takes a turf to start from, returns a path to the source turf of this datum |
get_path_to | Takes a turf to path to, returns the shortest path to it at the time of this datum's creation |
settings_to_path | Returns a new /datum/pathfind/sssp based off our settings Will have an invalid source mob, no max distance, and no ending callback |
turfs_in_range | Gets a list of turfs reachable by this path_map from the distance first to the distance second, both inclusive first > second or first < second are both respected, and the return order will reflect the arg order We return a list of turf -> distance, or null if we error |
Var Details
avoid
Were we avoiding a turf? If so, which one?
building
Are we currently being built
creation_time
The tick we were completed on, in case you want to hold onto this for a bit
distances
List of distances from the starting turf, each index lines up with the next_closest list
expanding
Are we currently being expanded?
next_closest
Assoc list of turf -> the turf one step closer on the path Arranged in discovery order, so the last turf here will be the furthest from the start
pass_info
The pass info datum used to create us
pass_space
Were we allowed to path over space?
start
Our starting turf, the location this map feeds into
Proc Details
compare_against
Returns true if the passed in pass_map's pass logic matches ours False otherwise
compare_against_args
Returns true if the passed in pass_info and start/pass_space/avoid match ours False otherwise
copy_from
Copies the passed in path_map into this datum Saves some headache with updating refs if we want to modify a path_map
expand
Expands this pathmap to cover a new range, assuming the arg is greater then the current range Returns true if this succeeded or was not required, false otherwise
generate_path
Takes a turf to use as the other end, returns the path between the source node and it
skip_first - If we should drop the first step in the path. Used to avoid stepping where we already are min_target_dist - How many, if any, turfs off the end of the path should we drop? reverse - If true, "reverses" the path generated. You'd want to use this for generating a path to the source node itself
get_path_from
Takes a turf to start from, returns a path to the source turf of this datum
skip_first - If we should drop the first step in the path. Used to avoid stepping where we already are min_target_dist - How many, if any, turfs off the end of the path should we drop?
get_path_to
Takes a turf to path to, returns the shortest path to it at the time of this datum's creation
skip_first - If we should drop the first step in the path. Used to avoid stepping where we already are min_target_dist - How many, if any, turfs off the end of the path should we drop?
settings_to_path
Returns a new /datum/pathfind/sssp based off our settings Will have an invalid source mob, no max distance, and no ending callback
turfs_in_range
Gets a list of turfs reachable by this path_map from the distance first to the distance second, both inclusive first > second or first < second are both respected, and the return order will reflect the arg order We return a list of turf -> distance, or null if we error