/tg/ Station 13 - Modules - TypesVar Details - Proc Details

atmospherics

Vars

can_unwrenchCheck if the object can be unwrenched
construction_typeThe path of the pipe/device that will spawn after unwrenching it (such as pipe fittings)
device_typeThe type of the device (UNARY, BINARY, TRINARY, QUATERNARY)
hideThis only works on pipes, because they have 1000 subtypes wich need to be visible and invisible under tiles, so we track this here
initialize_directionsBitflag of the initialized directions (NORTH | SOUTH | EAST | WEST)
nodesThe lists of nodes that a pipe/device has, depends on the device_type var (from 1 to 4)
onCheck if the device should be on or off (mostly used in processing for machines)
paintableWhether it can be painted
pipe_colorThe color of the pipe
pipe_flagsThe flags of the pipe/component (PIPING_ALL_LAYER | PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY | PIPING_CARDINAL_AUTONORMALIZE)
pipe_stateicon_state as a pipe item
pipe_vision_imgThe image of the pipe/device used for ventcrawling
piping_layerWhat layer the pipe is in (from 1 to 5, default 3)
rebuildingIs the thing being rebuilt by SSair or not. Prevents list bloat
vent_movementThe bitflag that's being checked on ventcrawling. Default is to allow ventcrawling and seeing pipes.

Procs

GetInitDirectionsGetter of initial directions
SetInitDirectionsSet the initial directions of the device (NORTH || SOUTH || EAST || WEST), called on New()
atmosinitInitialize for atmos devices
can_be_nodeCheck if a node can actually exists by connecting to another machine called on atmosinit() Arguments:
can_see_pipesUsed for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
can_unwrenchGetter for can_unwrench
check_connectable_colorcheck if the color are the same on both sides or if one of the pipes are grey or have the PIPING_ALL_COLORS flag returns TRUE if one of the parameters is TRUE Arguments:
check_connectable_layercheck if the piping layer are the same on both sides or one of them has the PIPING_ALL_LAYER flag returns TRUE if one of the parameters is TRUE called by isConnectable() Arguments:
check_init_directionscheck if the initialized direction are the same on both sides (or if is a multiz adapter) returns TRUE or FALSE if the connection is possible or not Arguments:
connection_checkCheck the connection between two nodes
deconstructPipe deconstruction
destroy_networkCalled by the machinery disconnect(), custom for each type
disconnectDisconnects the nodes
findConnectingFind a connecting /obj/machinery/atmospherics in specified direction, called by relaymove() used by ventcrawling mobs to check if they can move inside a pipe in a specific direction Arguments:
getNodeConnectsGetter for node_connects
get_rebuild_targetsReturns a list of new pipelines that need to be built up
getpipeimageGetter for piping layer shifted, pipe colored overlays
isConnectablecheck if the piping layer and color are the same on both sides (grey can connect to all colors) returns TRUE or FALSE if the connection is possible or not Arguments:
normalize_cardinal_directionsSetter for device direction
nullifyNodeCalled on destroy(mostly deconstruction) and when moving nodes around, disconnect the nodes from the network Arguments:
paintCalled by the RPD.dm pre_attack(), overriden by pipes.dm Arguments:
pipeline_expansionCalled on construction and when expanding the datum_pipeline, returns the nodes of the device
rebuild_pipesThis should only be called by SSair as part of the rebuild queue. Handles rebuilding pipelines after init or they've been changed.
replacePipenetSimilar to setPipenet() but instead of setting a network to a pipeline, it replaces the old pipeline with a new one, called by Merge() in datum_pipeline.dm
returnPipenetCalled by addMember() in datum_pipeline.dm, returns the parent network the device is connected to
returnPipenetAirsCalled by addMachineryMember() in datum_pipeline.dm, returns a list of gas_mixtures and assigns them into other_airs (by addMachineryMember) to allow pressure redistribution for the machineries.
returnPipenetsGetter of a list of pipenets
setPipenetCalled by build_pipeline() and addMember() in datum_pipeline.dm, set the network the device is connected to, to the datum pipeline it has reference
setPipingLayersetter for pipe layers
shuttleRotateMachine rotate procs
unsafe_pressure_releasePipe pressure release calculations
update_layerUpdate the layer in which the pipe/device is in, that way pipes have consistent layer depending on piping_layer

Var Details

can_unwrench

Check if the object can be unwrenched

construction_type

The path of the pipe/device that will spawn after unwrenching it (such as pipe fittings)

device_type

The type of the device (UNARY, BINARY, TRINARY, QUATERNARY)

hide

This only works on pipes, because they have 1000 subtypes wich need to be visible and invisible under tiles, so we track this here

initialize_directions

Bitflag of the initialized directions (NORTH | SOUTH | EAST | WEST)

nodes

The lists of nodes that a pipe/device has, depends on the device_type var (from 1 to 4)

