diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm index f2a2cbc10558..9f7c82e48db2 100644 --- a/code/__DEFINES/radio.dm +++ b/code/__DEFINES/radio.dm @@ -1,5 +1,55 @@ -#define MIN_FREE_FREQ 1201 -#define MAX_FREE_FREQ 1599 +// Radios use a large variety of predefined frequencies. -#define MIN_FREQ 1441 -#define MAX_FREQ 1489 \ No newline at end of file +#define MIN_FREE_FREQ 1201 // ------------------------------------------------- +// Frequencies are always odd numbers and range from 1201 to 1599. + +#define FREQ_SYNDICATE 1213 // Nuke op comms frequency, dark brown +#define FREQ_CTF_RED 1215 // CTF red team comms frequency, red +#define FREQ_CTF_BLUE 1217 // CTF blue team comms frequency, blue +#define FREQ_CENTCOM 1337 // CentCom comms frequency, gray +#define FREQ_SUPPLY 1347 // Supply comms frequency, light brown +#define FREQ_SERVICE 1349 // Service comms frequency, green +#define FREQ_SCIENCE 1351 // Science comms frequency, plum +#define FREQ_COMMAND 1353 // Command comms frequency, gold +#define FREQ_MEDICAL 1355 // Medical comms frequency, soft blue +#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange +#define FREQ_SECURITY 1359 // Security comms frequency, red + +#define FREQ_STATUS_DISPLAYS 1435 +#define FREQ_ATMOS_ALARMS 1437 // air alarms <-> alert computers +#define FREQ_ATMOS_CONTROL 1439 // air alarms <-> vents and scrubbers + +#define MIN_FREQ 1441 // ------------------------------------------------------ +// Only the 1441 to 1489 range is freely available for general conversation. +// This represents 1/8th of the available spectrum. + +#define FREQ_ATMOS_STORAGE 1441 +#define FREQ_NAV_BEACON 1445 +#define FREQ_AI_PRIVATE 1447 // AI private comms frequency, magenta +#define FREQ_PRESSURE_PLATE 1447 +#define FREQ_AIRLOCK_CONTROL 1449 +#define FREQ_ELECTROPACK 1449 +#define FREQ_MAGNETS 1449 +#define FREQ_LOCATOR_IMPLANT 1451 +#define FREQ_SIGNALER 1457 // the default for new signalers +#define FREQ_COMMON 1459 // Common comms frequency, dark green + +#define MAX_FREQ 1489 // ------------------------------------------------------ + +#define MAX_FREE_FREQ 1599 // ------------------------------------------------- + +// Transmission types. +#define TRANSMISSION_WIRE 0 // some sort of wired connection, not used +#define TRANSMISSION_RADIO 1 // electromagnetic radiation (default) +#define TRANSMISSION_SUBSPACE 2 // subspace transmission (headsets only) + +// Filter types, used as an optimization to avoid unnecessary proc calls. +#define RADIO_TO_AIRALARM "to_airalarm" +#define RADIO_FROM_AIRALARM "from_airalarm" +#define RADIO_SIGNALER "signaler" +#define RADIO_ATMOSIA "atmosia" +#define RADIO_NAVBEACONS "navbeacons" +#define RADIO_AIRLOCK "airlock" +#define RADIO_MAGNETS "magnets" + +#define DEFAULT_SIGNALER_CODE 30 diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index 9c4ee107e98f..4d1e66b3014d 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -83,31 +83,31 @@ SUBSYSTEM_DEF(blackbox) if(sealed) return switch(freq) - if(1459) + if(FREQ_COMMON) record_feedback("tally", "radio_usage", 1, "common") - if(GLOB.SCI_FREQ) + if(FREQ_SCIENCE) record_feedback("tally", "radio_usage", 1, "science") - if(GLOB.COMM_FREQ) + if(FREQ_COMMAND) record_feedback("tally", "radio_usage", 1, "command") - if(GLOB.MED_FREQ) + if(FREQ_MEDICAL) record_feedback("tally", "radio_usage", 1, "medical") - if(GLOB.ENG_FREQ) + if(FREQ_ENGINEERING) record_feedback("tally", "radio_usage", 1, "engineering") - if(GLOB.SEC_FREQ) + if(FREQ_SECURITY) record_feedback("tally", "radio_usage", 1, "security") - if(GLOB.SYND_FREQ) + if(FREQ_SYNDICATE) record_feedback("tally", "radio_usage", 1, "syndicate") - if(GLOB.SERV_FREQ) + if(FREQ_SERVICE) record_feedback("tally", "radio_usage", 1, "service") - if(GLOB.SUPP_FREQ) + if(FREQ_SUPPLY) record_feedback("tally", "radio_usage", 1, "supply") - if(GLOB.CENTCOM_FREQ) + if(FREQ_CENTCOM) record_feedback("tally", "radio_usage", 1, "centcom") - if(GLOB.AIPRIV_FREQ) + if(FREQ_AI_PRIVATE) record_feedback("tally", "radio_usage", 1, "ai private") - if(GLOB.REDTEAM_FREQ) + if(FREQ_CTF_RED) record_feedback("tally", "radio_usage", 1, "CTF red team") - if(GLOB.BLUETEAM_FREQ) + if(FREQ_CTF_BLUE) record_feedback("tally", "radio_usage", 1, "CTF blue team") else record_feedback("tally", "radio_usage", 1, "other") diff --git a/code/datums/weather/weather_types/radiation_storm.dm b/code/datums/weather/weather_types/radiation_storm.dm index 76c3aab14d0e..92f820df6d5b 100644 --- a/code/datums/weather/weather_types/radiation_storm.dm +++ b/code/datums/weather/weather_types/radiation_storm.dm @@ -52,7 +52,7 @@ status_alarm() /datum/weather/rad_storm/proc/status_alarm(command) //Makes the status displays show the radiation warning for those who missed the announcement. - var/datum/radio_frequency/frequency = SSradio.return_frequency(1435) + var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS) if(!frequency) return @@ -60,7 +60,7 @@ var/datum/signal/status_signal = new var/atom/movable/virtualspeaker/virt = new /atom/movable/virtualspeaker(null) status_signal.source = virt - status_signal.transmission_method = 1 + status_signal.transmission_method = TRANSMISSION_RADIO status_signal.data["command"] = "shuttle" if(command == "alert") diff --git a/code/game/communications.dm b/code/game/communications.dm index d60a5d83015b..ec537da7a64f 100644 --- a/code/game/communications.dm +++ b/code/game/communications.dm @@ -86,101 +86,42 @@ GLOBAL_LIST_EMPTY(all_radios) for(var/freq in GLOB.all_radios) GLOB.all_radios["[freq]"] -= radio -/* -Frequency range: 1200 to 1600 -Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency, even during mapmaking) - -Radio: -1459 - standard radio chat -1351 - Science -1353 - Command -1355 - Medical -1357 - Engineering -1359 - Security -1337 - death squad -1443 - Confession Intercom -1349 - Miners -1347 - Cargo techs -1447 - AI Private - -Devices: -1451 - tracking implant -1457 - RSD default - -On the map: -1311 for prison shuttle console (in fact, it is not used) -1435 for status displays -1437 for atmospherics/fire alerts -1439 for engine components -1439 for air pumps, air scrubbers, atmo control -1441 for atmospherics - supply tanks -1443 for atmospherics - distribution loop/mixed air tank -1445 for bot nav beacons -1447 for mulebot, secbot and ed209 control -1449 for airlock controls, electropack, magnets -1451 for toxin lab access -1453 for engineering access -1455 for AI access -*/ +// For information on what objects or departments use what frequencies, +// see __DEFINES/radio.dm. Mappers may also select additional frequencies for +// use in maps, such as in intercoms. GLOBAL_LIST_INIT(radiochannels, list( - "Common" = 1459, - "Science" = 1351, - "Command" = 1353, - "Medical" = 1355, - "Engineering" = 1357, - "Security" = 1359, - "CentCom" = 1337, - "Syndicate" = 1213, - "Supply" = 1347, - "Service" = 1349, - "AI Private" = 1447, - "Red Team" = 1215, - "Blue Team" = 1217 + "Common" = FREQ_COMMON, + "Science" = FREQ_SCIENCE, + "Command" = FREQ_COMMAND, + "Medical" = FREQ_MEDICAL, + "Engineering" = FREQ_ENGINEERING, + "Security" = FREQ_SECURITY, + "CentCom" = FREQ_CENTCOM, + "Syndicate" = FREQ_SYNDICATE, + "Supply" = FREQ_SUPPLY, + "Service" = FREQ_SERVICE, + "AI Private" = FREQ_AI_PRIVATE, + "Red Team" = FREQ_CTF_RED, + "Blue Team" = FREQ_CTF_BLUE )) GLOBAL_LIST_INIT(reverseradiochannels, list( - "1459" = "Common", - "1351" = "Science", - "1353" = "Command", - "1355" = "Medical", - "1357" = "Engineering", - "1359" = "Security", - "1337" = "CentCom", - "1213" = "Syndicate", - "1347" = "Supply", - "1349" = "Service", - "1447" = "AI Private", - "1215" = "Red Team", - "1217" = "Blue Team" + "[FREQ_COMMON]" = "Common", + "[FREQ_SCIENCE]" = "Science", + "[FREQ_COMMAND]" = "Command", + "[FREQ_MEDICAL]" = "Medical", + "[FREQ_ENGINEERING]" = "Engineering", + "[FREQ_SECURITY]" = "Security", + "[FREQ_CENTCOM]" = "CentCom", + "[FREQ_SYNDICATE]" = "Syndicate", + "[FREQ_SUPPLY]" = "Supply", + "[FREQ_SERVICE]" = "Service", + "[FREQ_AI_PRIVATE]" = "AI Private", + "[FREQ_CTF_RED]" = "Red Team", + "[FREQ_CTF_BLUE]" = "Blue Team" )) -//depenging helpers -GLOBAL_VAR_CONST(SYND_FREQ, 1213) //nuke op frequency, coloured dark brown in chat window -GLOBAL_VAR_CONST(SUPP_FREQ, 1347) //supply, coloured light brown in chat window -GLOBAL_VAR_CONST(SERV_FREQ, 1349) //service, coloured green in chat window -GLOBAL_VAR_CONST(SCI_FREQ, 1351) //science, coloured plum in chat window -GLOBAL_VAR_CONST(COMM_FREQ, 1353) //command, colored gold in chat window -GLOBAL_VAR_CONST(MED_FREQ, 1355) //medical, coloured blue in chat window -GLOBAL_VAR_CONST(ENG_FREQ, 1357) //engineering, coloured orange in chat window -GLOBAL_VAR_CONST(SEC_FREQ, 1359) //security, coloured red in chat window -GLOBAL_VAR_CONST(CENTCOM_FREQ, 1337) //centcom frequency, coloured grey in chat window -GLOBAL_VAR_CONST(AIPRIV_FREQ, 1447) //AI private, colored magenta in chat window -GLOBAL_VAR_CONST(REDTEAM_FREQ, 1215) // red team (CTF) frequency, coloured red -GLOBAL_VAR_CONST(BLUETEAM_FREQ, 1217) // blue team (CTF) frequency, coloured blue - -#define TRANSMISSION_WIRE 0 -#define TRANSMISSION_RADIO 1 - -/* filters */ -GLOBAL_VAR_INIT(RADIO_TO_AIRALARM, "1") -GLOBAL_VAR_INIT(RADIO_FROM_AIRALARM, "2") -GLOBAL_VAR_INIT(RADIO_CHAT, "3") //deprecated -GLOBAL_VAR_INIT(RADIO_ATMOSIA, "4") -GLOBAL_VAR_INIT(RADIO_NAVBEACONS, "5") -GLOBAL_VAR_INIT(RADIO_AIRLOCK, "6") -GLOBAL_VAR_INIT(RADIO_MAGNETS, "9") - /datum/radio_frequency var/frequency as num @@ -240,48 +181,18 @@ GLOBAL_VAR_INIT(RADIO_MAGNETS, "9") devices -= devices_filter - - - -/client/proc/print_pointers() - set name = "Debug Signals" - set category = "Debug" - - if(!holder) - return - - var/datum/signal/S - to_chat(src, "There are [S.pointers.len] pointers:") - for(var/p in S.pointers) - to_chat(src, p) - S = locate(p) - if(istype(S)) - to_chat(src, S.debug_print()) - /obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param) return /datum/signal var/obj/source - var/transmission_method = 0 - //0 = wire - //1 = radio transmission - //2 = subspace transmission + var/transmission_method = TRANSMISSION_WIRE var/data = list() var/encryption var/frequency = 0 - var/static/list/pointers = list() - -/datum/signal/New() - ..() - pointers += "[REF(src)]" - -/datum/signal/Destroy() - pointers -= "[REF(src)]" - return ..() /datum/signal/proc/copy_from(datum/signal/model) source = model.source diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 6f6e8cfaa3b5..a5b1ea1d8bc7 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -150,8 +150,8 @@ /datum/outfit/syndicate/post_equip(mob/living/carbon/human/H) var/obj/item/device/radio/R = H.ears - R.set_frequency(GLOB.SYND_FREQ) - R.freqlock = 1 + R.set_frequency(FREQ_SYNDICATE) + R.freqlock = TRUE if(command_radio) R.command = TRUE diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index 2f89993fdbfe..f854ea84ac48 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -53,14 +53,14 @@ /obj/machinery/door/airlock/proc/send_status() if(radio_connection) var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data["tag"] = id_tag signal.data["timestamp"] = world.time signal.data["door_status"] = density?("closed"):("open") signal.data["lock_status"] = locked?("locked"):("unlocked") - radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = GLOB.RADIO_AIRLOCK) + radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) /obj/machinery/door/airlock/open(surpress_send) @@ -79,10 +79,10 @@ SSradio.remove_object(src, frequency) if(new_frequency) frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_AIRLOCK) + radio_connection = SSradio.add_object(src, frequency, RADIO_AIRLOCK) /obj/machinery/door/airlock/Destroy() - if(frequency && SSradio) + if(frequency) SSradio.remove_object(src,frequency) return ..() @@ -97,7 +97,7 @@ var/id_tag var/master_tag - var/frequency = 1449 + var/frequency = FREQ_AIRLOCK_CONTROL var/datum/radio_frequency/radio_connection @@ -116,17 +116,17 @@ /obj/machinery/airlock_sensor/attack_hand(mob/user) var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data["tag"] = master_tag signal.data["command"] = "cycle" - radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = GLOB.RADIO_AIRLOCK) + radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) flick("airlock_sensor_cycle", src) /obj/machinery/airlock_sensor/process() if(on) var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data["tag"] = id_tag signal.data["timestamp"] = world.time @@ -137,14 +137,14 @@ signal.data["pressure"] = num2text(pressure) - radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = GLOB.RADIO_AIRLOCK) + radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK) update_icon() /obj/machinery/airlock_sensor/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_AIRLOCK) + radio_connection = SSradio.add_object(src, frequency, RADIO_AIRLOCK) /obj/machinery/airlock_sensor/Initialize() . = ..() diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index f5115c7e2a15..6aa4c1495ede 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -6,7 +6,7 @@ icon_keyboard = "atmos_key" var/list/priority_alarms = list() var/list/minor_alarms = list() - var/receive_frequency = 1437 + var/receive_frequency = FREQ_ATMOS_ALARMS var/datum/radio_frequency/radio_connection light_color = LIGHT_COLOR_CYAN @@ -57,7 +57,7 @@ /obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency) SSradio.remove_object(src, receive_frequency) receive_frequency = new_frequency - radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA) + radio_connection = SSradio.add_object(src, receive_frequency, RADIO_ATMOSIA) /obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal) if(!signal || signal.encryption) diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm index 5c993f0bdeab..a11670105099 100644 --- a/code/game/machinery/computer/atmos_control.dm +++ b/code/game/machinery/computer/atmos_control.dm @@ -11,7 +11,7 @@ var/on = TRUE var/id_tag - var/frequency = 1441 + var/frequency = FREQ_ATMOS_STORAGE var/datum/radio_frequency/radio_connection /obj/machinery/air_sensor/update_icon() @@ -22,7 +22,7 @@ var/datum/signal/signal = new var/datum/gas_mixture/air_sample = return_air() - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data = list( "sigtype" = "status", "id_tag" = id_tag, @@ -37,13 +37,13 @@ var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME] signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100 - radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA) + radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) /obj/machinery/air_sensor/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA) + radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA) /obj/machinery/air_sensor/Initialize() . = ..() @@ -66,7 +66,7 @@ icon_keyboard = "atmos_key" circuit = /obj/item/circuitboard/computer/atmos_control - var/frequency = 1441 + var/frequency = FREQ_ATMOS_STORAGE var/list/sensors = list( "n2_sensor" = "Nitrogen Tank", "o2_sensor" = "Oxygen Tank", @@ -129,7 +129,7 @@ /obj/machinery/computer/atmos_control/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA) + radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA) ///////////////////////////////////////////////////////////// // LARGE TANK CONTROL @@ -138,7 +138,7 @@ /obj/machinery/computer/atmos_control/tank var/input_tag var/output_tag - frequency = 1441 + frequency = FREQ_ATMOS_STORAGE circuit = /obj/item/circuitboard/computer/atmos_control/tank var/list/input_info @@ -147,7 +147,7 @@ // This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this /obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user) var/list/IO = list() - var/datum/radio_frequency/freq = SSradio.return_frequency(1441) + var/datum/radio_frequency/freq = SSradio.return_frequency(FREQ_ATMOS_STORAGE) var/list/devices = freq.devices["_default"] for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices) var/list/text = splittext(U.id_tag, "_") @@ -195,7 +195,7 @@ if(..() || !radio_connection) return var/datum/signal/signal = new - signal.transmission_method = 1 + signal.transmission_method = TRANSMISSION_RADIO signal.source = src signal.data = list("sigtype" = "command") switch(action) @@ -214,7 +214,7 @@ target = Clamp(target, 0, 50 * ONE_ATMOSPHERE) signal.data += list("tag" = output_tag, "set_internal_pressure" = target) . = TRUE - radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA) + radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA) /obj/machinery/computer/atmos_control/tank/receive_signal(datum/signal/signal) if(!signal || signal.encryption) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 6223011736bf..d410e06594a0 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -28,7 +28,6 @@ var/const/STATE_TOGGLE_EMERGENCY = 10 var/const/STATE_PURCHASE = 11 - var/status_display_freq = "1435" var/stat_msg1 var/stat_msg2 @@ -228,7 +227,7 @@ log_game("[key_name(usr)] answered [currmsg.title] comm message. Answer : [currmsg.answered]") if(currmsg) currmsg.answer_callback.Invoke() - + state = STATE_VIEWMESSAGE if("status") state = STATE_STATUSDISPLAY @@ -693,14 +692,14 @@ /obj/machinery/computer/communications/proc/post_status(command, data1, data2) - var/datum/radio_frequency/frequency = SSradio.return_frequency(1435) + var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS) if(!frequency) return var/datum/signal/status_signal = new status_signal.source = src - status_signal.transmission_method = 1 + status_signal.transmission_method = TRANSMISSION_RADIO status_signal.data["command"] = command switch(command) diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm index ce7edeb31d3d..86da30429ee1 100644 --- a/code/game/machinery/doors/alarmlock.dm +++ b/code/game/machinery/doors/alarmlock.dm @@ -8,7 +8,7 @@ glass = TRUE var/datum/radio_frequency/air_connection - var/air_frequency = 1437 + var/air_frequency = FREQ_ATMOS_ALARMS autoclose = FALSE /obj/machinery/door/airlock/alarmlock/New() @@ -23,7 +23,7 @@ /obj/machinery/door/airlock/alarmlock/Initialize() . = ..() SSradio.remove_object(src, air_frequency) - air_connection = SSradio.add_object(src, air_frequency, GLOB.RADIO_TO_AIRALARM) + air_connection = SSradio.add_object(src, air_frequency, RADIO_TO_AIRALARM) open() /obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 4c0d4a1804a9..9097d1bd3c0f 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -112,8 +112,8 @@ return 0 if(!forced) - Radio.set_frequency(GLOB.SEC_FREQ) - Radio.talk_into(src, "Timer has expired. Releasing prisoner.", GLOB.SEC_FREQ, get_default_language()) + Radio.set_frequency(FREQ_SECURITY) + Radio.talk_into(src, "Timer has expired. Releasing prisoner.", FREQ_SECURITY, get_default_language()) timing = FALSE activation_time = null diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index 2ec4a7c4b05b..73ee58fc08ce 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -160,7 +160,7 @@ process_again = 1 else var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data = list( "tag" = airpump_tag, "sigtype"="command" @@ -209,7 +209,7 @@ name = "airlock console" density = FALSE - frequency = 1449 + frequency = FREQ_AIRLOCK_CONTROL power_channel = ENVIRON // Setup parameters only diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index af945c7ccb6d..fbc0b65b0be6 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -25,7 +25,7 @@ if("vent_clear") var/datum/signal/signal = new - signal.transmission_method = 1 //radio signal + signal.transmission_method = TRANSMISSION_RADIO signal.data = list( "tag" = airpump_tag, "sigtype"="command" @@ -45,7 +45,7 @@ name = "vent controller" density = FALSE - frequency = 1229 + frequency = FREQ_ATMOS_CONTROL power_channel = ENVIRON // Setup parameters only diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index b32adcdc26be..8c11180ee6ee 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -15,7 +15,7 @@ use_power = IDLE_POWER_USE idle_power_usage = 50 - var/freq = 1449 // radio frequency + var/freq = FREQ_MAGNETS // radio frequency var/electricity_level = 1 // intensity of the magnetic pull var/magnetic_field = 1 // the range of magnetic attraction var/code = 0 // frequency code, they should be different unless you have a group of magnets working together or something @@ -33,7 +33,7 @@ var/turf/T = loc hide(T.intact) center = T - SSradio.add_object(src, freq, GLOB.RADIO_MAGNETS) + SSradio.add_object(src, freq, RADIO_MAGNETS) return INITIALIZE_HINT_LATELOAD /obj/machinery/magnetic_module/LateInitialize() @@ -198,7 +198,7 @@ anchored = TRUE use_power = IDLE_POWER_USE idle_power_usage = 45 - var/frequency = 1449 + var/frequency = FREQ_MAGNETS var/code = 0 var/list/magnets = list() var/title = "Magnetic Control Console" @@ -224,7 +224,7 @@ if(path) // check for default path filter_path() // renders rpath - radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_MAGNETS) + radio_connection = SSradio.add_object(src, frequency, RADIO_MAGNETS) /obj/machinery/magnetic_controller/Destroy() SSradio.remove_object(src, frequency) @@ -279,7 +279,7 @@ // Prepare signal beforehand, because this is a radio operation var/datum/signal/signal = new - signal.transmission_method = 1 // radio transmission + signal.transmission_method = TRANSMISSION_RADIO signal.source = src signal.frequency = frequency signal.data["code"] = code @@ -302,7 +302,7 @@ // Broadcast the signal - radio_connection.post_signal(src, signal, filter = GLOB.RADIO_MAGNETS) + radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS) spawn(1) updateUsrDialog() // pretty sure this increases responsiveness @@ -346,7 +346,7 @@ // Prepare the radio signal var/datum/signal/signal = new - signal.transmission_method = 1 // radio transmission + signal.transmission_method = TRANSMISSION_RADIO signal.source = src signal.frequency = frequency signal.data["code"] = code @@ -370,7 +370,7 @@ // Broadcast the signal spawn() - radio_connection.post_signal(src, signal, filter = GLOB.RADIO_MAGNETS) + radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS) if(speed == 10) sleep(1) diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm index 2879ea9b542c..fe2926f1501a 100644 --- a/code/game/machinery/navbeacon.dm +++ b/code/game/machinery/navbeacon.dm @@ -15,7 +15,7 @@ var/open = FALSE // true if cover is open var/locked = TRUE // true if controls are locked - var/freq = 1445 // radio frequency + var/freq = FREQ_NAV_BEACON var/location = "" // location response text var/list/codes // assoc. list of transponder codes var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value" diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index f0e6eb2df045..827093d759e4 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -315,13 +315,13 @@ GLOBAL_LIST_EMPTY(allConsoles) var/radio_freq switch(text2num(href_list["emergency"])) if(1) //Security - radio_freq = GLOB.SEC_FREQ + radio_freq = FREQ_SECURITY emergency = "Security" if(2) //Engineering - radio_freq = GLOB.ENG_FREQ + radio_freq = FREQ_ENGINEERING emergency = "Engineering" if(3) //Medical - radio_freq = GLOB.MED_FREQ + radio_freq = FREQ_MEDICAL emergency = "Medical" if(radio_freq) Radio.set_frequency(radio_freq) @@ -352,17 +352,17 @@ GLOBAL_LIST_EMPTY(allConsoles) var/radio_freq = 0 switch(href_list["department"]) if("bridge") - radio_freq = GLOB.COMM_FREQ + radio_freq = FREQ_COMMAND if("medbay") - radio_freq = GLOB.MED_FREQ + radio_freq = FREQ_MEDICAL if("science") - radio_freq = GLOB.SCI_FREQ + radio_freq = FREQ_SCIENCE if("engineering") - radio_freq = GLOB.ENG_FREQ + radio_freq = FREQ_ENGINEERING if("security") - radio_freq = GLOB.SEC_FREQ + radio_freq = FREQ_SECURITY if("cargobay" || "mining") - radio_freq = GLOB.SUPP_FREQ + radio_freq = FREQ_SUPPLY Radio.set_frequency(radio_freq) var/authentic if(msgVerified || msgStamped) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 83681475fd41..edcf422b5839 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -32,7 +32,7 @@ var/index1 // display index for scrolling messages or 0 if non-scrolling var/index2 - var/frequency = 1435 // radio frequency + var/frequency = FREQ_STATUS_DISPLAYS var/supply_display = 0 // true if a supply shuttle display var/shuttle_id // Id used for "generic shuttle timer" mode diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index aebccdddd2e3..6451af068431 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -121,8 +121,8 @@ radios += R var/freqtext = num2text(freq) - for(var/obj/item/device/radio/R in GLOB.all_radios["[GLOB.SYND_FREQ]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving. - if(R.receive_range(GLOB.SYND_FREQ, list(R.z)) > -1 && freqtext in GLOB.reverseradiochannels) + for(var/obj/item/device/radio/R in GLOB.all_radios["[FREQ_SYNDICATE]"]) //syndicate radios use magic that allows them to hear everything. this was already the case, now it just doesn't need the allinone anymore. solves annoying bugs that aren't worth solving. + if(R.receive_range(FREQ_SYNDICATE, list(R.z)) > -1 && freqtext in GLOB.reverseradiochannels) radios |= R // Get a list of mobs who can hear from the radios we collected. @@ -159,7 +159,7 @@ // First, we want to generate a new radio signal var/datum/signal/signal = new - signal.transmission_method = 2 // 2 would be a subspace transmission. + signal.transmission_method = TRANSMISSION_SUBSPACE var/turf/pos = get_turf(src) // --- Finally, tag the actual signal with the appropriate values --- @@ -173,7 +173,7 @@ "done" = 0, "level" = pos.z // The level it is being broadcasted at. ) - signal.frequency = 1459// Common channel + signal.frequency = FREQ_COMMON //#### Sending the signal to all subspace receivers ####// for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 74774f2670b6..9cbe8689fc06 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -234,7 +234,7 @@ if(newfreq && canAccess(usr)) if(findtext(num2text(newfreq), ".")) newfreq *= 10 // shift the decimal one place - if(newfreq == GLOB.SYND_FREQ) + if(newfreq == FREQ_SYNDICATE) temp = "-% Error: Interference preventing filtering frequency: \"[newfreq] GHz\" %-" else if(!(newfreq in freq_listening) && newfreq < 10000) diff --git a/code/game/machinery/telecomms/machines/allinone.dm b/code/game/machinery/telecomms/machines/allinone.dm index f881e18d3572..b08e2c205608 100644 --- a/code/game/machinery/telecomms/machines/allinone.dm +++ b/code/game/machinery/telecomms/machines/allinone.dm @@ -36,12 +36,12 @@ /* ###### Copy all syndie communications to the Syndicate Frequency ###### */ - if(intercept && signal.frequency == GLOB.SYND_FREQ) + if(intercept && signal.frequency == FREQ_SYNDICATE) Broadcast_Message(signal.data["mob"], signal.data["vmask"], signal.data["radio"], signal.data["message"], signal.data["name"], signal.data["job"], - signal.data["realname"],, signal.data["compression"], list(0, z), GLOB.SYND_FREQ, signal.data["spans"], + signal.data["realname"],, signal.data["compression"], list(0, z), FREQ_SYNDICATE, signal.data["spans"], signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"], signal.data["language"]) /* ###### Broadcast a message using signal.data ###### */ diff --git a/code/game/machinery/telecomms/machines/bus.dm b/code/game/machinery/telecomms/machines/bus.dm index 252a285d2a3b..d05c4f34f841 100644 --- a/code/game/machinery/telecomms/machines/bus.dm +++ b/code/game/machinery/telecomms/machines/bus.dm @@ -25,7 +25,7 @@ if(is_freq_listening(signal)) if(change_frequency) - if(signal.frequency != GLOB.SYND_FREQ) + if(signal.frequency != FREQ_SYNDICATE) signal.frequency = change_frequency if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it @@ -54,30 +54,30 @@ /obj/machinery/telecomms/bus/preset_one id = "Bus 1" network = "tcommsat" - freq_listening = list(GLOB.SCI_FREQ, GLOB.MED_FREQ) + freq_listening = list(FREQ_SCIENCE, FREQ_MEDICAL) autolinkers = list("processor1", "science", "medical") /obj/machinery/telecomms/bus/preset_two id = "Bus 2" network = "tcommsat" - freq_listening = list(GLOB.SUPP_FREQ,GLOB.SERV_FREQ) + freq_listening = list(FREQ_SUPPLY, FREQ_SERVICE) autolinkers = list("processor2", "supply", "service") /obj/machinery/telecomms/bus/preset_three id = "Bus 3" network = "tcommsat" - freq_listening = list(GLOB.SEC_FREQ, GLOB.COMM_FREQ) + freq_listening = list(FREQ_SECURITY, FREQ_COMMAND) autolinkers = list("processor3", "security", "command") /obj/machinery/telecomms/bus/preset_four id = "Bus 4" network = "tcommsat" - freq_listening = list(GLOB.ENG_FREQ) + freq_listening = list(FREQ_ENGINEERING) autolinkers = list("processor4", "engineering", "common") /obj/machinery/telecomms/bus/preset_four/Initialize() . = ..() - for(var/i = 1441, i < 1489, i += 2) + for(var/i = MIN_FREQ, i <= MAX_FREQ, i += 2) freq_listening |= i /obj/machinery/telecomms/bus/preset_one/birdstation diff --git a/code/game/machinery/telecomms/machines/receiver.dm b/code/game/machinery/telecomms/machines/receiver.dm index 79ab12587856..8dab3b41f429 100644 --- a/code/game/machinery/telecomms/machines/receiver.dm +++ b/code/game/machinery/telecomms/machines/receiver.dm @@ -26,7 +26,7 @@ return if(!check_receive_level(signal)) return - if(signal.transmission_method == 2) + if(signal.transmission_method == TRANSMISSION_SUBSPACE) if(is_freq_listening(signal)) // detect subspace signals @@ -58,7 +58,7 @@ id = "Receiver A" network = "tcommsat" autolinkers = list("receiverA") // link to relay - freq_listening = list(GLOB.SCI_FREQ, GLOB.MED_FREQ, GLOB.SUPP_FREQ, GLOB.SERV_FREQ) // science, medical, supply, service + freq_listening = list(FREQ_SCIENCE, FREQ_MEDICAL, FREQ_SUPPLY, FREQ_SERVICE) //--PRESET RIGHT--// @@ -67,12 +67,12 @@ id = "Receiver B" network = "tcommsat" autolinkers = list("receiverB") // link to relay - freq_listening = list(GLOB.COMM_FREQ, GLOB.ENG_FREQ, GLOB.SEC_FREQ) //command, engineering, security + freq_listening = list(FREQ_COMMAND, FREQ_ENGINEERING, FREQ_SECURITY) //Common and other radio frequencies for people to freely use /obj/machinery/telecomms/receiver/preset_right/Initialize() . = ..() - for(var/i = 1441, i < 1489, i += 2) + for(var/i = MIN_FREQ, i <= MAX_FREQ, i += 2) freq_listening |= i /obj/machinery/telecomms/receiver/preset_left/birdstation diff --git a/code/game/machinery/telecomms/machines/server.dm b/code/game/machinery/telecomms/machines/server.dm index a328333b367e..ad7400137eca 100644 --- a/code/game/machinery/telecomms/machines/server.dm +++ b/code/game/machinery/telecomms/machines/server.dm @@ -131,22 +131,22 @@ /obj/machinery/telecomms/server/presets/science id = "Science Server" - freq_listening = list(GLOB.SCI_FREQ) + freq_listening = list(FREQ_SCIENCE) autolinkers = list("science") /obj/machinery/telecomms/server/presets/medical id = "Medical Server" - freq_listening = list(GLOB.MED_FREQ) + freq_listening = list(FREQ_MEDICAL) autolinkers = list("medical") /obj/machinery/telecomms/server/presets/supply id = "Supply Server" - freq_listening = list(GLOB.SUPP_FREQ) + freq_listening = list(FREQ_SUPPLY) autolinkers = list("supply") /obj/machinery/telecomms/server/presets/service id = "Service Server" - freq_listening = list(GLOB.SERV_FREQ) + freq_listening = list(FREQ_SERVICE) autolinkers = list("service") /obj/machinery/telecomms/server/presets/common @@ -154,26 +154,25 @@ freq_listening = list() autolinkers = list("common") - //Common and other radio frequencies for people to freely use - // 1441 to 1489 +//Common and other radio frequencies for people to freely use /obj/machinery/telecomms/server/presets/common/Initialize() . = ..() - for(var/i = 1441, i < 1489, i += 2) + for(var/i = MIN_FREQ, i <= MAX_FREQ, i += 2) freq_listening |= i /obj/machinery/telecomms/server/presets/command id = "Command Server" - freq_listening = list(GLOB.COMM_FREQ) + freq_listening = list(FREQ_COMMAND) autolinkers = list("command") /obj/machinery/telecomms/server/presets/engineering id = "Engineering Server" - freq_listening = list(GLOB.ENG_FREQ) + freq_listening = list(FREQ_ENGINEERING) autolinkers = list("engineering") /obj/machinery/telecomms/server/presets/security id = "Security Server" - freq_listening = list(GLOB.SEC_FREQ) + freq_listening = list(FREQ_SECURITY) autolinkers = list("security") /obj/machinery/telecomms/server/presets/common/birdstation/Initialize() diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 62f53f73ad26..80d1cefaf98f 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -61,7 +61,7 @@ GLOBAL_LIST_EMPTY(telecomms_list) var/datum/signal/copy = new if(copysig) - copy.transmission_method = 2 + copy.transmission_method = TRANSMISSION_SUBSPACE copy.frequency = signal.frequency // Copy the main data contents! Workaround for some nasty bug where the actual array memory is copied and not its contents. copy.data = list( diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 54b44f89f948..4c1bceca284d 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -284,7 +284,7 @@ if(href_list["rfreq"]) var/new_frequency = (radio.frequency + afilter.getNum("rfreq")) - if (!radio.freerange || (radio.frequency < 1200 || radio.frequency > 1600)) + if (!radio.freerange || (radio.frequency < MIN_FREE_FREQ || radio.frequency > MAX_FREE_FREQ)) new_frequency = sanitize_frequency(new_frequency) radio.set_frequency(new_frequency) send_byjax(src.occupant,"exosuit.browser","rfreq","[format_frequency(radio.frequency)]") diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index e471efcf96de..1e08c2e67a2f 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -27,7 +27,7 @@ aSignal.name = "[name] core" aSignal.code = rand(1,100) - aSignal.frequency = rand(1200, 1599) + aSignal.frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ) if(IsMultiple(aSignal.frequency, 2))//signaller frequencies are always uneven! aSignal.frequency++ diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index ce2d5b6bf868..4f55864e4db7 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -192,14 +192,14 @@ /obj/item/cartridge/proc/post_status(command, data1, data2) - var/datum/radio_frequency/frequency = SSradio.return_frequency(1435) + var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS) if(!frequency) return var/datum/signal/status_signal = new status_signal.source = src - status_signal.transmission_method = 1 + status_signal.transmission_method = TRANSMISSION_RADIO status_signal.data["command"] = command switch(command) diff --git a/code/game/objects/items/devices/PDA/radio.dm b/code/game/objects/items/devices/PDA/radio.dm index 2c4fc8fa488d..4cd8a3cb77cd 100644 --- a/code/game/objects/items/devices/PDA/radio.dm +++ b/code/game/objects/items/devices/PDA/radio.dm @@ -19,8 +19,8 @@ /obj/item/radio/integrated/signal - var/frequency = 1457 - var/code = 30 + var/frequency = FREQ_SIGNALER + var/code = DEFAULT_SIGNALER_CODE var/last_transmission var/datum/radio_frequency/radio_connection @@ -31,7 +31,7 @@ /obj/item/radio/integrated/signal/Initialize() . = ..() - if (src.frequency < 1200 || src.frequency > 1600) + if (src.frequency < MIN_FREE_FREQ || src.frequency > MAX_FREE_FREQ) src.frequency = sanitize_frequency(src.frequency) set_frequency(frequency) @@ -39,7 +39,7 @@ /obj/item/radio/integrated/signal/proc/set_frequency(new_frequency) SSradio.remove_object(src, frequency) frequency = new_frequency - radio_connection = SSradio.add_object(src, frequency) + radio_connection = SSradio.add_object(src, frequency, RADIO_SIGNALER) /obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE") diff --git a/code/game/objects/items/devices/pressureplates.dm b/code/game/objects/items/devices/pressureplates.dm index 183e960a0812..d1ecf9ee2865 100644 --- a/code/game/objects/items/devices/pressureplates.dm +++ b/code/game/objects/items/devices/pressureplates.dm @@ -11,7 +11,7 @@ var/sound/trigger_sound = 'sound/effects/pressureplate.ogg' var/obj/item/device/assembly/signaler/sigdev = null var/roundstart_signaller = FALSE - var/roundstart_signaller_freq = 1447 + var/roundstart_signaller_freq = FREQ_PRESSURE_PLATE var/roundstart_signaller_code = 30 var/roundstart_hide = FALSE var/removable_signaller = TRUE diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 2a4c6f25b957..bf32c2304203 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -12,7 +12,7 @@ materials = list(MAT_METAL=10000, MAT_GLASS=2500) var/on = TRUE var/code = 2 - var/frequency = 1449 + var/frequency = FREQ_ELECTROPACK var/shock_cooldown = 0 /obj/item/device/electropack/suicide_act(mob/user) @@ -21,7 +21,7 @@ /obj/item/device/electropack/Initialize() . = ..() - SSradio.add_object(src, frequency, GLOB.RADIO_CHAT) + SSradio.add_object(src, frequency, RADIO_SIGNALER) /obj/item/device/electropack/Destroy() SSradio.remove_object(src, frequency) @@ -67,7 +67,7 @@ if(href_list["freq"]) SSradio.remove_object(src, frequency) frequency = sanitize_frequency(frequency + text2num(href_list["freq"])) - SSradio.add_object(src, frequency, GLOB.RADIO_CHAT) + SSradio.add_object(src, frequency, RADIO_SIGNALER) else if(href_list["code"]) code += text2num(href_list["code"]) diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 3e9ce8c34128..674e32ff9c86 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -112,7 +112,7 @@ return -1 if(!src.listening) return -1 - if(freq == GLOB.SYND_FREQ) + if(freq == FREQ_SYNDICATE) if(!(src.syndie)) return -1//Prevents broadcast of messages over devices lacking the encryption diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 236f3df93ecc..b1ab5c88d75a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -8,7 +8,7 @@ dog_fashion = /datum/dog_fashion/back var/on = TRUE // 0 for off var/last_transmission - var/frequency = 1459 //common chat + var/frequency = FREQ_COMMON var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies var/canhear_range = 3 // the range which mobs can hear this radio from var/list/secure_radio_connections @@ -306,7 +306,7 @@ if(independent) var/datum/signal/signal = new - signal.transmission_method = 2 + signal.transmission_method = TRANSMISSION_SUBSPACE signal.data = list( "mob" = M, // store a reference to the mob "mobtype" = M.type, // the mob's type @@ -344,9 +344,8 @@ if(subspace_transmission) // First, we want to generate a new radio signal var/datum/signal/signal = new - signal.transmission_method = 2 // 2 would be a subspace transmission. - // transmission_method could probably be enumerated through #define. Would be neater. - // --- Finally, tag the actual signal with the appropriate values --- + signal.transmission_method = TRANSMISSION_SUBSPACE + // --- Finally, tag the actual signal with the appropriate values --- signal.data = list( // Identity-associated tags: "mob" = M, // store a reference to the mob @@ -397,7 +396,7 @@ var/filter_type = 2 var/datum/signal/signal = new - signal.transmission_method = 2 + signal.transmission_method = TRANSMISSION_SUBSPACE /* --- Try to send a normal subspace broadcast first */ @@ -470,10 +469,10 @@ var/turf/position = get_turf(src) if(!position || !(position.z in level)) return -1 - if(freq == GLOB.SYND_FREQ) + if(freq == FREQ_SYNDICATE) if(!(src.syndie)) //Checks to see if it's allowed on that frequency, based on the encryption keys return -1 - if(freq == GLOB.CENTCOM_FREQ) + if(freq == FREQ_CENTCOM) if(!independent) return -1 if (!on) @@ -555,7 +554,7 @@ /obj/item/device/radio/borg/syndicate/Initialize() . = ..() - set_frequency(GLOB.SYND_FREQ) + set_frequency(FREQ_SYNDICATE) /obj/item/device/radio/borg/attackby(obj/item/W, mob/user, params) diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index 28024b76ab38..49aa5b536363 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -17,7 +17,7 @@ icon = 'icons/obj/device.dmi' icon_state = "locator" var/temp = null - var/frequency = 1451 + var/frequency = FREQ_LOCATOR_IMPLANT var/broadcasting = null var/listening = 1 flags_1 = CONDUCT_1 @@ -208,7 +208,7 @@ Frequency: current_area = current_location.loc if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf to_chat(user, "\The [src] is malfunctioning.") - return + return user.show_message("Locked In.", 2) var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1) if(!(LAZYLEN(created) == 2)) diff --git a/code/game/say.dm b/code/game/say.dm index 570974c0bc62..284b77d54d24 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -4,18 +4,18 @@ And the base of the send_speech() proc, which is the core of saycode. */ GLOBAL_LIST_INIT(freqtospan, list( - "1351" = "sciradio", - "1355" = "medradio", - "1357" = "engradio", - "1347" = "suppradio", - "1349" = "servradio", - "1359" = "secradio", - "1353" = "comradio", - "1447" = "aiprivradio", - "1213" = "syndradio", - "1337" = "centcomradio", - "1215" = "redteamradio", - "1217" = "blueteamradio" + "[FREQ_SCIENCE]" = "sciradio", + "[FREQ_MEDICAL]" = "medradio", + "[FREQ_ENGINEERING]" = "engradio", + "[FREQ_SUPPLY]" = "suppradio", + "[FREQ_SERVICE]" = "servradio", + "[FREQ_SECURITY]" = "secradio", + "[FREQ_COMMAND]" = "comradio", + "[FREQ_AI_PRIVATE]" = "aiprivradio", + "[FREQ_SYNDICATE]" = "syndradio", + "[FREQ_CENTCOM]" = "centcomradio", + "[FREQ_CTF_RED]" = "redteamradio", + "[FREQ_CTF_BLUE]" = "blueteamradio" )) /atom/movable/proc/say(message, datum/language/language = null) diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index bcf58b1a4c4d..6f2bcb6c46b9 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -53,17 +53,6 @@ set category = "Debug" set name = "Radio report" - var/filters = list( - "1" = "GLOB.RADIO_TO_AIRALARM", - "2" = "GLOB.RADIO_FROM_AIRALARM", - "3" = "GLOB.RADIO_CHAT", - "4" = "GLOB.RADIO_ATMOSIA", - "5" = "GLOB.RADIO_NAVBEACONS", - "6" = "GLOB.RADIO_AIRLOCK", - "7" = "RADIO_SECBOT", - "8" = "RADIO_MULEBOT", - "_default" = "NO_FILTER" - ) var/output = "Radio Report