From 378dfc3382fba72ad9b38299f164c59e620aac66 Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Thu, 30 Oct 2025 12:13:10 +0000 Subject: [PATCH] Removes some unused radio vars and defines (#30808) * Removes some unused radio stuff * oop --- code/__DEFINES/radio_defines.dm | 60 +++++++------------ code/controllers/subsystem/SSblackbox.dm | 2 +- .../subsystem/non_firing/SSradio.dm | 6 +- code/datums/radio_frequency.dm | 10 +--- code/game/machinery/magnetic_module.dm | 5 +- code/game/machinery/tcomms/tcomms_base.dm | 8 +-- .../items/devices/radio/electropack.dm | 2 +- .../objects/items/devices/radio/intercom.dm | 6 +- .../items/devices/radio/radio_objects.dm | 6 +- code/modules/admin/verbs/diagnostics.dm | 7 --- .../mob/living/simple_animal/bot/bot.dm | 4 -- .../mob/living/simple_animal/bot/cleanbot.dm | 1 - .../mob/living/simple_animal/bot/ed209bot.dm | 1 - .../mob/living/simple_animal/bot/floorbot.dm | 3 +- .../mob/living/simple_animal/bot/honkbot.dm | 1 - .../mob/living/simple_animal/bot/medbot.dm | 2 - .../mob/living/simple_animal/bot/mulebot.dm | 1 - .../mob/living/simple_animal/bot/secbot.dm | 1 - 18 files changed, 42 insertions(+), 84 deletions(-) diff --git a/code/__DEFINES/radio_defines.dm b/code/__DEFINES/radio_defines.dm index 65f6438be35..3a085248c99 100644 --- a/code/__DEFINES/radio_defines.dm +++ b/code/__DEFINES/radio_defines.dm @@ -1,63 +1,47 @@ +// VALUES NOT ACTUALLY USED WITH SSRADIO +#define RSD_FREQ 1457 // remote signal device +#define ELECTROPACK_FREQ 1449 // electropack -//#define ATMOS_FIRE_FREQ 1437 //air alarms -//#define ENGINE_FREQ 1438 //engine components -//#define ATMOS_DISTRO_FREQ 1443 //distro loop -//#define ATMOS_TANKS_FREQ 1441 //atmos supply tanks -//#define BOT_BEACON_FREQ 1445 //bot navigation beacons -#define AIRLOCK_FREQ 1449 //airlock controls, electropack, magnets // THIS MUST DIE - -#define RSD_FREQ 1457 //radio signal device - Not a real signal +// Things actually using SSradio +// Random devices +#define INTERROGATION_FREQ 1441 // interrogation intercoms +#define MAGNET_FREQ 1445 // target practice magnets // kill this PLEASE +// Base limits #define RADIO_LOW_FREQ 1200 //minimum radio freq #define PUBLIC_LOW_FREQ 1441 //minimum radio chat freq #define PUBLIC_HIGH_FREQ 1489 //maximum radio chat freq #define RADIO_HIGH_FREQ 1600 //maximum radio freq +// Special channels #define SYND_FREQ 1213 #define SYNDTEAM_FREQ 1244 #define DTH_FREQ 1341 //Special Operations #define AI_FREQ 1343 #define ERT_FREQ 1345 -#define STARLINE_FREQ 1337 // Private starline -#define COMM_FREQ 1353 //Command -#define PROC_FREQ 1339 //Procedure -#define BOT_FREQ 1447 //mulebot, secbot, ed209 +#define STARLINE_FREQ 1337 // Private starline // Department channels -#define PUB_FREQ 1459 //standard radio chat -#define SEC_FREQ 1359 //security -#define ENG_FREQ 1357 //engineering -#define SCI_FREQ 1351 //science -#define MED_FREQ 1355 //medical -#define SUP_FREQ 1347 //cargo -#define SRV_FREQ 1349 //service +#define PROC_FREQ 1339 //Procedure +#define SUP_FREQ 1347 //cargo +#define SRV_FREQ 1349 //service +#define SCI_FREQ 1351 //science +#define COM_FREQ 1353 //Command +#define MED_FREQ 1355 //medical +#define ENG_FREQ 1357 //engineering +#define SEC_FREQ 1359 //security +#define PUB_FREQ 1459 //standard radio chat // Internal department channels -#define MED_I_FREQ 1485 #define SEC_I_FREQ 1475 - -// Transmission methods -#define TRANSMISSION_WIRE 0 -#define TRANSMISSION_RADIO 1 +#define MED_I_FREQ 1485 //This filter is special because devices belonging to default also receive signals sent to any other filter. #define RADIO_DEFAULT "radio_default" -#define RADIO_TO_AIRALARM "radio_airalarm" //air alarms -#define RADIO_FROM_AIRALARM "radio_airalarm_rcvr" //devices interested in recieving signals from air alarms -#define RADIO_CHAT "radio_telecoms" -#define RADIO_ATMOSIA "radio_atmos" -#define RADIO_NAVBEACONS "radio_navbeacon" -#define RADIO_AIRLOCK "radio_airlock" -#define RADIO_SECBOT "radio_secbot" -#define RADIO_HONKBOT "radio_honkbot" -#define RADIO_MULEBOT "radio_mulebot" -#define RADIO_CLEANBOT "10" -#define RADIO_FLOORBOT "11" -#define RADIO_MEDBOT "12" -#define RADIO_MAGNETS "radio_magnet" -#define RADIO_LOGIC "radio_logic" +#define RADIO_CHAT "radio_telecoms" // actual radio devices +#define RADIO_MAGNETS "radio_magnet" // KILL THIS // Signal types #define SIGNALTYPE_NORMAL 0 diff --git a/code/controllers/subsystem/SSblackbox.dm b/code/controllers/subsystem/SSblackbox.dm index 5db1b9fdc25..59309bc512e 100644 --- a/code/controllers/subsystem/SSblackbox.dm +++ b/code/controllers/subsystem/SSblackbox.dm @@ -148,7 +148,7 @@ SUBSYSTEM_DEF(blackbox) record_feedback("tally", "radio_usage", 1, "common") if(SCI_FREQ) record_feedback("tally", "radio_usage", 1, "science") - if(COMM_FREQ) + if(COM_FREQ) record_feedback("tally", "radio_usage", 1, "command") if(MED_FREQ) record_feedback("tally", "radio_usage", 1, "medical") diff --git a/code/controllers/subsystem/non_firing/SSradio.dm b/code/controllers/subsystem/non_firing/SSradio.dm index 671af3fce25..ab94a230757 100644 --- a/code/controllers/subsystem/non_firing/SSradio.dm +++ b/code/controllers/subsystem/non_firing/SSradio.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(radio) var/list/radiochannels = list( "Common" = PUB_FREQ, "Science" = SCI_FREQ, - "Command" = COMM_FREQ, + "Command" = COM_FREQ, "Procedure" = PROC_FREQ, "Medical" = MED_FREQ, "Engineering" = ENG_FREQ, @@ -23,7 +23,7 @@ SUBSYSTEM_DEF(radio) ) var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ, STARLINE_FREQ) var/list/ANTAG_FREQS = list(SYND_FREQ, SYNDTEAM_FREQ) - var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, MED_FREQ, SEC_FREQ, SCI_FREQ, SRV_FREQ, SUP_FREQ, PROC_FREQ) + var/list/DEPT_FREQS = list(AI_FREQ, COM_FREQ, ENG_FREQ, MED_FREQ, SEC_FREQ, SCI_FREQ, SRV_FREQ, SUP_FREQ, PROC_FREQ) var/list/datum/radio_frequency/frequencies = list() // This is a disgusting hack to stop this tripping CI when this thing needs to FUCKING DIE @@ -40,7 +40,7 @@ SUBSYSTEM_DEF(radio) return "centradio" // This switch used to be a shit tonne of if statements. I am gonna find who made this and give them a kind talking to switch(frequency) - if(COMM_FREQ) + if(COM_FREQ) return "comradio" if(AI_FREQ) return "airadio" diff --git a/code/datums/radio_frequency.dm b/code/datums/radio_frequency.dm index 89add36e2ef..7a18a2db865 100644 --- a/code/datums/radio_frequency.dm +++ b/code/datums/radio_frequency.dm @@ -33,7 +33,7 @@ if(start_point.z!=end_point.z || get_dist(start_point, end_point) > range) continue - device.receive_signal(signal, TRANSMISSION_RADIO, frequency) + device.receive_signal(signal, frequency) /datum/radio_frequency/proc/add_listener(obj/device as obj, filter as text|null) if(!filter) @@ -64,11 +64,6 @@ /datum/signal var/obj/source - var/transmission_method = 0 //unused at the moment - //0 = wire - //1 = radio transmission - //2 = subspace transmission - var/list/data = list() var/encryption @@ -76,7 +71,6 @@ /datum/signal/proc/copy_from(datum/signal/model) source = model.source - transmission_method = model.transmission_method data = model.data encryption = model.encryption frequency = model.frequency @@ -112,5 +106,5 @@ . = "Unidentifiable" //callback used by objects to react to incoming radio signals -/obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param) +/obj/proc/receive_signal(datum/signal/signal, receive_param) return null diff --git a/code/game/machinery/magnetic_module.dm b/code/game/machinery/magnetic_module.dm index f1d598a43ec..d11b6f5cafb 100644 --- a/code/game/machinery/magnetic_module.dm +++ b/code/game/machinery/magnetic_module.dm @@ -23,7 +23,7 @@ anchored = TRUE idle_power_consumption = 50 - var/freq = AIRLOCK_FREQ // radio frequency + var/freq = MAGNET_FREQ // radio frequency var/electricity_level = MIN_ELECTRICITY_LEVEL // intensity of the magnetic pull var/magnetic_field = MIN_MAGNETIC_FIELD // 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 @@ -182,7 +182,7 @@ idle_power_consumption = 45 // this is a temp measure - var/frequency = AIRLOCK_FREQ + var/frequency = MAGNET_FREQ var/datum/radio_frequency/radio_connection var/code = 0 var/list/magnets = list() @@ -424,7 +424,6 @@ // Prepare the radio signal var/datum/signal/signal = new - signal.transmission_method = TRANSMISSION_RADIO // radio transmission signal.source = src signal.frequency = frequency signal.data["code"] = code diff --git a/code/game/machinery/tcomms/tcomms_base.dm b/code/game/machinery/tcomms/tcomms_base.dm index 2ec9d81d817..166b3c86aed 100644 --- a/code/game/machinery/tcomms/tcomms_base.dm +++ b/code/game/machinery/tcomms/tcomms_base.dm @@ -194,8 +194,8 @@ GLOBAL_LIST_EMPTY(tcomms_machines) var/atom/movable/sender /// The radio it was sent from var/obj/item/radio/radio - /// The signal data (See defines/radio.dm) - var/data + /// The signal type (See defines/radio.dm) + var/signal_type = SIGNALTYPE_NORMAL /// Verbage used var/verbage = "says" /// Follow target for AI use @@ -284,7 +284,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines) // --- Broadcast only to intercom devices --- - if(tcm.data == SIGNALTYPE_INTERCOM && !bad_connection) + if(tcm.signal_type == SIGNALTYPE_INTERCOM && !bad_connection) for(var/obj/item/radio/intercom/R in new_connection.devices["[RADIO_CHAT]"]) if(R.receive_range(display_freq, tcm.zlevels) > -1) @@ -292,7 +292,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines) // --- Broadcast only to intercoms and station-bounced radios --- - else if(tcm.data == SIGNALTYPE_INTERCOM_SBR && !bad_connection) + else if(tcm.signal_type == SIGNALTYPE_INTERCOM_SBR && !bad_connection) for(var/obj/item/radio/R in new_connection.devices["[RADIO_CHAT]"]) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 39c73493dd8..a55d3a666ed 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -134,7 +134,7 @@ // Electropack signaller type /obj/item/assembly/signaler/electropack - frequency = AIRLOCK_FREQ + frequency = ELECTROPACK_FREQ code = 2 receiving = TRUE var/obj/item/electropack/owning_pack diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 61f8dac8578..91b62bb5a52 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -20,7 +20,7 @@ /obj/item/radio/intercom/interrogation name = "station intercom (Interrogation)" custom_name = TRUE - frequency = AIRLOCK_FREQ + frequency = INTERROGATION_FREQ /obj/item/radio/intercom/private name = "station intercom (Private)" @@ -30,7 +30,7 @@ /obj/item/radio/intercom/command name = "station intercom (Command)" custom_name = TRUE - frequency = COMM_FREQ + frequency = COM_FREQ /obj/item/radio/intercom/specops name = "\improper Special Operations intercom" @@ -99,7 +99,7 @@ internal_channels = list( num2text(PUB_FREQ) = list(), num2text(AI_FREQ) = list(), - num2text(COMM_FREQ)= list(), + num2text(COM_FREQ)= list(), num2text(ENG_FREQ) = list(), num2text(MED_FREQ) = list(), num2text(MED_I_FREQ)=list(), diff --git a/code/game/objects/items/devices/radio/radio_objects.dm b/code/game/objects/items/devices/radio/radio_objects.dm index 278453c3f00..095deb2d211 100644 --- a/code/game/objects/items/devices/radio/radio_objects.dm +++ b/code/game/objects/items/devices/radio/radio_objects.dm @@ -2,7 +2,7 @@ GLOBAL_LIST_INIT(default_internal_channels, list( num2text(PUB_FREQ) = list(), num2text(AI_FREQ) = list(ACCESS_CAPTAIN), num2text(ERT_FREQ) = list(ACCESS_CENT_SPECOPS), - num2text(COMM_FREQ)= list(ACCESS_HEADS), + num2text(COM_FREQ)= list(ACCESS_HEADS), num2text(ENG_FREQ) = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS), num2text(MED_FREQ) = list(ACCESS_MEDICAL), num2text(MED_I_FREQ)=list(ACCESS_MEDICAL), @@ -310,7 +310,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems) tcm.message_pieces = message_pieces tcm.sender_job = "Automated Announcement" tcm.vname = "synthesized voice" - tcm.data = SIGNALTYPE_AINOTRACK + tcm.signal_type = SIGNALTYPE_AINOTRACK // Datum radios dont have a location (obviously) if(loc && loc.z) tcm.source_level = loc.z // For anyone that reads this: This used to pull from a LIST from the CONFIG DATUM. WHYYYYYYYYY!!!!!!!! -aa @@ -472,7 +472,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems) // If we dont need tcomms and we have no connection if(!requires_tcomms && !handled) // If they dont need tcomms for their signal, set the type to intercoms - tcm.data = SIGNALTYPE_INTERCOM_SBR + tcm.signal_type = SIGNALTYPE_INTERCOM_SBR tcm.zlevels = list(position.z) if(!instant) // Simulate two seconds of lag diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index a724cafc9ef..34e7bb65561 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -70,14 +70,7 @@ return var/filters = list( - "1" = "RADIO_TO_AIRALARM", - "2" = "RADIO_FROM_AIRALARM", "3" = "RADIO_CHAT", - "4" = "RADIO_ATMOSIA", - "5" = "RADIO_NAVBEACONS", - "6" = "RADIO_AIRLOCK", - "7" = "RADIO_SECBOT", - "8" = "RADIO_MULEBOT", "_default" = "NO_FILTER" ) var/output = "Radio Report
" diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index c106beb6bf7..d55186cc14f 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -115,11 +115,7 @@ var/model = "" /// Bot Purpose under Show Laws var/bot_purpose = "improve the station to the best of your ability" - /// Bot control frequency - var/control_freq = BOT_FREQ - /// The radio filter the bot uses to identify itself on the network. - var/bot_filter /// Type of bot, one of the *_BOT defines. var/bot_type /// The type of data HUD the bot uses. Diagnostic by default. diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 2fb94927983..64ae02abf9f 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -7,7 +7,6 @@ health = 25 maxHealth = 25 radio_channel = "Service" //Service - bot_filter = RADIO_CLEANBOT bot_type = CLEAN_BOT model = "Cleanbot" bot_purpose = "seek out messes and clean them" diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 9e8834581e9..b8b78faac8e 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -14,7 +14,6 @@ radio_channel = "Security" bot_type = SEC_BOT - bot_filter = RADIO_SECBOT model = "ED-209" bot_purpose = "seek out criminals, handcuff them, and report their location to security" req_access = list(ACCESS_SECURITY) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index e1c6ea4e606..e15e67a5298 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -9,7 +9,6 @@ radio_channel = "Engineering" bot_type = FLOOR_BOT - bot_filter = RADIO_FLOORBOT model = "Floorbot" bot_purpose = "seek out damaged or missing floor tiles, and repair or replace them as necessary" req_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS) @@ -232,7 +231,7 @@ path = list() return - + var/target_uid = target.UID() // target can become null while path is calculated, so we need to store UID if(!length(path)) // No path, need a new one if(!isturf(target)) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 5e6457be267..c29d9d2a7b9 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -9,7 +9,6 @@ pass_flags = PASSMOB radio_channel = "Service" //Service bot_type = HONK_BOT - bot_filter = RADIO_HONKBOT model = "Honkbot" req_access = list(ACCESS_CLOWN, ACCESS_ROBOTICS, ACCESS_MIME) window_id = "autohonk" diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 7d4b6160065..eb0a78aec69 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -14,7 +14,6 @@ radio_channel = "Medical" bot_type = MED_BOT - bot_filter = RADIO_MEDBOT model = "Medibot" bot_purpose = "seek out hurt crewmembers and ensure that they are healed" req_access = list(ACCESS_MEDICAL, ACCESS_ROBOTICS) @@ -121,7 +120,6 @@ treatment_fire = "kelotane" syndicate_aligned = TRUE req_access = list(ACCESS_SYNDICATE) - control_freq = BOT_FREQ + 1000 // make it not show up on lists radio_channel = "Syndicate" radio_config = list("Common" = 1, "Medical" = 1, "Syndicate" = 1) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index a2fc9418862..ff0fed1d89c 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -21,7 +21,6 @@ radio_channel = "Supply" bot_type = MULE_BOT - bot_filter = RADIO_MULEBOT model = "MULE" bot_purpose = "deliver crates and other packages between departments, as requested" req_access = list(ACCESS_CARGO) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index b6ea60003d4..01bf64f0104 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -13,7 +13,6 @@ radio_channel = "Security" //Security channel bot_type = SEC_BOT - bot_filter = RADIO_SECBOT model = "Securitron" bot_purpose = "seek out criminals, handcuff them, and report their location to security" req_access = list(ACCESS_SECURITY)