/turf
Any floor or wall. What makes up the station and the rest of the map.
Vars | |
blocks_air | Does this turf block air from existing on it |
---|---|
conductivity_blocked_directions | bitfield of dirs in which we thermal conductivity is blocked |
directional_opacity | Which directions does this turf block the vision of, taking into account both the turf's opacity and the movable opacity_sources. |
dynamic_lumcount | Lumcount added by sources other than lighting datum objects, such as the overlay lighting component. |
fixed_underlay | Icon-smoothing variable to map a diagonal wall corner with a fixed underlay. |
force_no_gravity | whether or not this turf forces movables on it to have no gravity (unless they themselves have forced gravity) |
heat_capacity | Amount of heat necessary to activate some atmos processes (there is a weird usage of this var because is compared directly to the temperature instead of heat energy) |
holodeck_compatible | the holodeck can load onto this turf if TRUE |
in_contents_of | For the area_contents list unit test Allows us to know our area without needing to preassign it Sorry for the mess |
inherent_explosive_resistance | How much explosive resistance this turf is providing to itself Defaults to -1, interpreted as initial(explosive_resistance) This is an optimization to prevent turfs from needing to set these on init This would either be expensive, or impossible to manage. Let's just avoid it yes? Never directly access this, use get_explosive_block() instead |
initial_gas_mix | used for mapping and for breathing while in walls (because that's a thing that needs to be accounted for...) string parsed by /datum/gas/proc/copy_from_turf approximation of MOLES_O2STANDARD and MOLES_N2STANDARD pending byond allowing constant expressions to be embedded in constant strings If someone will place 0 of some gas there, SHIT WILL BREAK. Do not do that. |
lattice_underneath | If there is a lattice underneat this turf. Used for the attempt_lattice_replacement proc to determine if it should place lattice. |
lighting_corner_NE | Lighting Corner datums. |
lighting_object | Our lighting object. |
max_fire_temperature_sustained | The max temperature of the fire which it was subjected to |
opacity_sources | Lazylist of movable atoms providing opacity sources. |
overfloor_placed | If there's a tile over a basic floor that can be ripped out |
pathing_pass_method | How pathing algorithm will check if this turf is passable by itself (not including content checks). By default it's just density check. WARNING: Currently to use a density shortcircuiting this does not support dense turfs with special allow through function |
rcd_memory | If this turf contained an RCD'able object (or IS one, for walls) but is now destroyed, this will preserve the value. See _DEFINES/construction.dm for RCD_MEMORY*. |
space_lit | Bool, whether this turf will always be illuminated no matter what area it is in Makes it look blue, be warned |
to_be_destroyed | Used for fire, if a melting temperature was reached, it will be destroyed |
turf_flags | Turf bitflags, see code/__DEFINES/flags.dm |
underfloor_accessibility | How accessible underfloor pieces such as wires, pipes, etc are on this turf. Can be HIDDEN, VISIBLE, or INTERACTABLE. |
Procs | |
LinkBlockedWithAccess | Check if there is a door that needs access in its way |
ScrapeAway | Take off the top layer turf and replace it with the next baseturf down |
__auxtools_update_turf_temp_info | We do NOT use the shortcut here, because this is faster |
add_opacity_source | Proc to add movable sources of opacity on the turf and let it handle lighting code. |
attempt_lattice_replacement | Attempts to replace a tile with lattice. Amount is the amount of tiles to scrape away. |
baseturf_at_depth | Returns the baseturf at the given depth. For example, baseturf_at_depth(1) will give the baseturf that would show up when scraping once. |
can_cross_safely | Returns whether it is safe for an atom to move across this turf |
change_area | Call to move a turf from its current area to a new one |
clear_signal_refs | WARNING WARNING Turfs DO NOT lose their signals when they get replaced, REMEMBER THIS It's possible because turfs are fucked, and if you have one in a list and it's replaced with another one, the list ref points to the new turf We do it because moving signals over was needlessly expensive, and bloated a very commonly used bit of code |
consider_pressure_difference | SPACEWIND |
count_baseturfs | Returns the total number of baseturfs |
depth_to_find_baseturf | Tries to find the given type in baseturfs. If found, returns how deep it is for use in other baseturf procs, or null if it cannot be found. For example, this number can be passed into ScrapeAway to scrape everything until that point. |
fromShuttleMove | Base procs Called on every turf in the shuttle region, returns a bitflag for allowed movements of that turf returns the new move_mode (based on the old) |
ignite_turf | Called when attempting to set fire to a turf |
insert_baseturf | Inserts a baseturf at the given level.
"Level" here doesn't mean depth.
For example, insert_baseturf(2, /turf/open/floor/plating) will make it so
the 2nd to last turf in the list is plating.
This is different from depth, since depth is the level from the top. |
is_blocked_turf | Check whether the specified turf is blocked by something dense inside it with respect to a specific atom. |
is_blocked_turf_ignore_climbable | Checks whether the specified turf is blocked by something dense inside it, but ignores anything with the climbable trait |
load_on_top | Places a turf on top - for map loading |
on_change_area | Allows for reactions to an area change without inherently requiring change_area() be called (I hate maploading) |
place_on_bottom | Places the given turf on the bottom of the turf stack. |
place_on_top | Places a turf at the top of the stack |
process_cell | SIMULATION |
reachableAdjacentAtmosTurfs | Returns adjacent turfs in cardinal directions that are reachable via atmos |
reachableAdjacentTurfs | Returns a list the src/caller can cross into |
recalculate_directional_opacity | Calculate on which directions this turfs block view. |
remove_baseturfs_from_typecache | Removes all baseturfs that are found in the given typecache. |
remove_opacity_source | Proc to remove movable sources of opacity on the turf and let it handle lighting code. |
replace_baseturf | Replaces all instances of needle_type in baseturfs with replacement_type |
stack_ontop_of_baseturf | Places a baseturf ontop of a searched for baseturf. |
toShuttleMove | Called from the new turf before anything has been moved Only gets called if fromShuttleMove returns true first returns the new move_mode (based on the old) |
transfer_area_lighting | Transfer the lighting of one area to another |
wash | Called when this turf is being washed. Washing a turf will also wash any mopable floor decals |
zFall | Precipitates a movable (plus whatever buckled to it) to lower z levels if possible and then calls zImpact() |
zImpact | Called each time the target falls down a z level possibly making their trajectory come to a halt. see __DEFINES/movement.dm. |
Var Details
blocks_air
Does this turf block air from existing on it
conductivity_blocked_directions
bitfield of dirs in which we thermal conductivity is blocked
directional_opacity
Which directions does this turf block the vision of, taking into account both the turf's opacity and the movable opacity_sources.
dynamic_lumcount
Lumcount added by sources other than lighting datum objects, such as the overlay lighting component.
fixed_underlay
Icon-smoothing variable to map a diagonal wall corner with a fixed underlay.
force_no_gravity
whether or not this turf forces movables on it to have no gravity (unless they themselves have forced gravity)
heat_capacity
Amount of heat necessary to activate some atmos processes (there is a weird usage of this var because is compared directly to the temperature instead of heat energy)
holodeck_compatible
the holodeck can load onto this turf if TRUE
in_contents_of
For the area_contents list unit test Allows us to know our area without needing to preassign it Sorry for the mess
inherent_explosive_resistance
How much explosive resistance this turf is providing to itself Defaults to -1, interpreted as initial(explosive_resistance) This is an optimization to prevent turfs from needing to set these on init This would either be expensive, or impossible to manage. Let's just avoid it yes? Never directly access this, use get_explosive_block() instead
initial_gas_mix
used for mapping and for breathing while in walls (because that's a thing that needs to be accounted for...) string parsed by /datum/gas/proc/copy_from_turf approximation of MOLES_O2STANDARD and MOLES_N2STANDARD pending byond allowing constant expressions to be embedded in constant strings If someone will place 0 of some gas there, SHIT WILL BREAK. Do not do that.
lattice_underneath
If there is a lattice underneat this turf. Used for the attempt_lattice_replacement proc to determine if it should place lattice.
lighting_corner_NE
Lighting Corner datums.
lighting_object
Our lighting object.
max_fire_temperature_sustained
The max temperature of the fire which it was subjected to
opacity_sources
Lazylist of movable atoms providing opacity sources.
overfloor_placed
If there's a tile over a basic floor that can be ripped out
pathing_pass_method
How pathing algorithm will check if this turf is passable by itself (not including content checks). By default it's just density check. WARNING: Currently to use a density shortcircuiting this does not support dense turfs with special allow through function
rcd_memory
If this turf contained an RCD'able object (or IS one, for walls) but is now destroyed, this will preserve the value. See _DEFINES/construction.dm for RCD_MEMORY*.
space_lit
Bool, whether this turf will always be illuminated no matter what area it is in Makes it look blue, be warned
to_be_destroyed
Used for fire, if a melting temperature was reached, it will be destroyed
turf_flags
Turf bitflags, see code/__DEFINES/flags.dm
underfloor_accessibility
How accessible underfloor pieces such as wires, pipes, etc are on this turf. Can be HIDDEN, VISIBLE, or INTERACTABLE.
Proc Details
LinkBlockedWithAccess
Check if there is a door that needs access in its way
ScrapeAway
Take off the top layer turf and replace it with the next baseturf down
__auxtools_update_turf_temp_info
We do NOT use the shortcut here, because this is faster
add_opacity_source
Proc to add movable sources of opacity on the turf and let it handle lighting code.
attempt_lattice_replacement
Attempts to replace a tile with lattice. Amount is the amount of tiles to scrape away.
baseturf_at_depth
Returns the baseturf at the given depth. For example, baseturf_at_depth(1) will give the baseturf that would show up when scraping once.
can_cross_safely
Returns whether it is safe for an atom to move across this turf
change_area
Call to move a turf from its current area to a new one
clear_signal_refs
WARNING WARNING Turfs DO NOT lose their signals when they get replaced, REMEMBER THIS It's possible because turfs are fucked, and if you have one in a list and it's replaced with another one, the list ref points to the new turf We do it because moving signals over was needlessly expensive, and bloated a very commonly used bit of code
consider_pressure_difference
SPACEWIND
count_baseturfs
Returns the total number of baseturfs
depth_to_find_baseturf
Tries to find the given type in baseturfs. If found, returns how deep it is for use in other baseturf procs, or null if it cannot be found. For example, this number can be passed into ScrapeAway to scrape everything until that point.
fromShuttleMove
Base procs Called on every turf in the shuttle region, returns a bitflag for allowed movements of that turf returns the new move_mode (based on the old)
ignite_turf
Called when attempting to set fire to a turf
insert_baseturf
Inserts a baseturf at the given level.
"Level" here doesn't mean depth.
For example, insert_baseturf(2, /turf/open/floor/plating)
will make it so
the 2nd to last turf in the list is plating.
This is different from depth, since depth is the level from the top.
is_blocked_turf
Check whether the specified turf is blocked by something dense inside it with respect to a specific atom.
Returns truthy value TURF_BLOCKED_TURF_DENSE if the turf is blocked because the turf itself is dense. Returns truthy value TURF_BLOCKED_CONTENT_DENSE if one of the turf's contents is dense and would block a source atom's movement. Returns falsey value TURF_NOT_BLOCKED if the turf is not blocked.
Arguments:
- exclude_mobs - If TRUE, ignores dense mobs on the turf.
- source_atom - If this is not null, will check whether any contents on the turf can block this atom specifically. Also ignores itself on the turf.
- ignore_atoms - Check will ignore any atoms in this list. Useful to prevent an atom from blocking itself on the turf.
- type_list - are we checking for types of atoms to ignore and not physical atoms
is_blocked_turf_ignore_climbable
Checks whether the specified turf is blocked by something dense inside it, but ignores anything with the climbable trait
Works similar to is_blocked_turf(), but ignores climbables and has less options. Primarily added for jaunting checks
load_on_top
Places a turf on top - for map loading
on_change_area
Allows for reactions to an area change without inherently requiring change_area() be called (I hate maploading)
place_on_bottom
Places the given turf on the bottom of the turf stack.
place_on_top
Places a turf at the top of the stack
process_cell
SIMULATION
reachableAdjacentAtmosTurfs
Returns adjacent turfs in cardinal directions that are reachable via atmos
reachableAdjacentTurfs
Returns a list the src/caller can cross into
recalculate_directional_opacity
Calculate on which directions this turfs block view.
remove_baseturfs_from_typecache
Removes all baseturfs that are found in the given typecache.
remove_opacity_source
Proc to remove movable sources of opacity on the turf and let it handle lighting code.
replace_baseturf
Replaces all instances of needle_type in baseturfs with replacement_type
stack_ontop_of_baseturf
Places a baseturf ontop of a searched for baseturf.
toShuttleMove
Called from the new turf before anything has been moved Only gets called if fromShuttleMove returns true first returns the new move_mode (based on the old)
transfer_area_lighting
Transfer the lighting of one area to another
wash
Called when this turf is being washed. Washing a turf will also wash any mopable floor decals
zFall
Precipitates a movable (plus whatever buckled to it) to lower z levels if possible and then calls zImpact()
zImpact
Called each time the target falls down a z level possibly making their trajectory come to a halt. see __DEFINES/movement.dm.