removes silly garbage defines
This commit is contained in:
committed by
CitadelStationBot
parent
d5708c981a
commit
0f2fd05e87
@@ -123,38 +123,12 @@
|
|||||||
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
|
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
|
||||||
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
|
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
|
||||||
|
|
||||||
//used for device_type vars; used by DEVICE_TYPE_LOOP
|
//used for device_type vars
|
||||||
#define UNARY 1
|
#define UNARY 1
|
||||||
#define BINARY 2
|
#define BINARY 2
|
||||||
#define TRINARY 3
|
#define TRINARY 3
|
||||||
#define QUATERNARY 4
|
#define QUATERNARY 4
|
||||||
|
|
||||||
//TODO: finally remove this bullshit
|
|
||||||
//this is the standard for loop used by all sorts of atmos machinery procs
|
|
||||||
#define DEVICE_TYPE_LOOP var/I in 1 to device_type
|
|
||||||
|
|
||||||
//defines for the various machinery lists
|
|
||||||
//NODE_I, AIR_I, PARENT_I are used within DEVICE_TYPE_LOOP
|
|
||||||
|
|
||||||
//nodes list - all atmos machinery
|
|
||||||
#define NODE1 nodes[1]
|
|
||||||
#define NODE2 nodes[2]
|
|
||||||
#define NODE3 nodes[3]
|
|
||||||
#define NODE4 nodes[4]
|
|
||||||
#define NODE_I nodes[I]
|
|
||||||
|
|
||||||
//airs list - components only
|
|
||||||
#define AIR1 airs[1]
|
|
||||||
#define AIR2 airs[2]
|
|
||||||
#define AIR3 airs[3]
|
|
||||||
#define AIR_I airs[I]
|
|
||||||
|
|
||||||
//parents list - components only
|
|
||||||
#define PARENT1 parents[1]
|
|
||||||
#define PARENT2 parents[2]
|
|
||||||
#define PARENT3 parents[3]
|
|
||||||
#define PARENT_I parents[I]
|
|
||||||
|
|
||||||
//TANKS
|
//TANKS
|
||||||
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
|
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
|
||||||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
else if(entry_vent)
|
else if(entry_vent)
|
||||||
if(get_dist(src, entry_vent) <= 1)
|
if(get_dist(src, entry_vent) <= 1)
|
||||||
var/list/vents = list()
|
var/list/vents = list()
|
||||||
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
|
var/datum/pipeline/entry_vent_parent = entry_vent.parents[1]
|
||||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||||
vents.Add(temp_vent)
|
vents.Add(temp_vent)
|
||||||
if(!vents.len)
|
if(!vents.len)
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
|
|
||||||
//Manifolds
|
//Manifolds
|
||||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
|
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
|
||||||
if (!pipe.NODE1 || !pipe.NODE2 || !pipe.NODE3)
|
if (!pipe.nodes[1] || !pipe.nodes[2] || !pipe.nodes[3])
|
||||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||||
|
|
||||||
//Pipes
|
//Pipes
|
||||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
|
for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
|
||||||
if (!pipe.NODE1 || !pipe.NODE2)
|
if (!pipe.nodes[1] || !pipe.nodes[2])
|
||||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||||
|
|
||||||
/client/proc/powerdebug()
|
/client/proc/powerdebug()
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ Pipelines + Other Objects -> Pipe network
|
|||||||
SetInitDirections()
|
SetInitDirections()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/Destroy()
|
/obj/machinery/atmospherics/Destroy()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
nullifyNode(I)
|
nullifyNode(i)
|
||||||
|
|
||||||
SSair.atmos_machinery -= src
|
SSair.atmos_machinery -= src
|
||||||
|
|
||||||
@@ -79,22 +79,22 @@ Pipelines + Other Objects -> Pipe network
|
|||||||
// Called to build a network from this node
|
// Called to build a network from this node
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/atmospherics/proc/nullifyNode(I)
|
/obj/machinery/atmospherics/proc/nullifyNode(i)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
var/obj/machinery/atmospherics/N = NODE_I
|
var/obj/machinery/atmospherics/N = nodes[i]
|
||||||
N.disconnect(src)
|
N.disconnect(src)
|
||||||
NODE_I = null
|
nodes[i] = null
|
||||||
|
|
||||||
/obj/machinery/atmospherics/proc/getNodeConnects()
|
/obj/machinery/atmospherics/proc/getNodeConnects()
|
||||||
var/list/node_connects = list()
|
var/list/node_connects = list()
|
||||||
node_connects.len = device_type
|
node_connects.len = device_type
|
||||||
|
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
for(var/D in GLOB.cardinals)
|
for(var/D in GLOB.cardinals)
|
||||||
if(D & GetInitDirections())
|
if(D & GetInitDirections())
|
||||||
if(D in node_connects)
|
if(D in node_connects)
|
||||||
continue
|
continue
|
||||||
node_connects[I] = D
|
node_connects[i] = D
|
||||||
break
|
break
|
||||||
return node_connects
|
return node_connects
|
||||||
|
|
||||||
@@ -109,10 +109,10 @@ Pipelines + Other Objects -> Pipe network
|
|||||||
if(!node_connects) //for pipes where order of nodes doesn't matter
|
if(!node_connects) //for pipes where order of nodes doesn't matter
|
||||||
node_connects = getNodeConnects()
|
node_connects = getNodeConnects()
|
||||||
|
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[I]))
|
for(var/obj/machinery/atmospherics/target in get_step(src,node_connects[i]))
|
||||||
if(can_be_node(target, I))
|
if(can_be_node(target, i))
|
||||||
NODE_I = target
|
nodes[i] = target
|
||||||
break
|
break
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
@@ -171,8 +171,7 @@ Pipelines + Other Objects -> Pipe network
|
|||||||
if(istype(reference, /obj/machinery/atmospherics/pipe))
|
if(istype(reference, /obj/machinery/atmospherics/pipe))
|
||||||
var/obj/machinery/atmospherics/pipe/P = reference
|
var/obj/machinery/atmospherics/pipe/P = reference
|
||||||
P.destroy_network()
|
P.destroy_network()
|
||||||
var/I = nodes.Find(reference)
|
nodes[nodes.Find(reference)] = null
|
||||||
NODE_I = null
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/update_icon()
|
/obj/machinery/atmospherics/update_icon()
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air()
|
/obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air()
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
|
|
||||||
var/output_starting_pressure = air1.return_pressure()
|
var/output_starting_pressure = air1.return_pressure()
|
||||||
var/input_starting_pressure = air2.return_pressure()
|
var/input_starting_pressure = air2.return_pressure()
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ Acts like a normal vent, but has an input AND output.
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
|
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
air1.volume = 1000
|
air1.volume = 1000
|
||||||
air2.volume = 1000
|
air2.volume = 1000
|
||||||
|
|
||||||
@@ -73,8 +73,8 @@ Acts like a normal vent, but has an input AND output.
|
|||||||
|
|
||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
|
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
var/environment_pressure = environment.return_pressure()
|
var/environment_pressure = environment.return_pressure()
|
||||||
@@ -99,7 +99,7 @@ Acts like a normal vent, but has an input AND output.
|
|||||||
loc.assume_air(removed)
|
loc.assume_air(removed)
|
||||||
air_update_turf()
|
air_update_turf()
|
||||||
|
|
||||||
var/datum/pipeline/parent1 = PARENT1
|
var/datum/pipeline/parent1 = parents[1]
|
||||||
parent1.update = 1
|
parent1.update = 1
|
||||||
|
|
||||||
else //external -> output
|
else //external -> output
|
||||||
@@ -122,7 +122,7 @@ Acts like a normal vent, but has an input AND output.
|
|||||||
air2.merge(removed)
|
air2.merge(removed)
|
||||||
air_update_turf()
|
air_update_turf()
|
||||||
|
|
||||||
var/datum/pipeline/parent2 = PARENT2
|
var/datum/pipeline/parent2 = parents[2]
|
||||||
parent2.update = 1
|
parent2.update = 1
|
||||||
|
|
||||||
//Radio remote control
|
//Radio remote control
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ Passive gate is similar to the regular pump except:
|
|||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
|
|
||||||
var/output_starting_pressure = air2.return_pressure()
|
var/output_starting_pressure = air2.return_pressure()
|
||||||
var/input_starting_pressure = air1.return_pressure()
|
var/input_starting_pressure = air1.return_pressure()
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ Thus, the two variables affect pump operation are set in New():
|
|||||||
if(!on || !is_operational())
|
if(!on || !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
|
|
||||||
var/output_starting_pressure = air2.return_pressure()
|
var/output_starting_pressure = air2.return_pressure()
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
|||||||
open = TRUE
|
open = TRUE
|
||||||
update_icon_nopipes()
|
update_icon_nopipes()
|
||||||
update_parents()
|
update_parents()
|
||||||
var/datum/pipeline/parent1 = PARENT1
|
var/datum/pipeline/parent1 = parents[1]
|
||||||
parent1.reconcile_air()
|
parent1.reconcile_air()
|
||||||
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
|
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", INVESTIGATE_ATMOS)
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ Thus, the two variables affect pump operation are set in New():
|
|||||||
if(!on || !is_operational())
|
if(!on || !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
|
|
||||||
// Pump mechanism just won't do anything if the pressure is too high/too low
|
// Pump mechanism just won't do anything if the pressure is too high/too low
|
||||||
|
|
||||||
@@ -151,8 +151,13 @@ Thus, the two variables affect pump operation are set in New():
|
|||||||
on = !on
|
on = !on
|
||||||
|
|
||||||
if("set_transfer_rate" in signal.data)
|
if("set_transfer_rate" in signal.data)
|
||||||
|
<<<<<<< HEAD
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = AIR1
|
||||||
transfer_rate = Clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
transfer_rate = Clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||||
|
=======
|
||||||
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
|
transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||||
|
>>>>>>> 6a7dbaa... removes silly garbage defines (#33621)
|
||||||
|
|
||||||
if(on != old_on)
|
if(on != old_on)
|
||||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ On top of that, now people can add component-speciic procs/vars if they want!
|
|||||||
airs = new(device_type)
|
airs = new(device_type)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
var/datum/gas_mixture/A = new
|
var/datum/gas_mixture/A = new
|
||||||
A.volume = 200
|
A.volume = 200
|
||||||
AIR_I = A
|
airs[i] = A
|
||||||
/*
|
/*
|
||||||
Iconnery
|
Iconnery
|
||||||
*/
|
*/
|
||||||
@@ -42,9 +42,9 @@ Iconnery
|
|||||||
|
|
||||||
var/connected = 0 //Direction bitset
|
var/connected = 0 //Direction bitset
|
||||||
|
|
||||||
for(DEVICE_TYPE_LOOP) //adds intact pieces
|
for(var/i in 1 to device_type) //adds intact pieces
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
connected |= icon_addintact(NODE_I)
|
connected |= icon_addintact(nodes[i])
|
||||||
|
|
||||||
icon_addbroken(connected) //adds broken pieces
|
icon_addbroken(connected) //adds broken pieces
|
||||||
|
|
||||||
@@ -53,52 +53,45 @@ Iconnery
|
|||||||
Pipenet stuff; housekeeping
|
Pipenet stuff; housekeeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/nullifyNode(I)
|
/obj/machinery/atmospherics/components/nullifyNode(i)
|
||||||
..()
|
..()
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
nullifyPipenet(PARENT_I)
|
nullifyPipenet(parents[i])
|
||||||
qdel(AIR_I)
|
QDEL_NULL(airs[i])
|
||||||
AIR_I = null
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/on_construction()
|
/obj/machinery/atmospherics/components/on_construction()
|
||||||
..()
|
..()
|
||||||
update_parents()
|
update_parents()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/build_network()
|
/obj/machinery/atmospherics/components/build_network()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(!PARENT_I)
|
if(!parents[i])
|
||||||
PARENT_I = new /datum/pipeline()
|
parents[i] = new /datum/pipeline()
|
||||||
var/datum/pipeline/P = PARENT_I
|
var/datum/pipeline/P = parents[i]
|
||||||
P.build_pipeline(src)
|
P.build_pipeline(src)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/proc/nullifyPipenet(datum/pipeline/reference)
|
/obj/machinery/atmospherics/components/proc/nullifyPipenet(datum/pipeline/reference)
|
||||||
var/I = parents.Find(reference)
|
var/i = parents.Find(reference)
|
||||||
reference.other_airs -= AIR_I
|
reference.other_airs -= airs[i]
|
||||||
reference.other_atmosmch -= src
|
reference.other_atmosmch -= src
|
||||||
PARENT_I = null
|
parents[i] = null
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/returnPipenetAir(datum/pipeline/reference)
|
/obj/machinery/atmospherics/components/returnPipenetAir(datum/pipeline/reference)
|
||||||
var/I = parents.Find(reference)
|
return airs[parents.Find(reference)]
|
||||||
return AIR_I
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/pipeline_expansion(datum/pipeline/reference)
|
/obj/machinery/atmospherics/components/pipeline_expansion(datum/pipeline/reference)
|
||||||
if(reference)
|
if(reference)
|
||||||
var/I = parents.Find(reference)
|
return list(nodes[parents.Find(reference)])
|
||||||
return list(NODE_I)
|
return ..()
|
||||||
else
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/setPipenet(datum/pipeline/reference, obj/machinery/atmospherics/A)
|
/obj/machinery/atmospherics/components/setPipenet(datum/pipeline/reference, obj/machinery/atmospherics/A)
|
||||||
var/I = nodes.Find(A)
|
parents[nodes.Find(A)] = reference
|
||||||
PARENT_I = reference
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A = NODE1) //returns PARENT1 if called without argument
|
/obj/machinery/atmospherics/components/returnPipenet(obj/machinery/atmospherics/A = nodes[1]) //returns parents[1] if called without argument
|
||||||
var/I = nodes.Find(A)
|
return parents[nodes.Find(A)]
|
||||||
return PARENT_I
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/replacePipenet(datum/pipeline/Old, datum/pipeline/New)
|
/obj/machinery/atmospherics/components/replacePipenet(datum/pipeline/Old, datum/pipeline/New)
|
||||||
var/I = parents.Find(Old)
|
parents[parents.Find(Old)] = New
|
||||||
PARENT_I = New
|
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures)
|
/obj/machinery/atmospherics/components/unsafe_pressure_release(var/mob/user, var/pressures)
|
||||||
..()
|
..()
|
||||||
@@ -109,15 +102,15 @@ Pipenet stuff; housekeeping
|
|||||||
var/datum/gas_mixture/environment = T.return_air()
|
var/datum/gas_mixture/environment = T.return_air()
|
||||||
var/lost = null
|
var/lost = null
|
||||||
var/times_lost = 0
|
var/times_lost = 0
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
var/datum/gas_mixture/air = AIR_I
|
var/datum/gas_mixture/air = airs[i]
|
||||||
lost += pressures*environment.volume/(air.temperature * R_IDEAL_GAS_EQUATION)
|
lost += pressures*environment.volume/(air.temperature * R_IDEAL_GAS_EQUATION)
|
||||||
times_lost++
|
times_lost++
|
||||||
var/shared_loss = lost/times_lost
|
var/shared_loss = lost/times_lost
|
||||||
|
|
||||||
var/datum/gas_mixture/to_release
|
var/datum/gas_mixture/to_release
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
var/datum/gas_mixture/air = AIR_I
|
var/datum/gas_mixture/air = airs[i]
|
||||||
if(!to_release)
|
if(!to_release)
|
||||||
to_release = air.remove(shared_loss)
|
to_release = air.remove(shared_loss)
|
||||||
continue
|
continue
|
||||||
@@ -136,8 +129,8 @@ Helpers
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/proc/update_parents()
|
/obj/machinery/atmospherics/components/proc/update_parents()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
var/datum/pipeline/parent = PARENT_I
|
var/datum/pipeline/parent = parents[i]
|
||||||
if(!parent)
|
if(!parent)
|
||||||
throw EXCEPTION("Component is missing a pipenet! Rebuilding...")
|
throw EXCEPTION("Component is missing a pipenet! Rebuilding...")
|
||||||
build_network()
|
build_network()
|
||||||
@@ -145,8 +138,8 @@ Helpers
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/returnPipenets()
|
/obj/machinery/atmospherics/components/returnPipenets()
|
||||||
. = list()
|
. = list()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
. += returnPipenet(NODE_I)
|
. += returnPipenet(nodes[i])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UI Stuff
|
UI Stuff
|
||||||
@@ -157,4 +150,3 @@ UI Stuff
|
|||||||
return ..()
|
return ..()
|
||||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||||
return UI_CLOSE
|
return UI_CLOSE
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes()
|
/obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes()
|
||||||
if(on && NODE1 && NODE2 && NODE3 && is_operational())
|
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
|
||||||
icon_state = "filter_on[flipped?"_f":""]"
|
icon_state = "filter_on[flipped?"_f":""]"
|
||||||
return
|
return
|
||||||
icon_state = "filter_off[flipped?"_f":""]"
|
icon_state = "filter_off[flipped?"_f":""]"
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
|
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
|
||||||
..()
|
..()
|
||||||
if(!on || !(NODE1 && NODE2 && NODE3) || !is_operational())
|
if(!on || !(nodes[1] && nodes[2] && nodes[3]) || !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
var/datum/gas_mixture/air3 = AIR3
|
var/datum/gas_mixture/air3 = airs[3]
|
||||||
|
|
||||||
var/output_starting_pressure = air3.return_pressure()
|
var/output_starting_pressure = air3.return_pressure()
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
|
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
|
||||||
if(on && NODE1 && NODE2 && NODE3 && is_operational())
|
if(on && nodes[1] && nodes[2] && nodes[3] && is_operational())
|
||||||
icon_state = "mixer_on[flipped?"_f":""]"
|
icon_state = "mixer_on[flipped?"_f":""]"
|
||||||
return
|
return
|
||||||
icon_state = "mixer_off[flipped?"_f":""]"
|
icon_state = "mixer_off[flipped?"_f":""]"
|
||||||
@@ -46,18 +46,18 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/trinary/mixer/New()
|
/obj/machinery/atmospherics/components/trinary/mixer/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air3 = AIR3
|
var/datum/gas_mixture/air3 = airs[3]
|
||||||
air3.volume = 300
|
air3.volume = 300
|
||||||
AIR3 = air3
|
airs[3] = air3
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/trinary/mixer/process_atmos()
|
/obj/machinery/atmospherics/components/trinary/mixer/process_atmos()
|
||||||
..()
|
..()
|
||||||
if(!on || !(NODE1 && NODE2 && NODE3) && !is_operational())
|
if(!on || !(nodes[1] && nodes[2] && nodes[3]) && !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
var/datum/gas_mixture/air2 = AIR2
|
var/datum/gas_mixture/air2 = airs[2]
|
||||||
var/datum/gas_mixture/air3 = AIR3
|
var/datum/gas_mixture/air3 = airs[3]
|
||||||
|
|
||||||
var/output_starting_pressure = air3.return_pressure()
|
var/output_starting_pressure = air3.return_pressure()
|
||||||
|
|
||||||
@@ -103,14 +103,14 @@
|
|||||||
air3.merge(removed2)
|
air3.merge(removed2)
|
||||||
|
|
||||||
if(transfer_moles1)
|
if(transfer_moles1)
|
||||||
var/datum/pipeline/parent1 = PARENT1
|
var/datum/pipeline/parent1 = parents[1]
|
||||||
parent1.update = TRUE
|
parent1.update = TRUE
|
||||||
|
|
||||||
if(transfer_moles2)
|
if(transfer_moles2)
|
||||||
var/datum/pipeline/parent2 = PARENT2
|
var/datum/pipeline/parent2 = parents[2]
|
||||||
parent2.update = TRUE
|
parent2.update = TRUE
|
||||||
|
|
||||||
var/datum/pipeline/parent3 = PARENT3
|
var/datum/pipeline/parent3 = parents[3]
|
||||||
parent3.update = TRUE
|
parent3.update = TRUE
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
open_machine()
|
open_machine()
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
|
|
||||||
if(air1.gases.len)
|
if(air1.gases.len)
|
||||||
if(mob_occupant.bodytemperature < T0C) // Sleepytime. Why? More cryo magic.
|
if(mob_occupant.bodytemperature < T0C) // Sleepytime. Why? More cryo magic.
|
||||||
@@ -196,9 +196,9 @@
|
|||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
|
|
||||||
if(!NODE1 || !AIR1 || !air1.gases.len || air1.gases[/datum/gas/oxygen][MOLES] < 5) // Turn off if the machine won't work.
|
if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen][MOLES] < 5) // Turn off if the machine won't work.
|
||||||
on = FALSE
|
on = FALSE
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
@@ -348,8 +348,12 @@
|
|||||||
else
|
else
|
||||||
data["occupant"]["temperaturestatus"] = "bad"
|
data["occupant"]["temperaturestatus"] = "bad"
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = AIR1
|
||||||
|
=======
|
||||||
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
|
>>>>>>> 6a7dbaa... removes silly garbage defines (#33621)
|
||||||
data["cellTemperature"] = round(air1.temperature, 1)
|
data["cellTemperature"] = round(air1.temperature, 1)
|
||||||
|
|
||||||
data["isBeakerLoaded"] = beaker ? TRUE : FALSE
|
data["isBeakerLoaded"] = beaker ? TRUE : FALSE
|
||||||
@@ -401,7 +405,7 @@
|
|||||||
return 0 // you can't see the pipe network when inside a cryo cell.
|
return 0 // you can't see the pipe network when inside a cryo cell.
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature()
|
/obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature()
|
||||||
var/datum/gas_mixture/G = AIR1
|
var/datum/gas_mixture/G = airs[1]
|
||||||
|
|
||||||
if(G.total_moles() > 10)
|
if(G.total_moles() > 10)
|
||||||
return G.temperature
|
return G.temperature
|
||||||
@@ -411,13 +415,13 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
SetInitDirections()
|
SetInitDirections()
|
||||||
var/obj/machinery/atmospherics/node = NODE1
|
var/obj/machinery/atmospherics/node = nodes[1]
|
||||||
if(node)
|
if(node)
|
||||||
node.disconnect(src)
|
node.disconnect(src)
|
||||||
NODE1 = null
|
nodes[1] = null
|
||||||
nullifyPipenet(PARENT1)
|
nullifyPipenet(parents[1])
|
||||||
atmosinit()
|
atmosinit()
|
||||||
node = NODE1
|
node = nodes[1]
|
||||||
if(node)
|
if(node)
|
||||||
node.atmosinit()
|
node.atmosinit()
|
||||||
node.addMember(src)
|
node.addMember(src)
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
pipe_state = "heunary"
|
pipe_state = "heunary"
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
|
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
|
||||||
if(NODE1)
|
if(nodes[1])
|
||||||
icon_state = "he_intact"
|
icon_state = "he_intact"
|
||||||
var/obj/machinery/atmospherics/node = NODE1
|
var/obj/machinery/atmospherics/node = nodes[1]
|
||||||
add_atom_colour(node.color, FIXED_COLOUR_PRIORITY)
|
add_atom_colour(node.color, FIXED_COLOUR_PRIORITY)
|
||||||
else
|
else
|
||||||
icon_state = "he_exposed"
|
icon_state = "he_exposed"
|
||||||
@@ -42,8 +42,8 @@
|
|||||||
update_cycle = SSair.times_fired
|
update_cycle = SSair.times_fired
|
||||||
partner.update_cycle = SSair.times_fired
|
partner.update_cycle = SSair.times_fired
|
||||||
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
var/datum/gas_mixture/partner_air_contents = partner.AIR1
|
var/datum/gas_mixture/partner_air_contents = partner.airs[1]
|
||||||
|
|
||||||
var/air_heat_capacity = air_contents.heat_capacity()
|
var/air_heat_capacity = air_contents.heat_capacity()
|
||||||
var/other_air_heat_capacity = partner_air_contents.heat_capacity()
|
var/other_air_heat_capacity = partner_air_contents.heat_capacity()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
if(showpipe)
|
if(showpipe)
|
||||||
add_overlay(getpipeimage(icon, "inje_cap", initialize_directions))
|
add_overlay(getpipeimage(icon, "inje_cap", initialize_directions))
|
||||||
|
|
||||||
if(!NODE1 || !on || !is_operational())
|
if(!nodes[1] || !on || !is_operational())
|
||||||
icon_state = "inje_off"
|
icon_state = "inje_off"
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
if(!on || !is_operational())
|
if(!on || !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
|
|
||||||
if(air_contents.temperature > 0)
|
if(air_contents.temperature > 0)
|
||||||
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
if(on || injecting || !is_operational())
|
if(on || injecting || !is_operational())
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
|
|
||||||
injecting = 1
|
injecting = 1
|
||||||
|
|
||||||
@@ -130,8 +130,13 @@
|
|||||||
|
|
||||||
if("set_volume_rate" in signal.data)
|
if("set_volume_rate" in signal.data)
|
||||||
var/number = text2num(signal.data["set_volume_rate"])
|
var/number = text2num(signal.data["set_volume_rate"])
|
||||||
|
<<<<<<< HEAD
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = AIR1
|
||||||
volume_rate = Clamp(number, 0, air_contents.volume)
|
volume_rate = Clamp(number, 0, air_contents.volume)
|
||||||
|
=======
|
||||||
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
|
volume_rate = CLAMP(number, 0, air_contents.volume)
|
||||||
|
>>>>>>> 6a7dbaa... removes silly garbage defines (#33621)
|
||||||
|
|
||||||
if("status" in signal.data)
|
if("status" in signal.data)
|
||||||
spawn(2)
|
spawn(2)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/portables_connector/New()
|
/obj/machinery/atmospherics/components/unary/portables_connector/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
|
|
||||||
air_contents.volume = 0
|
air_contents.volume = 0
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/tank/New()
|
/obj/machinery/atmospherics/components/unary/tank/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
air_contents.volume = volume
|
air_contents.volume = volume
|
||||||
air_contents.temperature = T20C
|
air_contents.temperature = T20C
|
||||||
if(gas_type)
|
if(gas_type)
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/tank/air/New()
|
/obj/machinery/atmospherics/components/unary/tank/air/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
|
||||||
air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2
|
air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2
|
||||||
air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8
|
air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8
|
||||||
|
|||||||
@@ -48,9 +48,9 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/thermomachine/process_atmos()
|
/obj/machinery/atmospherics/components/unary/thermomachine/process_atmos()
|
||||||
..()
|
..()
|
||||||
if(!on || !NODE1)
|
if(!on || !nodes[1])
|
||||||
return
|
return
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
|
|
||||||
var/air_heat_capacity = air_contents.heat_capacity()
|
var/air_heat_capacity = air_contents.heat_capacity()
|
||||||
var/combined_heat_capacity = heat_capacity + air_heat_capacity
|
var/combined_heat_capacity = heat_capacity + air_heat_capacity
|
||||||
@@ -88,14 +88,14 @@
|
|||||||
if(!..())
|
if(!..())
|
||||||
return 0
|
return 0
|
||||||
SetInitDirections()
|
SetInitDirections()
|
||||||
var/obj/machinery/atmospherics/node = NODE1
|
var/obj/machinery/atmospherics/node = nodes[1]
|
||||||
if(node)
|
if(node)
|
||||||
node.disconnect(src)
|
node.disconnect(src)
|
||||||
NODE1 = null
|
nodes[1] = null
|
||||||
nullifyPipenet(PARENT1)
|
nullifyPipenet(parents[1])
|
||||||
|
|
||||||
atmosinit()
|
atmosinit()
|
||||||
node = NODE1
|
node = nodes[1]
|
||||||
if(node)
|
if(node)
|
||||||
node.atmosinit()
|
node.atmosinit()
|
||||||
node.addMember(src)
|
node.addMember(src)
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
data["target"] = target_temperature
|
data["target"] = target_temperature
|
||||||
data["initial"] = initial(target_temperature)
|
data["initial"] = initial(target_temperature)
|
||||||
|
|
||||||
var/datum/gas_mixture/air1 = AIR1
|
var/datum/gas_mixture/air1 = airs[1]
|
||||||
data["temperature"] = air1.temperature
|
data["temperature"] = air1.temperature
|
||||||
data["pressure"] = air1.return_pressure()
|
data["pressure"] = air1.return_pressure()
|
||||||
return data
|
return data
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
|
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
|
||||||
..()
|
..()
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
air_contents.volume = 1000
|
air_contents.volume = 1000
|
||||||
|
|
||||||
/obj/machinery/atmospherics/components/unary/vent_pump/update_icon_nopipes()
|
/obj/machinery/atmospherics/components/unary/vent_pump/update_icon_nopipes()
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
icon_state = "vent_welded"
|
icon_state = "vent_welded"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!NODE1 || !on || !is_operational())
|
if(!nodes[1] || !on || !is_operational())
|
||||||
if(icon_state == "vent_welded")
|
if(icon_state == "vent_welded")
|
||||||
icon_state = "vent_off"
|
icon_state = "vent_off"
|
||||||
return
|
return
|
||||||
@@ -122,12 +122,12 @@
|
|||||||
..()
|
..()
|
||||||
if(!is_operational())
|
if(!is_operational())
|
||||||
return
|
return
|
||||||
if(!NODE1)
|
if(!nodes[1])
|
||||||
on = FALSE
|
on = FALSE
|
||||||
if(!on || welded)
|
if(!on || welded)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
var/datum/gas_mixture/environment = loc.return_air()
|
var/datum/gas_mixture/environment = loc.return_air()
|
||||||
var/environment_pressure = environment.return_pressure()
|
var/environment_pressure = environment.return_pressure()
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
icon_state = "scrub_welded"
|
icon_state = "scrub_welded"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!NODE1 || !on || !is_operational())
|
if(!nodes[1] || !on || !is_operational())
|
||||||
icon_state = "scrub_off"
|
icon_state = "scrub_off"
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
..()
|
..()
|
||||||
if(welded || !is_operational())
|
if(welded || !is_operational())
|
||||||
return FALSE
|
return FALSE
|
||||||
if(!NODE1 || !on)
|
if(!nodes[1] || !on)
|
||||||
on = FALSE
|
on = FALSE
|
||||||
return FALSE
|
return FALSE
|
||||||
scrub(loc)
|
scrub(loc)
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
var/datum/gas_mixture/environment = tile.return_air()
|
var/datum/gas_mixture/environment = tile.return_air()
|
||||||
var/datum/gas_mixture/air_contents = AIR1
|
var/datum/gas_mixture/air_contents = airs[1]
|
||||||
var/list/env_gases = environment.gases
|
var/list/env_gases = environment.gases
|
||||||
|
|
||||||
if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
|
if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
|
||||||
|
|||||||
@@ -216,8 +216,8 @@
|
|||||||
GL += P.return_air()
|
GL += P.return_air()
|
||||||
for(var/obj/machinery/atmospherics/components/binary/valve/V in P.other_atmosmch)
|
for(var/obj/machinery/atmospherics/components/binary/valve/V in P.other_atmosmch)
|
||||||
if(V.open)
|
if(V.open)
|
||||||
PL |= V.PARENT1
|
PL |= V.parents[1]
|
||||||
PL |= V.PARENT2
|
PL |= V.parents[2]
|
||||||
for(var/obj/machinery/atmospherics/components/unary/portables_connector/C in P.other_atmosmch)
|
for(var/obj/machinery/atmospherics/components/unary/portables_connector/C in P.other_atmosmch)
|
||||||
if(C.connected_device)
|
if(C.connected_device)
|
||||||
GL += C.portableConnectorReturnAir()
|
GL += C.portableConnectorReturnAir()
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
cut_overlays()
|
cut_overlays()
|
||||||
|
|
||||||
//Add non-broken pieces
|
//Add non-broken pieces
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
|
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
|
||||||
|
|
||||||
//4-way manifold
|
//4-way manifold
|
||||||
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
|
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
|
||||||
@@ -61,6 +61,6 @@
|
|||||||
cut_overlays()
|
cut_overlays()
|
||||||
|
|
||||||
//Add non-broken pieces
|
//Add non-broken pieces
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
|
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, nodes[i])))
|
||||||
|
|||||||
@@ -107,14 +107,14 @@
|
|||||||
P.destroy_network()
|
P.destroy_network()
|
||||||
while(reference in get_all_connected_nodes())
|
while(reference in get_all_connected_nodes())
|
||||||
if(reference in nodes)
|
if(reference in nodes)
|
||||||
var/I = nodes.Find(reference)
|
var/i = nodes.Find(reference)
|
||||||
NODE_I = null
|
nodes[i] = null
|
||||||
if(reference in front_nodes)
|
if(reference in front_nodes)
|
||||||
var/I = front_nodes.Find(reference)
|
var/i = front_nodes.Find(reference)
|
||||||
front_nodes[I] = null
|
front_nodes[i] = null
|
||||||
if(reference in back_nodes)
|
if(reference in back_nodes)
|
||||||
var/I = back_nodes.Find(reference)
|
var/i = back_nodes.Find(reference)
|
||||||
back_nodes[I] = null
|
back_nodes[i] = null
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/layer_manifold/relaymove(mob/living/user, dir)
|
/obj/machinery/atmospherics/pipe/layer_manifold/relaymove(mob/living/user, dir)
|
||||||
|
|||||||
@@ -35,9 +35,9 @@
|
|||||||
cut_overlays()
|
cut_overlays()
|
||||||
|
|
||||||
//Add non-broken pieces
|
//Add non-broken pieces
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, NODE_I)))
|
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
|
||||||
|
|
||||||
//Colored pipes, use these for mapping
|
//Colored pipes, use these for mapping
|
||||||
/obj/machinery/atmospherics/pipe/manifold/general
|
/obj/machinery/atmospherics/pipe/manifold/general
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
cut_overlays()
|
cut_overlays()
|
||||||
|
|
||||||
//Add non-broken pieces
|
//Add non-broken pieces
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, NODE_I)))
|
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/manifold.dmi', "manifold_full[invis]", get_dir(src, nodes[i])))
|
||||||
|
|
||||||
//Colored pipes, use these for mapping
|
//Colored pipes, use these for mapping
|
||||||
/obj/machinery/atmospherics/pipe/manifold4w/general
|
/obj/machinery/atmospherics/pipe/manifold4w/general
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
volume = 35 * device_type
|
volume = 35 * device_type
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/nullifyNode(I)
|
/obj/machinery/atmospherics/pipe/nullifyNode(i)
|
||||||
var/obj/machinery/atmospherics/oldN = NODE_I
|
var/obj/machinery/atmospherics/oldN = nodes[i]
|
||||||
..()
|
..()
|
||||||
if(oldN)
|
if(oldN)
|
||||||
oldN.build_network()
|
oldN.build_network()
|
||||||
@@ -33,11 +33,11 @@
|
|||||||
parent.build_pipeline(src)
|
parent.build_pipeline(src)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/update_icon() //overridden by manifolds
|
/obj/machinery/atmospherics/pipe/update_icon() //overridden by manifolds
|
||||||
if(NODE1&&NODE2)
|
if(nodes[1] && nodes[2])
|
||||||
icon_state = "intact[invisibility ? "-f" : "" ]"
|
icon_state = "intact[invisibility ? "-f" : "" ]"
|
||||||
else
|
else
|
||||||
var/have_node1 = NODE1?1:0
|
var/have_node1 = nodes[1] ? TRUE : FALSE
|
||||||
var/have_node2 = NODE2?1:0
|
var/have_node2 = nodes[2] ? TRUE : FALSE
|
||||||
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/atmosinit()
|
/obj/machinery/atmospherics/pipe/atmosinit()
|
||||||
@@ -91,9 +91,9 @@
|
|||||||
QDEL_NULL(parent)
|
QDEL_NULL(parent)
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/proc/update_node_icon()
|
/obj/machinery/atmospherics/pipe/proc/update_node_icon()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(NODE_I)
|
if(nodes[i])
|
||||||
var/obj/machinery/atmospherics/N = NODE_I
|
var/obj/machinery/atmospherics/N = nodes[i]
|
||||||
N.update_icon()
|
N.update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/returnPipenets()
|
/obj/machinery/atmospherics/pipe/returnPipenets()
|
||||||
@@ -109,4 +109,3 @@
|
|||||||
pipe_color = paint_color
|
pipe_color = paint_color
|
||||||
update_node_icon()
|
update_node_icon()
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -324,13 +324,13 @@
|
|||||||
valve_open = !valve_open
|
valve_open = !valve_open
|
||||||
timing = FALSE
|
timing = FALSE
|
||||||
if(!valve_open)
|
if(!valve_open)
|
||||||
pump.AIR1 = null
|
pump.airs[1] = null
|
||||||
pump.AIR2 = null
|
pump.airs[2] = null
|
||||||
return
|
return
|
||||||
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
pump.AIR1 = air_contents
|
pump.airs[1] = air_contents
|
||||||
pump.AIR2 = holding ? holding.air_contents : T.return_air()
|
pump.airs[2] = holding ? holding.air_contents : T.return_air()
|
||||||
pump.target_pressure = release_pressure
|
pump.target_pressure = release_pressure
|
||||||
|
|
||||||
pump.process_atmos() // Pump gas.
|
pump.process_atmos() // Pump gas.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
//Perform the connection
|
//Perform the connection
|
||||||
connected_port = new_port
|
connected_port = new_port
|
||||||
connected_port.connected_device = src
|
connected_port.connected_device = src
|
||||||
var/datum/pipeline/connected_port_parent = connected_port.PARENT1
|
var/datum/pipeline/connected_port_parent = connected_port.parents[1]
|
||||||
connected_port_parent.reconcile_air()
|
connected_port_parent.reconcile_air()
|
||||||
|
|
||||||
anchored = TRUE //Prevent movement
|
anchored = TRUE //Prevent movement
|
||||||
|
|||||||
@@ -41,17 +41,17 @@
|
|||||||
/obj/machinery/portable_atmospherics/pump/process_atmos()
|
/obj/machinery/portable_atmospherics/pump/process_atmos()
|
||||||
..()
|
..()
|
||||||
if(!on)
|
if(!on)
|
||||||
pump.AIR1 = null
|
pump.airs[1] = null
|
||||||
pump.AIR2 = null
|
pump.airs[2] = null
|
||||||
return
|
return
|
||||||
|
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
if(direction == PUMP_OUT) // Hook up the internal pump.
|
if(direction == PUMP_OUT) // Hook up the internal pump.
|
||||||
pump.AIR1 = holding ? holding.air_contents : air_contents
|
pump.airs[1] = holding ? holding.air_contents : air_contents
|
||||||
pump.AIR2 = holding ? air_contents : T.return_air()
|
pump.airs[2] = holding ? air_contents : T.return_air()
|
||||||
else
|
else
|
||||||
pump.AIR1 = holding ? air_contents : T.return_air()
|
pump.airs[1] = holding ? air_contents : T.return_air()
|
||||||
pump.AIR2 = holding ? holding.air_contents : air_contents
|
pump.airs[2] = holding ? holding.air_contents : air_contents
|
||||||
|
|
||||||
pump.process_atmos() // Pump gas.
|
pump.process_atmos() // Pump gas.
|
||||||
if(!holding)
|
if(!holding)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
if(QDELETED(temp_vent))
|
if(QDELETED(temp_vent))
|
||||||
continue
|
continue
|
||||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||||
//Stops Aliens getting stuck in small networks.
|
//Stops Aliens getting stuck in small networks.
|
||||||
//See: Security, Virology
|
//See: Security, Virology
|
||||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
var/list/vents = list()
|
var/list/vents = list()
|
||||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
|
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
|
||||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||||
vents += temp_vent
|
vents += temp_vent
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
endWhen = rand(25, 100)
|
endWhen = rand(25, 100)
|
||||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||||
vents += temp_vent
|
vents += temp_vent
|
||||||
if(!vents.len)
|
if(!vents.len)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, typecacheof(list(
|
|||||||
|
|
||||||
|
|
||||||
if(vent_found)
|
if(vent_found)
|
||||||
var/datum/pipeline/vent_found_parent = vent_found.PARENT1
|
var/datum/pipeline/vent_found_parent = vent_found.parents[1]
|
||||||
if(vent_found_parent && (vent_found_parent.members.len || vent_found_parent.other_atmosmch))
|
if(vent_found_parent && (vent_found_parent.members.len || vent_found_parent.other_atmosmch))
|
||||||
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>" ,"<span class='notice'>You begin climbing into the ventilation system...</span>")
|
visible_message("<span class='notice'>[src] begins climbing into the ventilation system...</span>" ,"<span class='notice'>You begin climbing into the ventilation system...</span>")
|
||||||
|
|
||||||
|
|||||||
@@ -99,11 +99,11 @@
|
|||||||
// update icon overlays only if displayed level has changed
|
// update icon overlays only if displayed level has changed
|
||||||
|
|
||||||
if(hot_air)
|
if(hot_air)
|
||||||
var/datum/gas_mixture/hot_circ_air1 = hot_circ.AIR1
|
var/datum/gas_mixture/hot_circ_air1 = hot_circ.airs[1]
|
||||||
hot_circ_air1.merge(hot_air)
|
hot_circ_air1.merge(hot_air)
|
||||||
|
|
||||||
if(cold_air)
|
if(cold_air)
|
||||||
var/datum/gas_mixture/cold_circ_air1 = cold_circ.AIR1
|
var/datum/gas_mixture/cold_circ_air1 = cold_circ.airs[1]
|
||||||
cold_circ_air1.merge(cold_air)
|
cold_circ_air1.merge(cold_air)
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -134,10 +134,10 @@
|
|||||||
if(!powernet)
|
if(!powernet)
|
||||||
t += "<span class='bad'>Unable to connect to the power network!</span>"
|
t += "<span class='bad'>Unable to connect to the power network!</span>"
|
||||||
else if(cold_circ && hot_circ)
|
else if(cold_circ && hot_circ)
|
||||||
var/datum/gas_mixture/cold_circ_air1 = cold_circ.AIR1
|
var/datum/gas_mixture/cold_circ_air1 = cold_circ.airs[1]
|
||||||
var/datum/gas_mixture/cold_circ_air2 = cold_circ.AIR2
|
var/datum/gas_mixture/cold_circ_air2 = cold_circ.airs[2]
|
||||||
var/datum/gas_mixture/hot_circ_air1 = hot_circ.AIR1
|
var/datum/gas_mixture/hot_circ_air1 = hot_circ.airs[1]
|
||||||
var/datum/gas_mixture/hot_circ_air2 = hot_circ.AIR2
|
var/datum/gas_mixture/hot_circ_air2 = hot_circ.airs[2]
|
||||||
|
|
||||||
t += "<div class='statusDisplay'>"
|
t += "<div class='statusDisplay'>"
|
||||||
|
|
||||||
|
|||||||
@@ -209,9 +209,9 @@ All ShuttleMove procs go here
|
|||||||
/obj/machinery/atmospherics/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
|
/obj/machinery/atmospherics/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
|
||||||
. = ..()
|
. = ..()
|
||||||
var/missing_nodes = FALSE
|
var/missing_nodes = FALSE
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
if(src.nodes[I])
|
if(nodes[i])
|
||||||
var/obj/machinery/atmospherics/node = src.nodes[I]
|
var/obj/machinery/atmospherics/node = nodes[i]
|
||||||
var/connected = FALSE
|
var/connected = FALSE
|
||||||
for(var/D in GLOB.cardinals)
|
for(var/D in GLOB.cardinals)
|
||||||
if(node in get_step(src, D))
|
if(node in get_step(src, D))
|
||||||
@@ -219,9 +219,9 @@ All ShuttleMove procs go here
|
|||||||
break
|
break
|
||||||
|
|
||||||
if(!connected)
|
if(!connected)
|
||||||
nullifyNode(I)
|
nullifyNode(i)
|
||||||
|
|
||||||
if(!src.nodes[I])
|
if(!nodes[i])
|
||||||
missing_nodes = TRUE
|
missing_nodes = TRUE
|
||||||
|
|
||||||
if(missing_nodes)
|
if(missing_nodes)
|
||||||
|
|||||||
@@ -84,17 +84,17 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/shuttleRotate(rotation, params)
|
/obj/machinery/atmospherics/shuttleRotate(rotation, params)
|
||||||
var/list/real_node_connect = getNodeConnects()
|
var/list/real_node_connect = getNodeConnects()
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
real_node_connect[I] = angle2dir(rotation+dir2angle(real_node_connect[I]))
|
real_node_connect[i] = angle2dir(rotation+dir2angle(real_node_connect[i]))
|
||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
SetInitDirections()
|
SetInitDirections()
|
||||||
var/list/supposed_node_connect = getNodeConnects()
|
var/list/supposed_node_connect = getNodeConnects()
|
||||||
var/list/nodes_copy = nodes.Copy()
|
var/list/nodes_copy = nodes.Copy()
|
||||||
|
|
||||||
for(DEVICE_TYPE_LOOP)
|
for(var/i in 1 to device_type)
|
||||||
var/new_pos = supposed_node_connect.Find(real_node_connect[I])
|
var/new_pos = supposed_node_connect.Find(real_node_connect[i])
|
||||||
nodes[new_pos] = nodes_copy[I]
|
nodes[new_pos] = nodes_copy[i]
|
||||||
|
|
||||||
//prevents shuttles attempting to rotate this since it messes up sprites
|
//prevents shuttles attempting to rotate this since it messes up sprites
|
||||||
/obj/machinery/gateway/shuttleRotate(rotation, params)
|
/obj/machinery/gateway/shuttleRotate(rotation, params)
|
||||||
@@ -104,4 +104,4 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
|
|||||||
//prevents shuttles attempting to rotate this since it messes up sprites
|
//prevents shuttles attempting to rotate this since it messes up sprites
|
||||||
/obj/machinery/gravity_generator/shuttleRotate(rotation, params)
|
/obj/machinery/gravity_generator/shuttleRotate(rotation, params)
|
||||||
params = NONE
|
params = NONE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user