diff --git a/code/__DEFINES/radio.dm b/code/__DEFINES/radio.dm index 86ccf84d2ae..ec65a37642f 100644 --- a/code/__DEFINES/radio.dm +++ b/code/__DEFINES/radio.dm @@ -63,6 +63,5 @@ #define SIGNALTYPE_NORMAL 0 #define SIGNALTYPE_INTERCOM 1 // Will only broadcast to intercoms #define SIGNALTYPE_INTERCOM_SBR 2 // Will only broadcast to intercoms and station-bounced radios -#define SIGNALTYPE_ANTAG 3 // Broadcast to syndicate frequency #define SIGNALTYPE_AINOTRACK 4 // AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob diff --git a/code/game/machinery/tcomms/_base.dm b/code/game/machinery/tcomms/_base.dm index edfc619bcee..7e3ece46019 100644 --- a/code/game/machinery/tcomms/_base.dm +++ b/code/game/machinery/tcomms/_base.dm @@ -252,15 +252,6 @@ GLOBAL_LIST_EMPTY(tcomms_machines) if(R.receive_range(display_freq, tcm.zlevels) > -1) radios += R - // --- Broadcast to antag radios! --- - - else if(tcm.data == SIGNALTYPE_ANTAG) - for(var/antag_freq in SSradio.ANTAG_FREQS) - var/datum/radio_frequency/antag_connection = SSradio.return_frequency(antag_freq) - for(var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"]) - if(R.receive_range(antag_freq, tcm.zlevels) > -1) - radios += R - // --- Broadcast to ALL radio devices --- else if(!bad_connection) @@ -269,6 +260,14 @@ GLOBAL_LIST_EMPTY(tcomms_machines) if(R.receive_range(display_freq, tcm.zlevels) > -1) radios += R + // Add syndie radios for intercepts if its a regular department frequency + for(var/antag_freq in SSradio.ANTAG_FREQS) + var/datum/radio_frequency/antag_connection = SSradio.return_frequency(antag_freq) + for(var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"]) + if(R.receive_range(antag_freq, tcm.zlevels) > -1) + // Only add if it wasnt there already + radios |= R + // Get a list of mobs who can hear from the radios we collected. var/list/receive = get_mobs_in_radio_ranges(radios) @@ -293,11 +292,6 @@ GLOBAL_LIST_EMPTY(tcomms_machines) if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes. continue - // Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates - if(tcm.data == SIGNALTYPE_ANTAG && istype(R, /mob/dead/observer) && R.get_preference(CHAT_GHOSTRADIO)) - continue - - // --- Can understand the speech --- if(!tcm.sender || R.say_understands(tcm.sender)) @@ -323,8 +317,6 @@ GLOBAL_LIST_EMPTY(tcomms_machines) var/freq_text = get_frequency_name(display_freq) var/part_b_extra = "" - if(tcm.data == SIGNALTYPE_ANTAG) // intercepted radio message - part_b_extra = " (Intercepted)" var/part_a = "\[[freq_text]\][part_b_extra] " // goes in the actual output // --- Some more pre-message formatting --- diff --git a/code/game/machinery/tcomms/core.dm b/code/game/machinery/tcomms/core.dm index bdc0586ca7f..5c0d5d33e14 100644 --- a/code/game/machinery/tcomms/core.dm +++ b/code/game/machinery/tcomms/core.dm @@ -85,13 +85,6 @@ // Now check if they actually have pieces, if so, broadcast if(tcm.message_pieces) - // This needs two broadcasts to make it work for syndicate radios. I hate it. - // Someone please make this better - // Although oddly enough, this is how it worked pre-rework - // The only reason regular traitors could intercept is because of the tcomms machine on the nukies shuttle - // Why. FUCKING WHY!!!!!!!!!! - broadcast_message(tcm) - tcm.data = SIGNALTYPE_ANTAG broadcast_message(tcm) return TRUE diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 0b171208554..691c12e1347 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -89,6 +89,8 @@ /obj/item/radio/headset/syndicate origin_tech = "syndicate=3" ks1type = /obj/item/encryptionkey/syndicate/nukeops + requires_tcomms = FALSE + instant = TRUE // Work instantly if there are no comms /obj/item/radio/headset/syndicate/alt //undisguised bowman with flash protection name = "syndicate headset" diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index d57b23b9b0f..b812a195842 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -59,6 +59,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( var/list/datum/radio_frequency/secure_radio_connections = new var/requires_tcomms = FALSE // Does this device require tcomms to work.If TRUE it wont function at all without tcomms. If FALSE, it will work without tcomms, just slowly + var/instant = FALSE // Should this device instantly communicate if there isnt tcomms /obj/item/radio/proc/set_frequency(new_frequency) @@ -426,8 +427,12 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( // If we dont need tcomms and we have no connection if(!requires_tcomms && !handled) tcm.zlevels = list(position.z) - // Simulate two seconds of lag - addtimer(CALLBACK(GLOBAL_PROC, .proc/broadcast_message, tcm), 20) + if(!instant) + // Simulate two seconds of lag + addtimer(CALLBACK(GLOBAL_PROC, .proc/broadcast_message, tcm), 20) + else + // Nukeops + Deathsquad headsets are instant and should work the same, whether there is comms or not + broadcast_message(tcm) return TRUE // If we didnt get here, oh fuck diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 25874d03360..a03c37c4f67 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -158,6 +158,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0) var/obj/item/radio/R = new /obj/item/radio/headset/alt(src) R.set_frequency(DTH_FREQ) + R.requires_tcomms = FALSE + R.instant = TRUE equip_to_slot_or_del(R, slot_l_ear) if(is_leader) equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(src), slot_w_uniform)