turf 
Vars | |
always_lit | Bool, whether this turf will always be illuminated no matter what area it is in |
---|---|
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 |
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) |
lighting_object | Our lighting object. |
opacity_sources | Lazylist of movable atoms providing opacity sources. |
oxygen | Properties for open tiles (/floor) All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system. |
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 |
real_layer | Set if the turf should appear on a different layer while in-game and map editing, otherwise use normal layer. |
slowdown | negative for faster, positive for slower |
transparent_floor | It's a check that determines if the turf is transparent to reveal the stuff(pipes, safe, cables and e.t.c.) without looking on intact |
turf_flags | Turf bitflags, see code/__DEFINES/flags.dm |
Procs | |
Adjacent | Adjacency (to turf): |
AdjacentTurfs | Returns the adjacent turfs. Can check for density or cardinal directions only instead of all 8, or just dense turfs entirely. dense_only takes precedence over open_only. |
ClickCross | This checks if you there is uninterrupted airspace between that turf and this one. This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW or LETPASSCLICKS. The border_only flag allows you to not objects (for source and destination squares) |
Initialize_Atmos | Initializes our adjacent turfs. If you want to avoid this, do not override it, instead set init_air to FALSE |
LinkBlockedWithAccess | For seeing if we can actually move between 2 given turfs while accounting for our access and the requester's pass_flags |
_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 |
add_opacity_source | Proc to add movable sources of opacity on the turf and let it handle lighting code. |
defile | Defiling atoms. |
is_blocked_turf | Check whether the specified turf is blocked by something dense inside it with respect to a specific atom. |
photograph | Makes an image of up to 20 things on a turf + the turf. |
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_opacity_source | Proc to remove movable sources of opacity on the turf and let it handle lighting code. |
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. |
zPassIn | If we'd allow anything to travel into us |
zPassOut | If we'd allow anything to travel out of us |
Var Details
always_lit 
Bool, whether this turf will always be illuminated no matter what area it is in
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
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)
lighting_object 
Our lighting object.
opacity_sources 
Lazylist of movable atoms providing opacity sources.
oxygen 
Properties for open tiles (/floor) All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system.
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
real_layer 
Set if the turf should appear on a different layer while in-game and map editing, otherwise use normal layer.
slowdown 
negative for faster, positive for slower
transparent_floor 
It's a check that determines if the turf is transparent to reveal the stuff(pipes, safe, cables and e.t.c.) without looking on intact
turf_flags 
Turf bitflags, see code/__DEFINES/flags.dm
Proc Details
Adjacent
Adjacency (to turf):
- If you are in the same turf, always true
- If you are vertically/horizontally adjacent, ensure there are no border objects
- If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
- Passing through in this case ignores anything with the LETPASSTHROW flag, such as tables, racks, and morgue trays.
AdjacentTurfs
Returns the adjacent turfs. Can check for density or cardinal directions only instead of all 8, or just dense turfs entirely. dense_only takes precedence over open_only.
ClickCross
This checks if you there is uninterrupted airspace between that turf and this one. This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW or LETPASSCLICKS. The border_only flag allows you to not objects (for source and destination squares)
Initialize_Atmos
Initializes our adjacent turfs. If you want to avoid this, do not override it, instead set init_air to FALSE
LinkBlockedWithAccess
For seeing if we can actually move between 2 given turfs while accounting for our access and the requester'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 pathing, so it'd better be fast
Arguments:
- destination_turf - Where are we going from where we are?
- pass_info - Holds all the info about what this path attempt can go through
_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
add_opacity_source
Proc to add movable sources of opacity on the turf and let it handle lighting code.
defile
Defiling atoms.
is_blocked_turf
Check whether the specified turf is blocked by something dense inside it with respect to a specific atom.
Returns TRUE
if the turf is blocked because the turf itself is dense.
Returns TRUE
if one of the turf's contents is dense and would block a source atom's movement.
Returns FALSE
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. Also if source atom is in turf contents proc will check if it can exit.
- 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
photograph
Makes an image of up to 20 things on a turf + the turf.
reachableAdjacentTurfs
Returns adjacent turfs to this turf that are reachable, in all cardinal directions
Arguments:
- requester: 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
recalculate_directional_opacity
Calculate on which directions this turfs block view.
remove_opacity_source
Proc to remove movable sources of opacity on the turf and let it handle lighting code.
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.
zPassIn
If we'd allow anything to travel into us
zPassOut
If we'd allow anything to travel out of us