makes air flow; fixes EVERYTHING

This commit is contained in:
duncathan
2015-07-11 18:45:19 -06:00
parent 0e004e3939
commit e074fb7856
58 changed files with 1941 additions and 1939 deletions
@@ -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)