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

plumbing

Vars

activeFALSE to pretty much just not exist in the plumbing world so we can be moved, TRUE to go plumbo mode
demand_colorWhat color is our demand connect?
demand_connectsdirection in wich we act as a demander
ducting_layerThe layer on which we connect. Don't add multiple. If you want multiple layer connects for some reason you can just add multiple components with different layers
ductsIndex with "1" = /datum/ductnet/theductpointingnorth etc. "1" being the num2text from NORTH define
extend_pipe_to_edgeExtend the pipe to the edge for wall-mounted plumbed devices, like sinks and showers
reagentsshortcut to our parents' reagent holder
recipient_reagents_holderIn-case we don't want the main machine to get the reagents, but perhaps whoever is buckled to it
supply_colorWhat color is our supply connect?
supply_connectsdirections in wich we act as a supplier
tile_coveredWhether our tile is covered and we should hide our ducts
turn_connectsif TRUE connects will spin with the parent object visually and codually, so you can have it work in any direction. FALSE if you want it to be static
use_overlaysTRUE if we wanna add proper pipe overlays under our parent object. this is pretty good if i may so so myself

Procs

Initializeturn_connects is for wheter or not we spin with the object to change our pipes
can_addCan we be added to the ductnet?
can_givereturns TRUE when they can give the specified amount and reagent. called by process request
create_overlaysWe create our luxurious piping overlays/underlays, to indicate where we do what. only called once if use_overlays = TRUE in Initialize()
disablewe stop acting like a plumbing thing and disconnect if we are, so we can safely be moved and stuff
enablesettle wherever we are, and start behaving like a piece of plumbing
get_original_directionGive the direction of a pipe, and it'll return wich direction it originally was when its object pointed SOUTH
on_parent_dir_changeCalled when the dir changes. Need to adjust positioning of pipes.
process_requestcheck who can give us what we want, and how many each of them will give us
send_requestcalled from in process(). only calls process_request(), but can be overwritten for children with special behaviour
toggle_activeToggle our machinery on or off. This is called by a hook from default_unfasten_wrench with anchored as only param, so we dont have to copypaste this on every object that can move
transfer_tothis is where the reagent is actually transferred and is thus the finish point of our process()
update_dirWe update our connects only when we settle down by taking our current and original direction to find our new connects If someone wants it to fucking spin while connected to something go actually knock yourself out

Var Details

active

FALSE to pretty much just not exist in the plumbing world so we can be moved, TRUE to go plumbo mode

demand_color

What color is our demand connect?

demand_connects

direction in wich we act as a demander

ducting_layer

The layer on which we connect. Don't add multiple. If you want multiple layer connects for some reason you can just add multiple components with different layers

ducts

Index with "1" = /datum/ductnet/theductpointingnorth etc. "1" being the num2text from NORTH define

extend_pipe_to_edge

Extend the pipe to the edge for wall-mounted plumbed devices, like sinks and showers

reagents

shortcut to our parents' reagent holder

recipient_reagents_holder

In-case we don't want the main machine to get the reagents, but perhaps whoever is buckled to it

supply_color

What color is our supply connect?

supply_connects

directions in wich we act as a supplier

tile_covered

Whether our tile is covered and we should hide our ducts

turn_connects

if TRUE connects will spin with the parent object visually and codually, so you can have it work in any direction. FALSE if you want it to be static

use_overlays

TRUE if we wanna add proper pipe overlays under our parent object. this is pretty good if i may so so myself

Proc Details

Initialize

turn_connects is for wheter or not we spin with the object to change our pipes

can_add

Can we be added to the ductnet?

can_give

returns TRUE when they can give the specified amount and reagent. called by process request

create_overlays

We create our luxurious piping overlays/underlays, to indicate where we do what. only called once if use_overlays = TRUE in Initialize()

disable

we stop acting like a plumbing thing and disconnect if we are, so we can safely be moved and stuff

enable

settle wherever we are, and start behaving like a piece of plumbing

get_original_direction

Give the direction of a pipe, and it'll return wich direction it originally was when its object pointed SOUTH

on_parent_dir_change

Called when the dir changes. Need to adjust positioning of pipes.

process_request

check who can give us what we want, and how many each of them will give us

send_request

called from in process(). only calls process_request(), but can be overwritten for children with special behaviour

toggle_active

Toggle our machinery on or off. This is called by a hook from default_unfasten_wrench with anchored as only param, so we dont have to copypaste this on every object that can move

transfer_to

this is where the reagent is actually transferred and is thus the finish point of our process()

update_dir

We update our connects only when we settle down by taking our current and original direction to find our new connects If someone wants it to fucking spin while connected to something go actually knock yourself out