turf
Any floor or wall. What makes up the station and the rest of the map. If present, a turf above that is copying this turf. Implies a Z-connection and that the turf above is a z-mimic enabled turf. If present, the turf below that we are copying. Implies a Z-connection and that this is a z-mimic enabled turf. If we're a non-overwrite z-turf, this holds the appearance of the bottom-most Z-turf in the z-stack. Object used to multiply color of all OO overlays at once. If this is a delegate (non-overwrite) Z-turf with a z-turf above, this is the delegate copy that's copying us. If we're at the bottom of the stack, a proxy used to fake a below space turf. Cached computed depth, used in analyzer.
Vars | |
air | The local gas mixture of this turf. Use return_air(). This will always exist even if not in use, because GCing air contents would be too expensive. |
---|---|
always_lit | Bool, whether this turf will always be illuminated no matter what area it is in |
ao_junction | What directions this is currently smoothing with. This starts as null for us to know when it's first set, but after that it will hold a 8-bit mask ranging from 0 to 255. |
ao_junction_mimic | The same as ao_junction, but for the mimic turf. |
ao_overlay | Current ambient occlusion overlays. Tracked here so that they can be reapplied during update_overlays() |
ao_overlay_mimic | The same as ao_overlay, but for the mimic turf. |
ao_queued | Whether this turf is currently queued for ambient occlusion. |
assigned_oranges_ear | what /mob/oranges_ear instance is already assigned to us as there should only ever be one. used for guaranteeing there is only one oranges_ear per turf when assigned, speeds up view() iteration |
atmos_sensitive_contents | Atmos sensitive atoms in our contents. lazylist. |
blocks_air | Determines how air interacts with this turf. |
blueprint_data | For the station blueprints, images of objects eg: pipes |
changing_turf | Is this turf in the process of running ChangeTurf()? |
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. |
explosion_throw_details | Contains the throw range for explosions. You won't need this, stop looking at it. |
force_no_gravity | whether or not this turf forces movables on it to have no gravity (unless they themselves have forced gravity) |
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 |
initial_gas | A gas_mixture gas list to be used as the initial value. Ex: list(GAS_OXYGEN = 50) |
lighting_corner_NE | Lighting Corner datums. |
lighting_object | Our lighting object. |
lighting_uses_jen | Set to TRUE for pseudo 3/4ths walls, otherwise, leave alone. |
max_fire_temperature_sustained | The max temperature of the fire which it was subjected to |
needs_air_update | Does this turf need to be ran through SSzas? (SSzas.mark_for_update(turf) OR turf.zas_update_loc()) |
opacity_sources | Lazylist of movable atoms providing opacity sources. |
open_directions | All directions in which a turf that can contain air is present. |
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 |
permit_ao | Whether this turf is allowed to have ambient occlusion. If FALSE, this turf will not be considered for ambient occlusion. |
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*. |
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. |
z_eventually_space | If this Z-turf leads to space, uninterrupted. |
z_flags | Can atmos pass down through this turf? |
z_queued | How many times this turf is currently queued - multiple queue occurrences are allowed to ensure update consistency. |
zone | The turf's current zone parent. |
Procs | |
AdjacentQuick | Quick adjacency (to turf): If you are in the same turf, always true If you are not adjacent, then false |
Enter | Test if a movable can enter this turf. Send no_side_effects = TRUE to prevent bumping. |
Initialize | Turf Initialize |
LinkBlockedWithAccess | For seeing if we can actually move between 2 given turfs while accounting for our access and the caller's pass_flags |
PlaceOnBottom | Places the given turf on the bottom of the turf stack. |
ScrapeAway | Take off the top layer turf and replace it with the next baseturf down |
TryGetNonDenseNeighbour | I literally don't know where this proc came from. |
TryScrapeToLattice | Run ScrapeAway(amount), then attempt to place lattice. |
add_opacity_source | Proc to add movable sources of opacity on the turf and let it handle lighting code. |
assume_air | Merges a given gas mixture with the turf's current air source. |
assume_gas | Basically adjustGasWithTemp() but a turf proc. |
atmos_spawn_air | Creates a gas_mixture datum with the given parameters and merges it into the turf's air source. |
can_flock_occupy | A copy of is_blocked_turf(), ignoring flock mobs |
can_safely_remove_from_zone | EXPERIMENTAL Simple heuristic for determining if removing the turf from it's zone will not partition the zone (A very bad thing). |
change_area | Call to move a turf from its current area to a new one |
cleanup_zmimic | Cleans up Z-mimic objects for this turf. You shouldn't call this directly 99% of the time. |
clear_signal_refs | ZAS THINGS NO MORE ZAS THINGS 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 |
contains_dense_objects | Checks a turf to see if any of it's contents are dense. Is NOT recursive. See also is_blocked_turf() |
create_fire | Creates a fire with firelevel (fl). If create_own_fuel is given, it will create that many units of welding fuel on the turf. |
disable_zmimic | Disables Z-mimic for a turf. |
enable_zmimic | Enables Z-mimic for a turf that didn't already have it enabled. |
expose_reagents | Handles exposing a turf to reagents. |
fromShuttleMove | Base procs |
get_atmos_adjacent_turfs | Returns a list of adjacent turfs that can contain air. Returns null if none. |
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 |
make_air | Initializes the turf's "air" datum to it's initial values. |
on_change_area | Allows for reactions to an area change without inherently requiring change_area() be called (I hate maploading) |
post_update_air_properties | The air mobility of src >> target The air mobility of target >> src |
reachableAdjacentTurfs | Returns adjacent turfs to this turf that are reachable, in all cardinal directions |
recalculate_directional_opacity | Calculate on which directions this turfs block view. |
remove_air | Wrapper for [/datum/gas_mixture/proc/remove()] |
remove_opacity_source | Proc to remove movable sources of opacity on the turf and let it handle lighting code. |
return_air | Return the currently used gas_mixture datum. |
setup_zmimic | Sets up Z-mimic for this turf. You shouldn't call this directly 99% of the time. |
take_zone_air_share | Copies this turf's group share from the zone. Usually used before removing it from the zone. |
transfer_area_lighting | Transfer the lighting of one area to another |
unsafe_return_air | Return the currently used gas_mixture datum. DOES NOT MARK ZONE FOR UPDATE. |
update_air_properties | Updates the turf's air source properties, breaking or creating zone connections as necessary. |
update_underfloor_accessibility | Sets underfloor accessibility |
wash | Called when this turf is being washed. Washing a turf will also wash any mopable floor decals |
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
air
The local gas mixture of this turf. Use return_air(). This will always exist even if not in use, because GCing air contents would be too expensive.
always_lit
Bool, whether this turf will always be illuminated no matter what area it is in
ao_junction
What directions this is currently smoothing with. This starts as null for us to know when it's first set, but after that it will hold a 8-bit mask ranging from 0 to 255.
IMPORTANT: This uses the smoothing direction flags as defined in icon_smoothing.dm, instead of the BYOND flags.
ao_junction_mimic
The same as ao_junction, but for the mimic turf.
ao_overlay
Current ambient occlusion overlays. Tracked here so that they can be reapplied during update_overlays()
ao_overlay_mimic
The same as ao_overlay, but for the mimic turf.
ao_queued
Whether this turf is currently queued for ambient occlusion.
assigned_oranges_ear
what /mob/oranges_ear instance is already assigned to us as there should only ever be one. used for guaranteeing there is only one oranges_ear per turf when assigned, speeds up view() iteration
atmos_sensitive_contents
Atmos sensitive atoms in our contents. lazylist.
blocks_air
Determines how air interacts with this turf.
blueprint_data
For the station blueprints, images of objects eg: pipes
changing_turf
Is this turf in the process of running ChangeTurf()?
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.
explosion_throw_details
Contains the throw range for explosions. You won't need this, stop looking at it.
force_no_gravity
whether or not this turf forces movables on it to have no gravity (unless they themselves have forced gravity)
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
initial_gas
A gas_mixture gas list to be used as the initial value. Ex: list(GAS_OXYGEN = 50)
lighting_corner_NE
Lighting Corner datums.
lighting_object
Our lighting object.
lighting_uses_jen
Set to TRUE for pseudo 3/4ths walls, otherwise, leave alone.
max_fire_temperature_sustained
The max temperature of the fire which it was subjected to
needs_air_update
Does this turf need to be ran through SSzas? (SSzas.mark_for_update(turf) OR turf.zas_update_loc())
opacity_sources
Lazylist of movable atoms providing opacity sources.
open_directions
All directions in which a turf that can contain air is present.
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
permit_ao
Whether this turf is allowed to have ambient occlusion. If FALSE, this turf will not be considered for ambient occlusion.
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*.
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.
z_eventually_space
If this Z-turf leads to space, uninterrupted.
z_flags
Can atmos pass down through this turf?
z_queued
How many times this turf is currently queued - multiple queue occurrences are allowed to ensure update consistency.
zone
The turf's current zone parent.
Proc Details
AdjacentQuick
Quick adjacency (to turf): If you are in the same turf, always true If you are not adjacent, then false
Enter
Test if a movable can enter this turf. Send no_side_effects = TRUE to prevent bumping.
Initialize
Turf Initialize
Doesn't call parent, see /atom/proc/Initialize Please note, space tiles do not run this code. This is done because it's called so often that any extra code just slows things down too much If you add something relevant here add it there too /turf/open/space/Initialize /turf/closed/mineral/Initialize
LinkBlockedWithAccess
For seeing if we can actually move between 2 given turfs while accounting for our access and the caller's pass_flags
Assumes destinantion turf is non-dense - check and shortcircuit in code invoking this proc to avoid overhead. Makes some other assumptions, such as assuming that unless declared, non dense objects will not block movement. It's fragile, but this is VERY much the most expensive part of JPS, so it'd better be fast
Arguments:
- caller: The movable, if one exists, being used for mobility checks to see what tiles it can reach
- access: A list that decides if we can gain access to doors that would otherwise block a turf
- simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space?
- no_id: When true, doors with public access will count as impassible
PlaceOnBottom
Places the given turf on the bottom of the turf stack.
ScrapeAway
Take off the top layer turf and replace it with the next baseturf down
TryGetNonDenseNeighbour
I literally don't know where this proc came from.
TryScrapeToLattice
Run ScrapeAway(amount), then attempt to place lattice.
add_opacity_source
Proc to add movable sources of opacity on the turf and let it handle lighting code.
assume_air
Merges a given gas mixture with the turf's current air source.
assume_gas
Basically adjustGasWithTemp() but a turf proc.
atmos_spawn_air
Creates a gas_mixture datum with the given parameters and merges it into the turf's air source.
can_flock_occupy
A copy of is_blocked_turf(), ignoring flock mobs
can_safely_remove_from_zone
EXPERIMENTAL Simple heuristic for determining if removing the turf from it's zone will not partition the zone (A very bad thing).
change_area
Call to move a turf from its current area to a new one
cleanup_zmimic
Cleans up Z-mimic objects for this turf. You shouldn't call this directly 99% of the time.
clear_signal_refs
ZAS THINGS NO MORE ZAS THINGS 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
contains_dense_objects
Checks a turf to see if any of it's contents are dense. Is NOT recursive. See also is_blocked_turf()
create_fire
Creates a fire with firelevel (fl). If create_own_fuel is given, it will create that many units of welding fuel on the turf.
disable_zmimic
Disables Z-mimic for a turf.
enable_zmimic
Enables Z-mimic for a turf that didn't already have it enabled.
expose_reagents
Handles exposing a turf to reagents.
fromShuttleMove
Base procs
get_atmos_adjacent_turfs
Returns a list of adjacent turfs that can contain air. Returns null if none.
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.
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
make_air
Initializes the turf's "air" datum to it's initial values.
on_change_area
Allows for reactions to an area change without inherently requiring change_area() be called (I hate maploading)
post_update_air_properties
The air mobility of src >> target The air mobility of target >> src
reachableAdjacentTurfs
Returns adjacent turfs to this turf that are reachable, in all cardinal directions
Arguments:
- caller: The movable, if one exists, being used for mobility checks to see what tiles it can reach
- ID: An ID card that decides if we can gain access to doors that would otherwise block a turf
- simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space?
- no_id: When true, doors with public access will count as impassible
recalculate_directional_opacity
Calculate on which directions this turfs block view.
remove_air
Wrapper for [/datum/gas_mixture/proc/remove()]
remove_opacity_source
Proc to remove movable sources of opacity on the turf and let it handle lighting code.
return_air
Return the currently used gas_mixture datum.
setup_zmimic
Sets up Z-mimic for this turf. You shouldn't call this directly 99% of the time.
take_zone_air_share
Copies this turf's group share from the zone. Usually used before removing it from the zone.
transfer_area_lighting
Transfer the lighting of one area to another
unsafe_return_air
Return the currently used gas_mixture datum. DOES NOT MARK ZONE FOR UPDATE.
update_air_properties
Updates the turf's air source properties, breaking or creating zone connections as necessary.
update_underfloor_accessibility
Sets underfloor accessibility
wash
Called when this turf is being washed. Washing a turf will also wash any mopable floor decals
zImpact
Called each time the target falls down a z level possibly making their trajectory come to a halt. see __DEFINES/movement.dm.