copy and paste be gone

This commit is contained in:
SteelSlayer
2020-10-11 13:16:10 -05:00
parent 9fb9c2d305
commit ea004bddcf
22 changed files with 26 additions and 118 deletions
+8 -2
View File
@@ -62,6 +62,12 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
QDEL_NULL(pipe_image) //we have to qdel it, or it might keep a ref somewhere else
return ..()
/obj/machinery/atmospherics/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
// Icons/overlays/underlays
/obj/machinery/atmospherics/update_icon()
var/turf/T = get_turf(loc)
@@ -197,9 +203,9 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
//You unwrenched a pipe full of pressure? let's splat you into the wall silly.
if(unsafe_wrenching)
if(safefromgusts)
if(safefromgusts)
to_chat(user, "<span class='italics'>Your magboots cling to the floor as a great burst of wind bellows against you.</span>")
else
else
unsafe_pressure_release(user,internal_pressure)
deconstruct(TRUE)
else
@@ -23,9 +23,8 @@
var/input_pressure_min = 0
var/output_pressure_max = 0
var/frequency = ATMOS_VENTSCRUB
frequency = ATMOS_VENTSCRUB
var/id_tag = null
var/datum/radio_frequency/radio_connection
settagwhitelist = list("id_tag")
@@ -160,13 +159,6 @@
air_update_turf()
return 1
//Radio remote control
/obj/machinery/atmospherics/binary/dp_vent_pump/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/dp_vent_pump/proc/broadcast_status()
if(!radio_connection)
return 0
@@ -12,9 +12,7 @@
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/passive_gate/atmos_init()
..()
@@ -69,13 +67,6 @@
parent2.update = 1
return 1
//Radio remote control
/obj/machinery/atmospherics/binary/passive_gate/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/passive_gate/proc/broadcast_status()
if(!radio_connection)
return 0
@@ -24,9 +24,7 @@ Thus, the two variables affect pump operation are set in New():
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/pump/CtrlClick(mob/living/user)
if(!istype(user) || user.incapacitated())
@@ -120,13 +118,6 @@ Thus, the two variables affect pump operation are set in New():
parent2.update = 1
return 1
//Radio remote control
/obj/machinery/atmospherics/binary/pump/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, filter = RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/pump/proc/broadcast_status()
if(!radio_connection)
return 0
@@ -68,9 +68,8 @@
desc = "A digitally controlled valve."
icon = 'icons/atmos/digital_valve.dmi'
var/frequency = ATMOS_VENTSCRUB
frequency = ATMOS_VENTSCRUB
var/id_tag = null
var/datum/radio_frequency/radio_connection
settagwhitelist = list("id_tag")
/obj/machinery/atmospherics/binary/valve/digital/Destroy()
@@ -105,12 +104,6 @@
if(!powered())
icon_state = "valve[open]nopower"
/obj/machinery/atmospherics/binary/valve/digital/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/binary/valve/digital/atmos_init()
..()
if(frequency)
@@ -24,9 +24,7 @@ Thus, the two variables affect pump operation are set in New():
var/on = 0
var/transfer_rate = 200
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/binary/volume_pump/CtrlClick(mob/living/user)
if(!istype(user) || user.incapacitated())
@@ -123,12 +121,6 @@ Thus, the two variables affect pump operation are set in New():
return 1
/obj/machinery/atmospherics/binary/volume_pump/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency)
/obj/machinery/atmospherics/binary/volume_pump/proc/broadcast_status()
if(!radio_connection)
return 0
@@ -21,10 +21,6 @@
var/target_pressure = ONE_ATMOSPHERE
/// The type of gas we want to filter. Valid values that go here are from the `FILTER` defines at the top of the file.
var/filter_type = FILTER_NOTHING
/// The frequency of the filter. Used with `radio_connection`.
var/frequency = NONE
/// A reference to the filter's `datum/radio_frequency`.
var/datum/radio_frequency/radio_connection
/// A list of available filter options. Used with `tgui_data`.
var/list/filter_list = list(
"Nothing" = FILTER_NOTHING,
@@ -85,12 +81,6 @@
icon_state = "mmap"
flipped = 1
/obj/machinery/atmospherics/trinary/filter/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/filter/update_icon()
..()
@@ -104,9 +104,7 @@
desc = "A digitally controlled valve."
icon = 'icons/atmos/digital_tvalve.dmi'
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/trinary/tvalve/digital/Destroy()
if(SSradio)
@@ -150,13 +148,6 @@
return
..()
//Radio remote control
/obj/machinery/atmospherics/trinary/tvalve/digital/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/tvalve/digital/atmos_init()
..()
if(frequency)
@@ -18,9 +18,7 @@
var/volume_rate = 50
var/frequency = 0
var/id
var/datum/radio_frequency/radio_connection
Mtoollink = 1
settagwhitelist = list("id_tag")
@@ -97,12 +95,6 @@
flick("inject", src)
/obj/machinery/atmospherics/unary/outlet_injector/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status()
if(!radio_connection)
return 0
@@ -39,8 +39,7 @@
var/welded = 0 // Added for aliens -- TLE
var/weld_burst_pressure = 50 * ONE_ATMOSPHERE //the (internal) pressure at which welded covers will burst off
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
frequency = ATMOS_VENTSCRUB
Mtoollink = 1
var/radio_filter_out
@@ -232,7 +231,7 @@
radio_filter_out = frequency==ATMOS_VENTSCRUB?(RADIO_TO_AIRALARM):null
if(frequency)
set_frequency(frequency)
src.broadcast_status()
broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
@@ -16,8 +16,7 @@
var/area/initial_loc
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
frequency = ATMOS_VENTSCRUB
var/list/turf/simulated/adjacent_turfs = list()