/tg/ Station 13 - Modules - Types

code/__HELPERS/atoms.dm

/proc/get_nested_locsReturns a list of all locations (except the area) the movable is within.
/proc/can_seeStep-towards method of determining whether one atom can see another. Similar to viewers() note: this is a line of sight algorithm, view() does not do any sort of raycasting and cannot be emulated by it accurately
/proc/get_cardinal_dirGet the cardinal direction between two atoms
/proc/get_pixel_distanceFinds the distance between two atoms, in pixels
centered = FALSE counts from turf edge to edge
centered = TRUE counts from turf center to turf center
of course mathematically this is just adding world.icon_size on again
/proc/check_wall_itemCheck if there is already a wall item on the turf loc floor_loc = floor tile in front of the wall dir_toward_wall = direction from the floor tile in front of the wall towards the wall check_external = truthy if we should be checking against items coming out of the wall, rather than visually on top of the wall.
/proc/random_stepForces the atom to take a step in a random direction
/proc/is_source_facing_targetCompare source's dir, the clockwise dir of source and the anticlockwise dir of source To the opposite dir of the dir returned by get_dir(target,source) If one of them is a match, then source is facing target
/proc/urangeultra range (no limitations on distance, faster than range for distances > 8); including areas drastically decreases performance
/proc/spiral_rangesimilar function to range(), but with no limitations on the distance; will search spiralling outwards from the center
/proc/get_closest_atomReturns the closest atom of a specific type in a list from a source
/proc/pick_closest_pathReturns a chosen path that is the closest to a list of matches
/proc/generate_items_insideCreates new items inside an atom based on a list
/proc/getReturns the atom type in the specified loc
/proc/los_checkLine of sight check! Spawns a dummy object and then iterates through each turf to see if it's blocked by something not handled by pass_args. Contains a mid_los_check, meant to be overriden by subtypes. args:
/proc/passA do nothing proc