/tg/ Station 13 - Modules - Types

code/__HELPERS/spatial_info.dm

/mob/oranges_ear
/proc/get_hearers_in_viewreturns every hearaing movable in view to the turf of source not taking into account lighting useful when you need to maintain always being able to hear something if a sound is emitted from it and you can see it (and youre in range). otherwise this is just a more expensive version of get_hearers_in_LOS().
/proc/get_hearers_in_rangeThe exact same as get_hearers_in_view, but not limited by visibility. Does no filtering for traits, line of sight, or any other such criteria. Filtering is intended to be done by whatever calls this function.
/proc/get_hearers_in_LOSReturns a list of movable atoms that are hearing sensitive in view_radius and line of sight to source the majority of the work is passed off to the spatial grid if view_radius > 0 because view() isnt a raycasting algorithm, this does not hold symmetry to it. something in view might not be hearable with this. if you want that use get_hearers_in_view() - however thats significantly more expensive
/proc/inLineOfSightCalculate if two atoms are in sight, returns TRUE or FALSE
/proc/circle_rangeReturns all atoms present in a circle around the center
/proc/circle_viewReturns all atoms present in a circle around the center but uses view() instead of range() (Currently not used)
/proc/get_dist_euclideanReturns the distance between two atoms
/proc/circle_range_turfsReturns a list of turfs around a center based on RANGE_TURFS()
/proc/circle_view_turfsReturns a list of turfs around a center based on view()
/proc/border_diamond_range_turfsReturns the list of turfs around the outside of a center based on RANGE_TURFS()
/proc/slice_off_turfsReturns a slice of a list of turfs, defined by the ones that are inside the inner/outer angle's bounds
/proc/get_bbox_of_atomsGet a bounding box of a list of atoms.
/proc/get_hearLike view but bypasses luminosity check
/proc/get_open_turf_in_dirReturns the open turf next to the center in a specific direction
/proc/get_adjacent_open_turfsReturns a list with all the adjacent open turfs. Clears the list of nulls in the end.
/proc/get_adjacent_open_areasReturns a list with all the adjacent areas by getting the adjacent open turfs
/proc/get_areas_in_rangeReturns a list with the names of the areas around a center at a certain distance Returns the local area if no distance is indicated Returns an empty list if the center is null
/proc/get_adjacent_areasReturns a list of all areas that are adjacent to the center atom's area, clear the list of nulls at the end.
/proc/alone_in_areaChecks if the mob provided (must_be_alone) is alone in an area
/proc/turf_peelBehaves like the orange() proc, but only looks in the outer range of the function (The "peel" of the orange). This is useful for things like checking if a mob is in a certain range, but not within a smaller range.