on

Check if the device should be on or off (mostly used in processing for machines)

paintable

Whether it can be painted

pipe_color

The color of the pipe

pipe_flags

The flags of the pipe/component (PIPING_ALL_LAYER | PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY | PIPING_CARDINAL_AUTONORMALIZE)

pipe_state

icon_state as a pipe item

pipe_vision_img

The image of the pipe/device used for ventcrawling

piping_layer

What layer the pipe is in (from 1 to 5, default 3)

rebuilding

Is the thing being rebuilt by SSair or not. Prevents list bloat

vent_movement

The bitflag that's being checked on ventcrawling. Default is to allow ventcrawling and seeing pipes.

Proc Details

GetInitDirections

Getter of initial directions

SetInitDirections

Set the initial directions of the device (NORTH || SOUTH || EAST || WEST), called on New()

atmosinit

Initialize for atmos devices

initialize the nodes for each pipe/device, this is called just after the air controller sets up turfs Arguments:

can_be_node

Check if a node can actually exists by connecting to another machine called on atmosinit() Arguments:

can_see_pipes

Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.

can_unwrench

Getter for can_unwrench

Called by wrench_act() to check if the device can be unwrenched, each device override this with custom code (like if on/operating can't unwrench) Arguments:

check_connectable_color

check if the color are the same on both sides or if one of the pipes are grey or have the PIPING_ALL_COLORS flag returns TRUE if one of the parameters is TRUE Arguments:

check_connectable_layer

check if the piping layer are the same on both sides or one of them has the PIPING_ALL_LAYER flag returns TRUE if one of the parameters is TRUE called by isConnectable() Arguments:

check_init_directions

check if the initialized direction are the same on both sides (or if is a multiz adapter) returns TRUE or FALSE if the connection is possible or not Arguments:

connection_check

Check the connection between two nodes

Check if our machine and the target machine are connectable by both calling isConnectable and by checking that the directions and piping_layer are compatible called by can_be_node() (for building a network) and findConnecting() (for ventcrawling) Arguments:

deconstruct

Pipe deconstruction

Called by wrench_act(), create a pipe fitting and remove the pipe

destroy_network

Called by the machinery disconnect(), custom for each type

disconnect

Disconnects the nodes

Called by nullifyNode(), it disconnects two nodes by removing the reference id from the node itself that called this proc Arguments:

findConnecting

Find a connecting /obj/machinery/atmospherics in specified direction, called by relaymove() used by ventcrawling mobs to check if they can move inside a pipe in a specific direction Arguments:

getNodeConnects

Getter for node_connects

Return a list of the nodes that can connect to other machines, get called by atmosinit()

get_rebuild_targets

Returns a list of new pipelines that need to be built up

getpipeimage

Getter for piping layer shifted, pipe colored overlays

Creates the image for the pipe underlay that all components use, called by get_pipe_underlay() in components_base.dm Arguments:

isConnectable

check if the piping layer and color are the same on both sides (grey can connect to all colors) returns TRUE or FALSE if the connection is possible or not Arguments:

normalize_cardinal_directions

Setter for device direction

Set the direction to either SOUTH or WEST if the pipe_flag is set to PIPING_CARDINAL_AUTONORMALIZE, called in New(), used mostly by layer manifolds

nullifyNode

Called on destroy(mostly deconstruction) and when moving nodes around, disconnect the nodes from the network Arguments:

paint

Called by the RPD.dm pre_attack(), overriden by pipes.dm Arguments:

pipeline_expansion

Called on construction and when expanding the datum_pipeline, returns the nodes of the device

rebuild_pipes

This should only be called by SSair as part of the rebuild queue. Handles rebuilding pipelines after init or they've been changed.

replacePipenet

Similar to setPipenet() but instead of setting a network to a pipeline, it replaces the old pipeline with a new one, called by Merge() in datum_pipeline.dm

returnPipenet

Called by addMember() in datum_pipeline.dm, returns the parent network the device is connected to

returnPipenetAirs

Called by addMachineryMember() in datum_pipeline.dm, returns a list of gas_mixtures and assigns them into other_airs (by addMachineryMember) to allow pressure redistribution for the machineries.

returnPipenets

Getter of a list of pipenets

called in relaymove() to create the image for vent crawling

setPipenet

Called by build_pipeline() and addMember() in datum_pipeline.dm, set the network the device is connected to, to the datum pipeline it has reference

setPipingLayer

setter for pipe layers

Set the layer of the pipe that the device has to a new_layer Arguments:

shuttleRotate

Machine rotate procs

unsafe_pressure_release

Pipe pressure release calculations

Throws the user when they unwrench a pipe with a major difference between the internal and environmental pressure. Called by wrench_act() before deconstruct() Arguments:

update_layer

Update the layer in which the pipe/device is in, that way pipes have consistent layer depending on piping_layer