Files
vgstation13/code/ATMOSPHERICS/components/unary/unary_base.dm
Ren Erthilo e9a8bf4df8 TG: Changes to layering of underfloor stuff:
- Disposal pipes are on layer 2.3
- Pipes and manifolds are on layer 2.4
- Cables are on layer 2.44
- Unary atmospherics stuff (vent pumps, scrubbers) are on layer 2.45
- Nav beacons, bluespace beacons and such things are on layer 2.5
Disposal piping > Pipes > Cables > Vents/scrubbers > Beacons & stuff
Revision: r3097
Author: 	 baloh.matevz
2012-04-22 20:09:46 +01:00

88 lines
1.7 KiB
Plaintext

/obj/machinery/atmospherics/unary
dir = SOUTH
initialize_directions = SOUTH
layer = TURF_LAYER+0.1
var/datum/gas_mixture/air_contents
var/obj/machinery/atmospherics/node
var/datum/pipe_network/network
New()
..()
initialize_directions = dir
air_contents = new
air_contents.volume = 200
// Housekeeping and pipe network stuff below
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node)
network = new_network
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
return null
Del()
loc = null
if(node)
node.disconnect(src)
del(network)
node = null
..()
initialize()
if(node) return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
build_network()
if(!network && node)
network = new /datum/pipe_network()
network.normal_members += src
network.build_network(node, src)
return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node)
return network
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network == old_network)
network = new_network
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network == reference)
results += air_contents
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node)
del(network)
node = null
return null