/tg/ Station 13 - Modules - Types

# code/__HELPERS/atoms.dm

/proc/get_nested_locs Returns a list of all locations (except the area) the movable is within. Step-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 Get the cardinal direction between two atoms Finds 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 Check 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. Forces the atom to take a step in a random direction Compare 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 ultra range (no limitations on distance, faster than range for distances > 8); including areas drastically decreases performance similar function to range(), but with no limitations on the distance; will search spiralling outwards from the center Returns the closest atom of a specific type in a list from a source Returns a chosen path that is the closest to a list of matches Creates new items inside an atom based on a list Returns the atom type in the specified loc A do nothing proc