Shiptest 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_connectsdirection in wich we act as a demander
ductsIndex with "1" = /datum/ductnet/theductpointingnorth etc. "1" being the num2text from NORTH define
reagentsshortcut to our parents' reagent holder
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

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 it's object pointed SOUTH
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_connects

direction in wich we act as a demander

ducts

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

reagents

shortcut to our parents' reagent holder

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

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 it's object pointed SOUTH

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