duct ![code/modules/plumbing/ducts.dm 6](git.png)
Vars | |
active | wheter to even bother with plumbing code or not |
---|---|
capacity | amount we can transfer per process. note that the ductnet can carry as much as the lowest capacity duct |
color_to_color_support | TRUE to let colors connect when forced with a wrench, false to just not do that at all |
connects | bitfield with the directions we're connected in |
drop_on_wrench | wheter we just unanchored or drop whatever is in the variable. either is safe |
duct | our ductnet, wich tracks what we're connected to |
duct_color | the color of our duct |
duct_layer | 1,2,4,8,16 |
dumb | set to TRUE to disable smart duct behaviour |
ignore_colors | TRUE to ignore colors, so yeah we also connect with other colors without issue |
lock_connects | wheter we allow our connects to be changed after initialization or not |
lock_layers | whether we allow our layers to be altered |
neighbours | track ducts we're connected to. Mainly for ducts we connect to that we normally wouldn't, like different layers and colors, for when we regenerate the ducts |
Procs | |
add_connects | add a connect direction |
add_neighbour | add a duct as neighbour. this means we're connected and will connect again if we ever regenerate |
attempt_connect | start looking around us for stuff to connect to |
can_anchor | collection of all the sanity checks to prevent us from stacking ducts that shouldn't be stacked |
connect_duct | connect to a duct |
connect_network | see if whatever we found can be connected to |
connect_plumber | connect to a plumbing object |
create_duct | create a new duct datum |
disconnect_duct | we disconnect ourself from our neighbours. we also destroy our ductnet and tell our neighbours to make a new one |
generate_connects | Special proc to draw a new connect frame based on neighbours. not the norm so we can support multiple duct kinds |
get_adjacent_ducts | get a list of the ducts we can connect to if we are dumb |
handle_layer | update the layer we are on |
lose_neighbours | remove all our neighbours, and remove us from our neighbours aswell |
reconnect | ''''''''''''''''optimized''''''''''''''''' proc for quickly reconnecting after a duct net was destroyed |
remove_connects | remove a connect direction |
reset_connects | remove our connects |
Var Details
active ![code/modules/plumbing/ducts.dm 33](git.png)
wheter to even bother with plumbing code or not
capacity ![code/modules/plumbing/ducts.dm 20](git.png)
amount we can transfer per process. note that the ductnet can carry as much as the lowest capacity duct
color_to_color_support ![code/modules/plumbing/ducts.dm 31](git.png)
TRUE to let colors connect when forced with a wrench, false to just not do that at all
connects ![code/modules/plumbing/ducts.dm 12](git.png)
bitfield with the directions we're connected in
drop_on_wrench ![code/modules/plumbing/ducts.dm 37](git.png)
wheter we just unanchored or drop whatever is in the variable. either is safe
duct ![code/modules/plumbing/ducts.dm 18](git.png)
our ductnet, wich tracks what we're connected to
duct_color ![code/modules/plumbing/ducts.dm 23](git.png)
the color of our duct
duct_layer ![code/modules/plumbing/ducts.dm 27](git.png)
1,2,4,8,16
dumb ![code/modules/plumbing/ducts.dm 14](git.png)
set to TRUE to disable smart duct behaviour
ignore_colors ![code/modules/plumbing/ducts.dm 25](git.png)
TRUE to ignore colors, so yeah we also connect with other colors without issue
lock_connects ![code/modules/plumbing/ducts.dm 16](git.png)
wheter we allow our connects to be changed after initialization or not
lock_layers ![code/modules/plumbing/ducts.dm 29](git.png)
whether we allow our layers to be altered
neighbours ![code/modules/plumbing/ducts.dm 35](git.png)
track ducts we're connected to. Mainly for ducts we connect to that we normally wouldn't, like different layers and colors, for when we regenerate the ducts
Proc Details
add_connects
add a connect direction
add_neighbour
add a duct as neighbour. this means we're connected and will connect again if we ever regenerate
attempt_connect
start looking around us for stuff to connect to
can_anchor
collection of all the sanity checks to prevent us from stacking ducts that shouldn't be stacked
connect_duct
connect to a duct
connect_network
see if whatever we found can be connected to
connect_plumber
connect to a plumbing object
create_duct
create a new duct datum
disconnect_duct
we disconnect ourself from our neighbours. we also destroy our ductnet and tell our neighbours to make a new one
generate_connects
Special proc to draw a new connect frame based on neighbours. not the norm so we can support multiple duct kinds
get_adjacent_ducts
get a list of the ducts we can connect to if we are dumb
handle_layer
update the layer we are on
lose_neighbours
remove all our neighbours, and remove us from our neighbours aswell
reconnect
''''''''''''''''optimized''''''''''''''''' proc for quickly reconnecting after a duct net was destroyed
remove_connects
remove a connect direction
reset_connects
remove our connects