mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
makes air flow; fixes EVERYTHING
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/obj/machinery/atmospherics/components/binary
|
||||
icon = 'icons/obj/atmospherics/binary_devices.dmi'
|
||||
icon = 'icons/obj/atmospherics/components/binary_devices.dmi'
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH
|
||||
use_power = 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//node1, air1, network1 correspond to output
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator
|
||||
/obj/machinery/atmospherics/components/binary/circulator
|
||||
name = "circulator/heat exchanger"
|
||||
desc = "A gas circulator pump and heat exchanger."
|
||||
icon_state = "circ1-off"
|
||||
@@ -16,7 +16,7 @@
|
||||
density = 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
||||
/obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air()
|
||||
|
||||
var/datum/gas_mixture/air1 = airs["a1"]
|
||||
var/datum/gas_mixture/air2 = airs["a2"]
|
||||
@@ -49,11 +49,11 @@
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/circulator/process_atmos()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/update_icon()
|
||||
/obj/machinery/atmospherics/components/binary/circulator/update_icon()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "circ[side]-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
|
||||
@@ -5,8 +5,8 @@ Acts like a normal vent, but has an input AND output.
|
||||
#define INPUT_MIN 2
|
||||
#define OUTPUT_MAX 4
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump
|
||||
icon = 'icons/obj/atmospherics/unary_devices.dmi' //We reuse the normal vent icons!
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump
|
||||
icon = 'icons/obj/atmospherics/components/unary_devices.dmi' //We reuse the normal vent icons!
|
||||
icon_state = "dpvent_map"
|
||||
|
||||
//node2 is output port
|
||||
@@ -32,23 +32,23 @@ Acts like a normal vent, but has an input AND output.
|
||||
//INPUT_MIN: Do not pass input_pressure_min
|
||||
//OUTPUT_MAX: Do not pass output_pressure_max
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/Destroy()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
|
||||
name = "large dual-port air vent"
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume/New()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
|
||||
..()
|
||||
var/datum/gas_mixture/air1 = airs["a1"] ; air1.volume = 1000
|
||||
var/datum/gas_mixture/air2 = airs["a2"] ; air2.volume = 1000
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon_nopipes()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes()
|
||||
overlays.Cut()
|
||||
if(showpipe)
|
||||
overlays += getpipeimage('icons/obj/atmospherics/unary_devices.dmi', "dpvent_cap")
|
||||
overlays += getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "dpvent_cap")
|
||||
|
||||
if(!on || stat & (NOPOWER|BROKEN))
|
||||
icon_state = "vent_off"
|
||||
@@ -59,7 +59,7 @@ Acts like a normal vent, but has an input AND output.
|
||||
else
|
||||
icon_state = "vent_in"
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
@@ -112,13 +112,13 @@ Acts like a normal vent, but has an input AND output.
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_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, filter = RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
@@ -141,16 +141,16 @@ Acts like a normal vent, but has an input AND output.
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/atmosinit()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/atmosinit()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/initialize()
|
||||
..()
|
||||
broadcast_status()
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/receive_signal(datum/signal/signal)
|
||||
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
@@ -7,7 +7,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate
|
||||
icon_state = "passgate_map"
|
||||
|
||||
name = "passive gate"
|
||||
@@ -22,20 +22,20 @@ Passive gate is similar to the regular pump except:
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/Destroy()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/update_icon_nopipes()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/update_icon_nopipes()
|
||||
if(!on)
|
||||
icon_state = "passgate_off"
|
||||
overlays.Cut()
|
||||
return
|
||||
|
||||
overlays += getpipeimage('icons/obj/atmospherics/binary_devices.dmi', "passgate_on")
|
||||
overlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "passgate_on")
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
@@ -67,13 +67,13 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/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)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
@@ -93,25 +93,25 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
ui = SSnano.push_open_or_new_ui(user, src, ui_key, ui, "atmos_gas_pump.tmpl", name, 400, 120, 0)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/get_ui_data()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/get_ui_data()
|
||||
var/data = list()
|
||||
data["on"] = on
|
||||
data["pressure_set"] = round(target_pressure*100) //Nano UI can't handle rounded non-integers, apparently.
|
||||
data["max_pressure"] = MAX_OUTPUT_PRESSURE
|
||||
return data
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/atmosinit()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/atmosinit()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
@@ -145,7 +145,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -156,7 +156,7 @@ Passive gate is similar to the regular pump except:
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
@@ -173,13 +173,13 @@ Passive gate is similar to the regular pump except:
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/power_change()
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (on)
|
||||
|
||||
@@ -12,7 +12,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
but overall network volume is also increased as this increases...
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump
|
||||
/obj/machinery/atmospherics/components/binary/pump
|
||||
icon_state = "pump_map"
|
||||
name = "gas pump"
|
||||
desc = "A pump"
|
||||
@@ -26,22 +26,22 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Destroy()
|
||||
/obj/machinery/atmospherics/components/binary/pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/on
|
||||
/obj/machinery/atmospherics/components/binary/pump/on
|
||||
on = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/update_icon_nopipes()
|
||||
/obj/machinery/atmospherics/components/binary/pump/update_icon_nopipes()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "pump_off"
|
||||
return
|
||||
|
||||
icon_state = "pump_[on?"on":"off"]"
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/pump/process_atmos()
|
||||
// ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
@@ -71,13 +71,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return 1
|
||||
|
||||
//Radio remote control
|
||||
/obj/machinery/atmospherics/binary/pump/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/components/binary/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, filter = RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/proc/broadcast_status()
|
||||
/obj/machinery/atmospherics/components/binary/pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
@@ -97,25 +97,25 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
ui = SSnano.push_open_or_new_ui(user, src, ui_key, ui, "atmos_gas_pump.tmpl", name, 400, 120, 0)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/get_ui_data()
|
||||
/obj/machinery/atmospherics/components/binary/pump/get_ui_data()
|
||||
var/data = list()
|
||||
data["on"] = on
|
||||
data["pressure_set"] = round(target_pressure*100) //Nano UI can't handle rounded non-integers, apparently.
|
||||
data["max_pressure"] = MAX_OUTPUT_PRESSURE
|
||||
return data
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/atmosinit()
|
||||
/obj/machinery/atmospherics/components/binary/pump/atmosinit()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/atmospherics/components/binary/pump/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
@@ -148,7 +148,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/components/binary/pump/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -159,7 +159,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Topic(href,href_list)
|
||||
/obj/machinery/atmospherics/components/binary/pump/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
@@ -176,11 +176,11 @@ Thus, the two variables affect pump operation are set in New():
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/power_change()
|
||||
/obj/machinery/atmospherics/components/binary/pump/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/components/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve
|
||||
/obj/machinery/atmospherics/components/binary/valve
|
||||
icon_state = "mvalve_map"
|
||||
name = "manual valve"
|
||||
desc = "A pipe valve"
|
||||
@@ -13,39 +13,39 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
var/id = null
|
||||
|
||||
var/open = 0
|
||||
var/type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
|
||||
var/valve_type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/open
|
||||
/obj/machinery/atmospherics/components/binary/valve/open
|
||||
open = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/update_icon_nopipes(animation = 0)
|
||||
/obj/machinery/atmospherics/components/binary/valve/update_icon_nopipes(animation = 0)
|
||||
normalize_dir()
|
||||
if(animation)
|
||||
flick("[type]valve_[open][!open]",src)
|
||||
icon_state = "[type]valve_[open?"on":"off"]"
|
||||
flick("[valve_type]valve_[open][!open]",src)
|
||||
icon_state = "[valve_type]valve_[open?"on":"off"]"
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/proc/open()
|
||||
/obj/machinery/atmospherics/components/binary/valve/proc/open()
|
||||
open = 1
|
||||
update_icon_nopipes()
|
||||
update_parents()
|
||||
var/datum/pipeline/parent1 = parents["p1"] ; parent1.reconcile_air()
|
||||
investigate_log("was opened by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/proc/close()
|
||||
/obj/machinery/atmospherics/components/binary/valve/proc/close()
|
||||
open = 0
|
||||
update_icon_nopipes()
|
||||
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/proc/normalize_dir()
|
||||
/obj/machinery/atmospherics/components/binary/valve/proc/normalize_dir()
|
||||
if(dir==SOUTH)
|
||||
dir = NORTH
|
||||
else if(dir==WEST)
|
||||
dir = EAST
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ai(mob/user)
|
||||
/obj/machinery/atmospherics/components/binary/valve/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_hand(mob/user)
|
||||
/obj/machinery/atmospherics/components/binary/valve/attack_hand(mob/user)
|
||||
add_fingerprint(usr)
|
||||
update_icon_nopipes(1)
|
||||
sleep(10)
|
||||
@@ -54,16 +54,16 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
return
|
||||
open()
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital // can be controlled by AI
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
|
||||
name = "digital valve"
|
||||
desc = "A digitally controlled valve."
|
||||
icon_state = "dvalve_map"
|
||||
type = "d"
|
||||
valve_type = "d"
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user)
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/update_icon_nopipes(animation)
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
|
||||
if(stat & NOPOWER)
|
||||
normalize_dir()
|
||||
icon_state = "dvalve_nopower"
|
||||
|
||||
@@ -12,7 +12,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
but overall network volume is also increased as this increases...
|
||||
*/
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump
|
||||
icon_state = "volpump_map"
|
||||
name = "volumetric gas pump"
|
||||
desc = "A volumetric pump"
|
||||
@@ -26,22 +26,22 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/Destroy()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/on
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/on
|
||||
on = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon_nopipes()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/update_icon_nopipes()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "volpump_off"
|
||||
return
|
||||
|
||||
icon_state = "volpump_[on?"on":"off"]"
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos()
|
||||
// ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
@@ -69,13 +69,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/components/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()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
@@ -94,25 +94,25 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
ui = SSnano.push_open_or_new_ui(user, src, ui_key, ui, "atmos_gas_pump.tmpl", name, 400, 120, 0)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/get_ui_data()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/get_ui_data()
|
||||
var/data = list()
|
||||
data["on"] = on
|
||||
data["transfer_rate"] = round(transfer_rate*100) //Nano UI can't handle rounded non-integers, apparently.
|
||||
data["max_rate"] = MAX_TRANSFER_RATE
|
||||
return data
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/atmosinit()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/atmosinit()
|
||||
..()
|
||||
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/receive_signal(datum/signal/signal)
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
|
||||
@@ -145,7 +145,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
@@ -156,7 +156,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/Topic(href,href_list)
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
@@ -173,13 +173,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/power_change()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
if (!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if (!(stat & NOPOWER) && on)
|
||||
|
||||
Reference in New Issue
Block a user