mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #12870 from SteelSlayer/air-injector-link-fix
Makes radio connections update properly when you change their host machine's frequency
This commit is contained in:
@@ -63,6 +63,12 @@ Pipelines + Other Objects -> Pipe network
|
||||
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)
|
||||
|
||||
@@ -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/proc/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/proc/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/proc/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/proc/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/proc/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
|
||||
|
||||
Executable → Regular
-10
@@ -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_TOXINS
|
||||
/// 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/proc/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)
|
||||
@@ -135,7 +133,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/update_icon()
|
||||
..()
|
||||
|
||||
|
||||
if(!powered())
|
||||
icon_state = "tvalvenopower"
|
||||
|
||||
@@ -150,13 +148,6 @@
|
||||
return
|
||||
..()
|
||||
|
||||
//Radio remote control
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/proc/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,10 +18,7 @@
|
||||
|
||||
var/volume_rate = 50
|
||||
|
||||
var/frequency = 0
|
||||
var/id
|
||||
var/id_tag = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
Mtoollink = 1
|
||||
settagwhitelist = list("id_tag")
|
||||
|
||||
@@ -98,12 +95,6 @@
|
||||
|
||||
flick("inject", src)
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency)
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
@@ -120,7 +111,7 @@
|
||||
"sigtype" = "status"
|
||||
)
|
||||
|
||||
radio_connection.post_signal(src, signal)
|
||||
radio_connection.post_signal(src, signal, RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH
|
||||
layer = TURF_LAYER+0.1
|
||||
|
||||
var/id_tag
|
||||
var/datum/gas_mixture/air_contents
|
||||
|
||||
var/obj/machinery/atmospherics/node
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
var/area/initial_loc
|
||||
var/area_uid
|
||||
var/id_tag = null
|
||||
|
||||
req_one_access_txt = "24;10"
|
||||
|
||||
@@ -40,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
|
||||
@@ -181,7 +179,7 @@
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/unary/vent_pump/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
@@ -233,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))
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
can_unwrench = 1
|
||||
|
||||
var/area/initial_loc
|
||||
var/id_tag = null
|
||||
var/frequency = ATMOS_VENTSCRUB
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
frequency = ATMOS_VENTSCRUB
|
||||
|
||||
var/list/turf/simulated/adjacent_turfs = list()
|
||||
|
||||
@@ -135,7 +134,7 @@
|
||||
else
|
||||
add_underlay(T,, dir)
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, radio_filter_in)
|
||||
|
||||
@@ -83,8 +83,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
|
||||
@@ -113,8 +113,6 @@
|
||||
var/target_temperature = T20C
|
||||
var/regulating_temperature = 0
|
||||
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
var/list/TLV = list()
|
||||
|
||||
var/report_danger_level = TRUE
|
||||
@@ -395,7 +393,7 @@
|
||||
continue
|
||||
send_signal(id_tag, list("status") )
|
||||
|
||||
/obj/machinery/alarm/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/alarm/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_TO_AIRALARM)
|
||||
|
||||
@@ -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,8 +118,7 @@
|
||||
signal.data["sigtype"]="status"
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
|
||||
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
||||
/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)
|
||||
@@ -148,13 +145,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,10 +264,10 @@
|
||||
|
||||
return output
|
||||
|
||||
/obj/machinery/computer/general_air_control/proc/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/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()
|
||||
..()
|
||||
@@ -405,24 +401,29 @@
|
||||
return dat
|
||||
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/linkWith(mob/user, obj/O, list/context)
|
||||
if(context["slot"]=="input" && is_type_in_list(O,input_linkable))
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/linkWith(mob/user, obj/machinery/atmospherics/unary/O, list/context)
|
||||
if(!is_type_in_list(O, input_linkable))
|
||||
return FALSE
|
||||
|
||||
if(context["slot"] == "input")
|
||||
input_tag = O.id_tag
|
||||
input_info = null
|
||||
if(istype(O,/obj/machinery/atmospherics/unary/vent_pump))
|
||||
send_signal(list("tag"=input_tag,
|
||||
"direction"=1, // Release
|
||||
"checks" =0 // No pressure checks.
|
||||
if(istype(O, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
send_signal(list("tag" = input_tag,
|
||||
"direction" = 1, // Release
|
||||
"checks" = 0 // No pressure checks.
|
||||
))
|
||||
return 1
|
||||
if(context["slot"]=="output" && is_type_in_list(O,output_linkable))
|
||||
output_tag = O:id_tag
|
||||
return TRUE
|
||||
|
||||
if(context["slot"] == "output")
|
||||
output_tag = O.id_tag
|
||||
output_info = null
|
||||
if(istype(O,/obj/machinery/atmospherics/unary/vent_pump))
|
||||
send_signal(list("tag"=output_tag,
|
||||
"direction"=0, // Siphon
|
||||
"checks" =2 // Internal pressure checks.
|
||||
if(istype(O, /obj/machinery/atmospherics/unary/vent_pump))
|
||||
send_signal(list("tag" = output_tag,
|
||||
"direction" = 0, // Siphon
|
||||
"checks" = 2 // Internal pressure checks.
|
||||
))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/unlinkFrom(mob/user, obj/O)
|
||||
if("id_tag" in O.vars)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -45,7 +42,7 @@
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/driver_button/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/driver_button/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_LOGIC)
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
@@ -57,7 +56,7 @@
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/computer/atmos_alert/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
receive_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, receive_frequency, RADIO_ATMOSIA)
|
||||
|
||||
@@ -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()
|
||||
@@ -125,7 +123,7 @@
|
||||
send_status(1)
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/door/airlock/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
if(new_frequency)
|
||||
frequency = new_frequency
|
||||
@@ -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
|
||||
@@ -202,7 +198,7 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/airlock_sensor/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/airlock_sensor/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
@@ -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()
|
||||
@@ -275,7 +268,7 @@
|
||||
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
|
||||
flick("access_button_cycle", src)
|
||||
|
||||
/obj/machinery/access_button/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/access_button/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_AIRLOCK)
|
||||
|
||||
@@ -46,9 +46,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()
|
||||
@@ -78,7 +77,7 @@
|
||||
else
|
||||
qdel(signal)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/embedded_controller/radio/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, radio_filter)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -48,7 +46,7 @@
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/light_switch/proc/set_frequency(new_frequency)
|
||||
/obj/machinery/light_switch/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, RADIO_LOGIC)
|
||||
|
||||
@@ -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)
|
||||
@@ -165,6 +169,9 @@ Class Procs:
|
||||
/obj/machinery/proc/locate_machinery()
|
||||
return
|
||||
|
||||
/obj/machinery/proc/set_frequency()
|
||||
return
|
||||
|
||||
/obj/machinery/process() // If you dont use process or power why are you here
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -194,7 +201,7 @@ Class Procs:
|
||||
use_power(active_power_usage,power_channel, 1)
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/multitool_topic(var/mob/user,var/list/href_list,var/obj/O)
|
||||
/obj/machinery/proc/multitool_topic(mob/user, list/href_list, obj/O)
|
||||
if("set_id" in href_list)
|
||||
if(!("id_tag" in vars))
|
||||
warning("set_id: [type] has no id_tag var.")
|
||||
@@ -214,7 +221,7 @@ Class Procs:
|
||||
if(newfreq)
|
||||
if(findtext(num2text(newfreq), "."))
|
||||
newfreq *= 10 // shift the decimal one place
|
||||
src:frequency = sanitize_frequency(newfreq, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
|
||||
set_frequency(sanitize_frequency(newfreq, RADIO_LOW_FREQ, RADIO_HIGH_FREQ))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user