/tg/ Station 13 - Modules - Types

code/__HELPERS/turfs.dm

/proc/get_teleport_locReturns location. Returns null if no location was found.
/proc/get_atom_on_turfReturns the top-most atom sitting on the turf. For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_edge_target_turfReturns the turf located at the map edge in the specified direction relative to target_atom used for mass driver
/proc/get_ranged_target_turf_directGet ranged target turf, but with direct targets as opposed to directions
/proc/get_offset_target_turfreturns turf relative to target_atom offset in dx and dy tiles, bound to map limits
/proc/get_turf_pixelLets the turf this atom's ICON appears to inhabit it takes into account: Pixel_x/y Matrix x/y NOTE: if your atom has non-standard bounds then this proc will handle it, but: if the bounds are even, then there are an even amount of "middle" turfs, the one to the EAST, NORTH, or BOTH is picked this may seem bad, but you're at least as close to the center of the atom as possible, better than byond's default loc being all the way off) if the bounds are odd, the true middle turf of the atom is returned
/proc/get_visual_offsetReturns how visually "off" the atom is from its source turf as a list of x, y (in pixel steps) it takes into account: Pixel_x/y Matrix x/y Icon width/height
/proc/pixel_offset_turfTakes a turf, and a list of x and y pixel offsets and returns the turf that the offset position best lands in
/proc/parse_caught_click_modifiersReturns a turf based on text inputs, original turf and viewing client
/proc/screen_loc_to_turfAlmost identical to the params_to_turf(), but unused (remove?)
/proc/spiral_range_turfssimilar function to RANGE_TURFS(), but will search spiralling outwards from the center (like the above, but only turfs)
/proc/get_random_station_turfReturns a random turf on the station
/proc/get_safe_random_station_turfReturns a random turf on the station, excludes dense turfs (like walls) and areas that have valid_territory set to FALSE
/proc/valid_build_directionChecks whether the target turf is in a valid state to accept a directional construction such as windows or railings.
/proc/is_type_on_turfChecks whether or not a particular typepath or subtype of it is present on a turf
/proc/get_blueprint_dataget_blueprint_data Gets a list of turfs around a central turf and gets the blueprint data in a list Args: