diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index bfde280ba7..6d4da0c8e0 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -17,7 +17,7 @@ Thus, the two variables affect pump operation are set in New():
icon_state = "map"
level = 1
- name = "Gas pump"
+ name = "gas pump"
desc = "A pump"
var/on = 0
@@ -31,22 +31,17 @@ Thus, the two variables affect pump operation are set in New():
var/last_power_draw = 0 //for UI
var/last_flow_rate = 0 //for UI
- var/max_pressure_setting = 9000 //kPa
+ var/max_pressure_setting = 15000 //kPa
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
-/obj/machinery/atmospherics/binary/pump/highcap
- name = "High capacity gas pump"
- desc = "A high capacity pump"
-
- target_pressure = 15000000 //15 GPa? Really?
- active_power_usage = 112500 //150 Horsepower
-
/obj/machinery/atmospherics/binary/pump/on
on = 1
+
+
/obj/machinery/atmospherics/binary/pump/update_icon()
if(!powered())
icon_state = "off"
@@ -103,8 +98,12 @@ Thus, the two variables affect pump operation are set in New():
transfer_moles = min(transfer_moles, active_power_usage / specific_power)
//Actually transfer the gas
+ var/input_pressure = air1.return_pressure()
+
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
- last_flow_rate = output_starting_pressure? transfer_moles*R_IDEAL_GAS_EQUATION*removed.temperature/air1.return_pressure() : 0 //need to calculate this here because gas_mixture/remove() is dumb
+ if (input_pressure > 0)
+ last_flow_rate = removed.total_moles()*R_IDEAL_GAS_EQUATION*removed.temperature/input_pressure
+
air2.merge(removed)
//if specific_entropy >= 0 then gas is flowing naturally and we don't need to use extra power
@@ -178,9 +177,9 @@ Thus, the two variables affect pump operation are set in New():
data = list(
"on" = on,
- "pressure_set" = round(target_pressure, 0.05),
+ "pressure_set" = round(target_pressure*100), //Nano UI can't handle rounded non-integers, apparently.
"max_pressure" = max_pressure_setting,
- "last_flow_rate" = round(last_flow_rate),
+ "last_flow_rate" = round(last_flow_rate*10),
"last_power_draw" = round(last_power_draw),
"max_power_draw" = active_power_usage,
)
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index 2f9d775bd5..065ecc3605 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -1,193 +1,18 @@
-/*
-Every cycle, the pump uses the air in air_in to try and make air_out the perfect pressure.
-
-node1, air1, network1 correspond to input
-node2, air2, network2 correspond to output
-
-Thus, the two variables affect pump operation are set in New():
- air1.volume
- This is the volume of gas available to the pump that may be transfered to the output
- air2.volume
- Higher quantities of this cause more air to be perfected later
- but overall network volume is also increased as this increases...
-*/
-
-/obj/machinery/atmospherics/binary/volume_pump
+/obj/machinery/atmospherics/binary/pump/high_power
icon = 'icons/atmos/volume_pump.dmi'
icon_state = "map"
level = 1
- name = "Volumetric gas pump"
- desc = "A volumetric pump"
+ name = "high power gas pump"
+ desc = "A pump. Has double the power rating of the standard gas pump."
- var/on = 0
- var/transfer_rate = 200
+ active_power_usage = 15000 //This also doubles as a measure of how powerful the pump is, in Watts. 15000 W ~ 20 HP
- var/frequency = 0
- var/id = null
- var/datum/radio_frequency/radio_connection
-
-/obj/machinery/atmospherics/binary/volume_pump/on
+/obj/machinery/atmospherics/binary/pump/high_power/on
on = 1
-/obj/machinery/atmospherics/binary/volume_pump/update_icon()
+/obj/machinery/atmospherics/binary/pump/high_power/update_icon()
if(!powered())
icon_state = "off"
else
- icon_state = "[on ? "on" : "off"]"
-
-/obj/machinery/atmospherics/binary/volume_pump/update_underlays()
- if(..())
- underlays.Cut()
- var/turf/T = get_turf(src)
- if(!istype(T))
- return
- add_underlay(T, node1, turn(dir, -180))
- add_underlay(T, node2, dir)
-
-/obj/machinery/atmospherics/binary/volume_pump/hide(var/i)
- update_underlays()
-
-/obj/machinery/atmospherics/binary/volume_pump/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)
-
- air2.merge(removed)
-
- if(network1)
- network1.update = 1
-
- if(network2)
- network2.update = 1
-
- return 1
-
-/obj/machinery/atmospherics/binary/volume_pump/proc/set_frequency(new_frequency)
- radio_controller.remove_object(src, frequency)
- frequency = new_frequency
- if(frequency)
- radio_connection = radio_controller.add_object(src, frequency)
-
-/obj/machinery/atmospherics/binary/volume_pump/proc/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" = "APV",
- "power" = on,
- "transfer_rate" = transfer_rate,
- "sigtype" = "status"
- )
- radio_connection.post_signal(src, signal)
-
- return 1
-
-/obj/machinery/atmospherics/binary/volume_pump/interact(mob/user as mob)
- var/dat = {"Power: [on?"On":"Off"]
- Desirable output flow:
- [round(transfer_rate,1)]l/s | Change
- "}
-
- user << browse("