diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 203e17e1308..1f3aae999d4 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -10,6 +10,10 @@ obj/machinery/atmospherics/binary/passive_gate
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
+ var/frequency = 0
+ var/id = null
+ var/datum/radio_frequency/radio_connection
+
update_icon()
if(node1&&node2)
icon_state = "intact_[on?("on"):("off")]"
@@ -52,4 +56,133 @@ obj/machinery/atmospherics/binary/passive_gate
network1.update = 1
if(network2)
- network2.update = 1
\ No newline at end of file
+ network2.update = 1
+
+
+ //Radio remote control
+
+ proc
+ set_frequency(new_frequency)
+ radio_controller.remove_object(src, frequency)
+ frequency = new_frequency
+ if(frequency)
+ radio_connection = radio_controller.add_object(src, frequency, filter = RADIO_ATMOSIA)
+
+ broadcast_status()
+ if(!radio_connection)
+ return 0
+
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.source = src
+
+ signal.data = list(
+ "tag" = id,
+ "device" = "AGP",
+ "power" = on,
+ "target_output" = target_pressure,
+ "sigtype" = "status"
+ )
+
+ radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
+
+ return 1
+
+ interact(mob/user as mob)
+ var/dat = {"Power: [on?"On":"Off"]
+ Desirable output pressure:
+ [round(target_pressure,0.1)]kPa | Change
+ "}
+
+ user << browse("
[src.name] control[dat]", "window=atmo_pump")
+ onclose(user, "atmo_pump")
+
+ initialize()
+ ..()
+ if(frequency)
+ set_frequency(frequency)
+
+ receive_signal(datum/signal/signal)
+ if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
+ return 0
+
+ if("power" in signal.data)
+ on = text2num(signal.data["power"])
+
+ if("power_toggle" in signal.data)
+ on = !on
+
+ if("set_output_pressure" in signal.data)
+ target_pressure = between(
+ 0,
+ text2num(signal.data["set_output_pressure"]),
+ ONE_ATMOSPHERE*50
+ )
+
+ if("status" in signal.data)
+ spawn(2)
+ broadcast_status()
+ return //do not update_icon
+
+ spawn(2)
+ broadcast_status()
+ update_icon()
+ return
+
+
+
+ attack_hand(user as mob)
+ if(..())
+ return
+ src.add_fingerprint(usr)
+ if(!src.allowed(user))
+ user << "\red Access denied."
+ return
+ usr.machine = src
+ interact(user)
+ return
+
+ Topic(href,href_list)
+ if(..()) return
+ if(href_list["power"])
+ on = !on
+ if(href_list["set_press"])
+ var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
+ src.target_pressure = max(0, min(4500, new_pressure))
+ usr.machine = src
+ src.update_icon()
+ src.updateUsrDialog()
+ return
+
+ power_change()
+ ..()
+ update_icon()
+
+
+
+ attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
+ if (!istype(W, /obj/item/weapon/wrench))
+ return ..()
+ if (on)
+ user << "\red You cannot unwrench this [src], turn it off first."
+ return 1
+ var/turf/T = src.loc
+ if (level==1 && isturf(T) && T.intact)
+ user << "\red You must remove the plating first."
+ return 1
+ var/datum/gas_mixture/int_air = return_air()
+ var/datum/gas_mixture/env_air = loc.return_air()
+ if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
+ user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
+ add_fingerprint(user)
+ return 1
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ user << "\blue You begin to unfasten \the [src]..."
+ if (do_after(user, 40))
+ user.visible_message( \
+ "[user] unfastens \the [src].", \
+ "\blue You have unfastened \the [src].", \
+ "You hear ratchet.")
+ new /obj/item/pipe(loc, make_from=src)
+ del(src)
+
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 8c57db80e0c..77570031e45 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -26,12 +26,6 @@ obj/machinery/atmospherics/binary/pump
var/id = null
var/datum/radio_frequency/radio_connection
-/*
- attack_hand(mob/user)
- on = !on
- update_icon()
-*/
-
update_icon()
if(node1&&node2)
icon_state = "intact_[on?("on"):("off")]"
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index a2e33372898..5ca0b795b6b 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -16,8 +16,8 @@ obj/machinery/atmospherics/binary/volume_pump
icon = 'icons/obj/atmospherics/volume_pump.dmi'
icon_state = "intact_off"
- name = "Gas pump"
- desc = "A pump"
+ name = "Volumetric gas pump"
+ desc = "A volumetric pump"
var/on = 0
var/transfer_rate = 200
@@ -36,15 +36,23 @@ obj/machinery/atmospherics/binary/volume_pump
icon_state = "exposed_2_off"
else
icon_state = "exposed_3_off"
- on = 0
-
return
process()
// ..()
+ if(stat & (NOPOWER|BROKEN))
+ return
if(!on)
return 0
+// Pump mechanism just won't do anything if the pressure is too high/too low
+
+ var/input_starting_pressure = air1.return_pressure()
+ var/output_starting_pressure = air2.return_pressure()
+
+ if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
+ return 1
+
var/transfer_ratio = max(1, transfer_rate/air1.volume)
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
@@ -85,6 +93,17 @@ obj/machinery/atmospherics/binary/volume_pump
return 1
+ interact(mob/user as mob)
+ var/dat = {"Power: [on?"On":"Off"]
+ Desirable output flow:
+ [round(transfer_rate,1)]l/s | Change
+ "}
+
+ user << browse("[src.name] control[dat]", "window=atmo_pump")
+ onclose(user, "atmo_pump")
+
+
+
initialize()
..()
@@ -114,4 +133,61 @@ obj/machinery/atmospherics/binary/volume_pump
spawn(2)
broadcast_status()
- update_icon()
\ No newline at end of file
+ update_icon()
+
+
+ attack_hand(user as mob)
+ if(..())
+ return
+ src.add_fingerprint(usr)
+ if(!src.allowed(user))
+ user << "\red Access denied."
+ return
+ usr.machine = src
+ interact(user)
+ return
+
+ Topic(href,href_list)
+ if(..()) return
+ if(href_list["power"])
+ on = !on
+ if(href_list["set_transfer_rate"])
+ var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
+ src.transfer_rate = max(0, min(200, new_transfer_rate))
+ usr.machine = src
+ src.update_icon()
+ src.updateUsrDialog()
+ return
+
+ power_change()
+ ..()
+ update_icon()
+
+
+
+ attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
+ if (!istype(W, /obj/item/weapon/wrench))
+ return ..()
+ if (!(stat & NOPOWER) && on)
+ user << "\red You cannot unwrench this [src], turn it off first."
+ return 1
+ var/turf/T = src.loc
+ if (level==1 && isturf(T) && T.intact)
+ user << "\red You must remove the plating first."
+ return 1
+ var/datum/gas_mixture/int_air = return_air()
+ var/datum/gas_mixture/env_air = loc.return_air()
+ if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
+ user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
+ add_fingerprint(user)
+ return 1
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ user << "\blue You begin to unfasten \the [src]..."
+ if (do_after(user, 40))
+ user.visible_message( \
+ "[user] unfastens \the [src].", \
+ "\blue You have unfastened \the [src].", \
+ "You hear ratchet.")
+ new /obj/item/pipe(loc, make_from=src)
+ del(src)
+
diff --git a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
index 9001bcb4236..7d03ad98838 100644
--- a/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_exchanger.dm
@@ -63,4 +63,27 @@
if(abs(other_old_temperature-partner.air_contents.temperature) > 1)
partner.network.update = 1
- return 1
\ No newline at end of file
+ return 1
+
+ attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
+ if (!istype(W, /obj/item/weapon/wrench))
+ return ..()
+ var/turf/T = src.loc
+ if (level==1 && isturf(T) && T.intact)
+ user << "\red You must remove the plating first."
+ return 1
+ var/datum/gas_mixture/int_air = return_air()
+ var/datum/gas_mixture/env_air = loc.return_air()
+ if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
+ user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
+ add_fingerprint(user)
+ return 1
+ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
+ user << "\blue You begin to unfasten \the [src]..."
+ if (do_after(user, 40))
+ user.visible_message( \
+ "[user] unfastens \the [src].", \
+ "\blue You have unfastened \the [src].", \
+ "You hear ratchet.")
+ new /obj/item/pipe(loc, make_from=src)
+ del(src)
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 33f3a798c4c..d525d23c981 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -323,7 +323,7 @@ obj/machinery/atmospherics/pipe
name = "Pressure Tank"
desc = "A large vessel containing pressurized gas."
- volume = 1620 //in liters, 0.9 meters by 0.9 meters by 2 meters
+ volume = 2000 //in liters, 1 meters by 1 meters by 2 meters
dir = SOUTH
initialize_directions = SOUTH
diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm
index bb98dc9de8f..f082eb4160f 100644
--- a/code/game/machinery/Freezer.dm
+++ b/code/game/machinery/Freezer.dm
@@ -77,6 +77,90 @@
src.add_fingerprint(usr)
return
+ process()
+ ..()
+ src.updateUsrDialog()
+
+
+
+
+/obj/machinery/atmospherics/unary/heat_reservoir/heater
+ name = "Heater"
+ icon = 'icons/obj/Cryogenic2.dmi'
+ icon_state = "freezer_0"
+ density = 1
+
+ anchored = 1.0
+
+ current_heat_capacity = 1000
+
+ New()
+ ..()
+ initialize_directions = dir
+
+ 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()
+
+
+ update_icon()
+ if(src.node)
+ if(src.on)
+ icon_state = "heater_1"
+ else
+ icon_state = "heater"
+ else
+ icon_state = "heater_0"
+ return
+
+ attack_ai(mob/user as mob)
+ return src.attack_hand(user)
+
+ attack_paw(mob/user as mob)
+ return src.attack_hand(user)
+
+ attack_hand(mob/user as mob)
+ user.machine = src
+ var/temp_text = ""
+ if(air_contents.temperature > (T20C+40))
+ temp_text = "[air_contents.temperature]"
+ else
+ temp_text = "[air_contents.temperature]"
+
+ var/dat = {"Heating system
+ Current status: [ on ? "Off On" : "Off On"]
+ Current gas temperature: [temp_text]
+ Current air pressure: [air_contents.return_pressure()]
+ Target gas temperature: - - - [current_temperature] + + +
+ "}
+
+ user << browse(dat, "window=heater;size=400x500")
+ onclose(user, "heater")
+
+ Topic(href, href_list)
+ if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
+ usr.machine = src
+ if (href_list["start"])
+ src.on = !src.on
+ update_icon()
+ if(href_list["temp"])
+ var/amount = text2num(href_list["temp"])
+ if(amount > 0)
+ src.current_temperature = min((T20C+280), src.current_temperature+amount)
+ else
+ src.current_temperature = max(T20C, src.current_temperature+amount)
+ src.updateUsrDialog()
+ src.add_fingerprint(usr)
+ return
+
process()
..()
src.updateUsrDialog()
\ No newline at end of file
diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm
index 0f91e007ce7..4d720c331e5 100644
--- a/code/game/machinery/atmoalter/pump.dm
+++ b/code/game/machinery/atmoalter/pump.dm
@@ -9,7 +9,7 @@
var/direction_out = 0 //0 = siphoning, 1 = releasing
var/target_pressure = 100
- volume = 2500
+ volume = 1000
/obj/machinery/portable_atmospherics/pump/update_icon()
src.overlays = 0
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 543546380a9..a8488e8c2d5 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -17,6 +17,9 @@ Buildable meters
#define PIPE_INSULATED_BENT 12
#define PIPE_GAS_FILTER 13
#define PIPE_GAS_MIXER 14
+#define PIPE_PASSIVE_GATE 15
+#define PIPE_VOLUME_PUMP 16
+#define PIPE_HEAT_EXCHANGE 17
/obj/item/pipe
name = "pipe"
@@ -66,6 +69,12 @@ Buildable meters
src.pipe_type = PIPE_GAS_MIXER
else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_scrubber))
src.pipe_type = PIPE_SCRUBBER
+ else if(istype(make_from, /obj/machinery/atmospherics/binary/passive_gate))
+ src.pipe_type = PIPE_PASSIVE_GATE
+ else if(istype(make_from, /obj/machinery/atmospherics/binary/volume_pump))
+ src.pipe_type = PIPE_VOLUME_PUMP
+ else if(istype(make_from, /obj/machinery/atmospherics/unary/heat_exchanger))
+ src.pipe_type = PIPE_HEAT_EXCHANGE
else
src.pipe_type = pipe_type
src.dir = dir
@@ -93,6 +102,9 @@ Buildable meters
"bent insulated pipe", \
"gas filter", \
"gas mixer", \
+ "passive gate", \
+ "volume pump", \
+ "heat exchanger", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -111,6 +123,9 @@ Buildable meters
"insulated", \
"filter", \
"mixer", \
+ "passivegate", \
+ "volumepump", \
+ "heunary", \
)
icon_state = islist[pipe_type + 1]
@@ -164,12 +179,14 @@ Buildable meters
PIPE_HE_STRAIGHT, \
PIPE_JUNCTION ,\
PIPE_PUMP ,\
+ PIPE_VOLUME_PUMP ,\
+ PIPE_PASSIVE_GATE ,\
PIPE_MVALVE \
)
return dir|flip
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT)
return dir //dir|acw
- if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER)
+ if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
return dir
if(PIPE_MANIFOLD)
return flip|cw|acw
@@ -451,6 +468,54 @@ Buildable meters
P.node2.initialize()
P.node2.build_network()
+ if(PIPE_PASSIVE_GATE) //passive gate
+ var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc)
+ P.dir = dir
+ P.initialize_directions = pipe_dir
+ if (pipename)
+ P.name = pipename
+ var/turf/T = P.loc
+ P.level = T.intact ? 2 : 1
+ P.initialize()
+ P.build_network()
+ if (P.node1)
+ P.node1.initialize()
+ P.node1.build_network()
+ if (P.node2)
+ P.node2.initialize()
+ P.node2.build_network()
+
+ if(PIPE_VOLUME_PUMP) //volume pump
+ var/obj/machinery/atmospherics/binary/volume_pump/P = new(src.loc)
+ P.dir = dir
+ P.initialize_directions = pipe_dir
+ if (pipename)
+ P.name = pipename
+ var/turf/T = P.loc
+ P.level = T.intact ? 2 : 1
+ P.initialize()
+ P.build_network()
+ if (P.node1)
+ P.node1.initialize()
+ P.node1.build_network()
+ if (P.node2)
+ P.node2.initialize()
+ P.node2.build_network()
+
+ if(PIPE_HEAT_EXCHANGE) // heat exchanger
+ var/obj/machinery/atmospherics/unary/heat_exchanger/C = new( src.loc )
+ C.dir = dir
+ C.initialize_directions = pipe_dir
+ if (pipename)
+ C.name = pipename
+ var/turf/T = C.loc
+ C.level = T.intact ? 2 : 1
+ C.initialize()
+ C.build_network()
+ if (C.node)
+ C.node.initialize()
+ C.node.build_network()
+
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message( \
"[user] fastens the [src].", \
@@ -502,3 +567,6 @@ Buildable meters
#undef PIPE_INSULATED_BENT
#undef PIPE_GAS_FILTER
#undef PIPE_GAS_MIXER
+#undef PIPE_PASSIVE_GATE
+#undef PIPE_VOLUME_PUMP
+#undef PIPE_OUTLET_INJECT
\ No newline at end of file
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index b923672bc13..8895f9a18c1 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -23,6 +23,8 @@
Connector
Unary Vent
Gas Pump
+Passive Gate
+Volume Pump
Scrubber
Meter
Gas Filter
@@ -31,6 +33,7 @@
Pipe
Bent Pipe
Junction
+Heat Exchanger
Insulated pipes:
Pipe
Bent Pipe
@@ -138,17 +141,14 @@ Nah
return
var/dat = {"Disposal Pipes
-Pipe
-Bent Pipe
-
-Junction
-Y-Junction
-Sorting Junction
-
-Trunk
-Bin
-Outlet
-Chute
+Pipe
+Bent Pipe
+Junction
+Y-Junction
+Trunk
+Bin
+Outlet
+Chute
"}
user << browse("[src][dat]", "window=pipedispenser")
@@ -162,20 +162,33 @@ Nah
return
usr.machine = src
src.add_fingerprint(usr)
- if(href_list["ptype"])
+ if(href_list["dmake"])
if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=pipedispenser")
return
if(!wait)
+ var/p_type = text2num(href_list["dmake"])
var/obj/structure/disposalconstruct/C = new (src.loc)
-
- var/p_type = text2num(href_list["ptype"])
- C.ptype = p_type
-
- if(href_list["density"])
- var/p_density = text2num(href_list["density"])
- C.density = p_density
-
+ switch(p_type)
+ if(0)
+ C.ptype = 0
+ if(1)
+ C.ptype = 1
+ if(2)
+ C.ptype = 2
+ if(3)
+ C.ptype = 4
+ if(4)
+ C.ptype = 5
+ if(5)
+ C.ptype = 6
+ C.density = 1
+ if(6)
+ C.ptype = 7
+ C.density = 1
+ if(7)
+ C.ptype = 8
+ C.density = 1
C.add_fingerprint(usr)
C.update()
wait = 1
diff --git a/html/changelog.html b/html/changelog.html
index 81b3d9f3e2b..d0b63ea45ff 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -48,6 +48,19 @@ Stuff which is in development and not yet visible to players or just code relate
should be listed in the changelog upon commit tho. Thanks. -->
+
+
30 September 2012
+
Numbers updated:
+
+ - Readded Volume Pumps - now they work as intended and are constructable
+ - Readded Passive Gates - now they work as intended and are constructable
+ - Readded Heat Exchangers - now they work as intended and are constructable
+ - Added Heater - to warm up gasses to 300C
+ - Pipe dispensers can produce the readded pieces.
+ - New graphics for all of the above - courtesy by Ausops.
+
+
+
30 September 2012
Giacom updated:
diff --git a/icons/obj/Cryogenic2.dmi b/icons/obj/Cryogenic2.dmi
index a44590ebba8..fd0b41c920c 100644
Binary files a/icons/obj/Cryogenic2.dmi and b/icons/obj/Cryogenic2.dmi differ
diff --git a/icons/obj/atmospherics/heat_exchanger.dmi b/icons/obj/atmospherics/heat_exchanger.dmi
index f493aab66c4..31836c5ec41 100644
Binary files a/icons/obj/atmospherics/heat_exchanger.dmi and b/icons/obj/atmospherics/heat_exchanger.dmi differ
diff --git a/icons/obj/atmospherics/passive_gate.dmi b/icons/obj/atmospherics/passive_gate.dmi
index 806a0ce6450..5cbe5877885 100644
Binary files a/icons/obj/atmospherics/passive_gate.dmi and b/icons/obj/atmospherics/passive_gate.dmi differ
diff --git a/icons/obj/atmospherics/volume_pump.dmi b/icons/obj/atmospherics/volume_pump.dmi
index 33741887be3..fed0d47945c 100644
Binary files a/icons/obj/atmospherics/volume_pump.dmi and b/icons/obj/atmospherics/volume_pump.dmi differ
diff --git a/icons/obj/pipe-item.dmi b/icons/obj/pipe-item.dmi
index 459b7e52cc8..ee660afbe21 100644
Binary files a/icons/obj/pipe-item.dmi and b/icons/obj/pipe-item.dmi differ