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()
+1 -3
View File
@@ -89,8 +89,8 @@
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
resistance_flags = FIRE_PROOF
siemens_strength = 1
frequency = ATMOS_VENTSCRUB
var/alarm_id = null
var/frequency = ATMOS_VENTSCRUB
//var/skipprocess = 0 //Experimenting
var/alarm_frequency = ATMOS_FIRE_FREQ
var/remote_control = TRUE
@@ -120,8 +120,6 @@
var/target_temperature = T20C
var/regulating_temperature = 0
var/datum/radio_frequency/radio_connection
var/list/TLV = list()
var/report_danger_level = TRUE
+2 -16
View File
@@ -10,7 +10,7 @@
var/bolts = 1
var/id_tag
var/frequency = ATMOS_VENTSCRUB
frequency = ATMOS_VENTSCRUB
Mtoollink = 1
settagwhitelist = list("id_tag")
@@ -25,8 +25,6 @@
// 16 for nitrogen concentration
// 32 for carbon dioxide concentration
var/datum/radio_frequency/radio_connection
/obj/machinery/air_sensor/update_icon()
icon_state = "gsensor[on]"
@@ -120,12 +118,6 @@
signal.data["sigtype"]="status"
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
/obj/machinery/air_sensor/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/air_sensor/Initialize()
..()
SSair.atmos_machinery += src
@@ -148,13 +140,12 @@
name = "Computer"
var/frequency = ATMOS_VENTSCRUB
frequency = ATMOS_VENTSCRUB
var/show_sensors=1
var/list/sensors = list()
Mtoollink = 1
var/list/sensor_information = list()
var/datum/radio_frequency/radio_connection
/obj/machinery/computer/general_air_control/Destroy()
if(SSradio)
@@ -268,11 +259,6 @@
return output
/obj/machinery/computer/general_air_control/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/computer/general_air_control/Initialize()
..()
set_frequency(frequency)
+1 -1
View File
@@ -11,7 +11,7 @@
max_integrity = 150
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 40, "acid" = 0)
power_channel = ENVIRON
var/frequency = ATMOS_DISTRO_FREQ
frequency = ATMOS_DISTRO_FREQ
var/id
var/id_tag
use_power = IDLE_POWER_USE
-3
View File
@@ -18,9 +18,6 @@
active_power_usage = 4
resistance_flags = LAVA_PROOF | FIRE_PROOF
var/range = 7
var/datum/radio_frequency/radio_connection
var/frequency = 0
var/logic_id_tag = "default" //Defines the ID tag to send logic signals to, so you don't have to unlink from doors and stuff
var/logic_connect = 0 //Set this to allow the button to send out logic signals when pressed in addition to normal stuff
@@ -10,7 +10,6 @@
var/list/priority_alarms = list()
var/list/minor_alarms = list()
var/receive_frequency = ATMOS_FIRE_FREQ
var/datum/radio_frequency/radio_connection
/obj/machinery/computer/atmos_alert/Initialize(mapload)
. = ..()
+2 -9
View File
@@ -3,9 +3,7 @@
// This code allows for airlocks to be controlled externally by setting an id_tag and comm frequency (disables ID access)
/obj/machinery/door/airlock
var/id_tag
var/frequency
var/shockedby = list()
var/datum/radio_frequency/radio_connection
var/cur_command = null //the command the door is currently attempting to complete
/obj/machinery/door/airlock/process()
@@ -155,11 +153,9 @@
var/id_tag
var/master_tag
var/frequency = 1379
frequency = 1379
var/command = "cycle"
var/datum/radio_frequency/radio_connection
var/on = 1
var/alert = 0
var/previousPressure
@@ -236,11 +232,8 @@
power_channel = ENVIRON
var/master_tag
var/frequency = AIRLOCK_FREQ
frequency = AIRLOCK_FREQ
var/command = "cycle"
var/datum/radio_frequency/radio_connection
var/on = 1
/obj/machinery/access_button/update_icon()
@@ -49,9 +49,8 @@
var/id_tag
//var/radio_power_use = 50 //power used to xmit signals
var/frequency = 1379
frequency = 1379
var/radio_filter = null
var/datum/radio_frequency/radio_connection
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/machinery/embedded_controller/radio/Initialize()
-2
View File
@@ -13,8 +13,6 @@
// luminosity = 1
settagwhitelist = list("logic_id_tag")
var/light_connect = 1 //Allows the switch to control lights in its associated areas. When set to 0, using the switch won't affect the lights.
var/datum/radio_frequency/radio_connection
var/frequency = 0
var/logic_id_tag = "default" //Defines the ID tag to send logic signals to.
var/logic_connect = 0 //Set this to allow the switch to send out logic signals.
+4
View File
@@ -120,6 +120,10 @@ Class Procs:
var/list/settagwhitelist // (Init this list if needed) WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
atom_say_verb = "beeps"
var/siemens_strength = 0.7 // how badly will it shock you?
/// The frequency on which the machine can communicate. Used with `/datum/radio_frequency`.
var/frequency = NONE
/// A reference to a `datum/radio_frequency`. Gives the machine the ability to interact with things using radio signals.
var/datum/radio_frequency/radio_connection
/obj/machinery/Initialize(mapload)
if(!armor)
+1 -3
View File
@@ -181,7 +181,7 @@
anchored = 1.0
use_power = IDLE_POWER_USE
idle_power_usage = 45
var/frequency = AIRLOCK_FREQ
frequency = AIRLOCK_FREQ
var/code = 0
var/list/magnets = list()
var/title = "Magnetic Control Console"
@@ -195,8 +195,6 @@
var/moving = 0 // 1 if scheduled to loop
var/looping = 0 // 1 if looping
var/datum/radio_frequency/radio_connection
/obj/machinery/magnetic_controller/New()
..()
+1 -1
View File
@@ -30,7 +30,7 @@
var/index1 // display index for scrolling messages or 0 if non-scrolling
var/index2
var/frequency = DISPLAY_FREQ // radio frequency
frequency = DISPLAY_FREQ // radio frequency
var/friendc = 0 // track if Friend Computer mode
var/ignore_friendc = 0