From 66f38fb34be2acd166ce65806921c8978b4c7f9d Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Tue, 28 Feb 2012 18:24:43 -0700 Subject: [PATCH] TG UPDATE: Updates to telecomms, bug&runtime fixes, manifest for all, improved nuclear bomb. All PDA's can access the manifest. Nuclear bomb now works on realtime. Telecomms not mapped yet. Numerous Runtime Fixes --- baystation12.dme | 29 ++ code/game/gamemodes/game_mode.dm | 2 + code/game/gamemodes/nuclear/nuclear.dm | 5 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 6 +- code/game/gamemodes/traitor/traitor.dm | 2 +- code/game/machinery/telecomms/broadcaster.dm | 344 ++++++++++++++++-- code/game/machinery/telecomms/logbrowser.dm | 99 ++--- .../telecomms/machine_interactions.dm | 4 +- .../machinery/telecomms/telecommunications.dm | 91 +++-- code/game/machinery/telecomms/telemonitor.dm | 16 +- .../machinery/telecomms/traffic_control.dm | 233 ++++++++++++ code/game/mecha/mech_fabricator.dm | 9 +- code/game/objects/devices/PDA/PDA.dm | 4 +- code/game/objects/devices/PDA/cart.dm | 2 - code/game/objects/items/food.dm | 21 +- code/game/objects/radio/electropack.dm | 1 - code/game/objects/radio/encryptionkey.dm | 110 ++++++ code/game/objects/radio/headset.dm | 146 ++++++-- code/game/objects/radio/radio.dm | 70 +++- code/game/response_team.dm | 7 +- code/game/sound.dm | 4 +- code/game/turf.dm | 3 + code/modules/admin/admin.dm | 1 + code/modules/admin/player_panel.dm | 3 +- code/modules/chemical/Chemistry-Tools.dm | 17 +- code/modules/mob/living/silicon/ai/laws.dm | 9 +- code/modules/mob/living/silicon/say.dm | 5 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_helpers.dm | 12 + code/modules/recycling/disposal.dm | 6 +- .../scripting/Implementations/Telecomms.dm | 30 +- .../scripting/Implementations/_Logic.dm | 17 +- icons/obj/projectiles.dmi | Bin 19950 -> 24013 bytes icons/obj/radio.dmi | Bin 4323 -> 4429 bytes icons/obj/stationobjs.dmi | Bin 99616 -> 99803 bytes interface/skin.dmf | 204 +++++++++++ maps/tgstation.2.0.8.dmm | 2 +- 37 files changed, 1281 insertions(+), 235 deletions(-) create mode 100644 code/game/machinery/telecomms/traffic_control.dm create mode 100644 code/game/objects/radio/encryptionkey.dm diff --git a/baystation12.dme b/baystation12.dme index e4719049f3..cd0685ffb0 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -133,6 +133,13 @@ #define FILE_DIR "code/modules/projectiles/projectile" #define FILE_DIR "code/modules/recycling" #define FILE_DIR "code/modules/research" +#define FILE_DIR "code/modules/scripting" +#define FILE_DIR "code/modules/scripting/AST" +#define FILE_DIR "code/modules/scripting/AST/Operators" +#define FILE_DIR "code/modules/scripting/Implementations" +#define FILE_DIR "code/modules/scripting/Interpreter" +#define FILE_DIR "code/modules/scripting/Parser" +#define FILE_DIR "code/modules/scripting/Scanner" #define FILE_DIR "code/modules/security levels" #define FILE_DIR "code/unused" #define FILE_DIR "code/unused/beast" @@ -549,6 +556,7 @@ #include "code\game\machinery\telecomms\machine_interactions.dm" #include "code\game\machinery\telecomms\telecommunications.dm" #include "code\game\machinery\telecomms\telemonitor.dm" +#include "code\game\machinery\telecomms\traffic_control.dm" #include "code\game\magic\archived_book.dm" #include "code\game\magic\library.dm" #include "code\game\magic\musician.dm" @@ -702,6 +710,7 @@ #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\radio\beacon.dm" #include "code\game\objects\radio\electropack.dm" +#include "code\game\objects\radio\encryptionkey.dm" #include "code\game\objects\radio\headset.dm" #include "code\game\objects\radio\intercom.dm" #include "code\game\objects\radio\radio.dm" @@ -1025,6 +1034,26 @@ #include "code\modules\research\rdmachines.dm" #include "code\modules\research\research.dm" #include "code\modules\research\server.dm" +#include "code\modules\scripting\Errors.dm" +#include "code\modules\scripting\IDE.dm" +#include "code\modules\scripting\Options.dm" +#include "code\modules\scripting\stack.dm" +#include "code\modules\scripting\AST\AST Nodes.dm" +#include "code\modules\scripting\AST\Blocks.dm" +#include "code\modules\scripting\AST\Statements.dm" +#include "code\modules\scripting\AST\Operators\Binary Operators.dm" +#include "code\modules\scripting\AST\Operators\Unary Operators.dm" +#include "code\modules\scripting\Implementations\_Logic.dm" +#include "code\modules\scripting\Implementations\Telecomms.dm" +#include "code\modules\scripting\Interpreter\Evaluation.dm" +#include "code\modules\scripting\Interpreter\Interaction.dm" +#include "code\modules\scripting\Interpreter\Interpreter.dm" +#include "code\modules\scripting\Interpreter\Scope.dm" +#include "code\modules\scripting\Parser\Expressions.dm" +#include "code\modules\scripting\Parser\Keywords.dm" +#include "code\modules\scripting\Parser\Parser.dm" +#include "code\modules\scripting\Scanner\Scanner.dm" +#include "code\modules\scripting\Scanner\Tokens.dm" #include "code\modules\security levels\keycard authentication.dm" #include "code\modules\security levels\security levels.dm" #include "code\WorkInProgress\AI_Visibility.dm" diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index df605dd7d0..d6fce9d1d9 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -45,6 +45,8 @@ Stealth and Camouflage Items; /obj/item/clothing/mask/gas/voice:4:Voice Changer; /obj/item/clothing/glasses/thermal:4:Thermal Imaging Glasses; /obj/item/device/chameleon:4:Chameleon-Projector; +/obj/item/device/encryptionkey/traitor:3:Traitor Radio Key; +/obj/item/device/encryptionkey/binary:3:Binary Translator Key; /obj/item/weapon/stamperaser:1:Stamp Remover; Whitespace:Seperator; Devices and Tools; diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index e058b35984..2eb032eaca 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -218,10 +218,7 @@ return tempfreq /datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob,radio_freq) - var/obj/item/device/radio/R = new /obj/item/device/radio/headset(synd_mob) - R.freerange = 1 - R.listening = 0 - R.config(list("Nuclear" = 1)) + var/obj/item/device/radio/R = new /obj/item/device/radio/headset/nuclear(synd_mob) synd_mob.equip_if_possible(R, synd_mob.slot_ears) synd_mob.equip_if_possible(new /obj/item/clothing/under/syndicate(synd_mob), synd_mob.slot_w_uniform) synd_mob.equip_if_possible(new /obj/item/clothing/shoes/black(synd_mob), synd_mob.slot_shoes) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index dcc30eceec..7a60d10ecd 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -46,12 +46,12 @@ if (src.yes_code) dat += text("\nStatus: []-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: --- [] +++
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), src, src, src, src, time_left, src, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src) else - dat += text("\nStatus: Auth. S2-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\n[] Safety: Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + dat += text("\nStatus: Auth. S2-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: --- [] +++
\n
\n[] Safety: Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) else if (src.timing) - dat += text("\nStatus: Set-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + dat += text("\nStatus: Set-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: --- [] +++
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) else - dat += text("\nStatus: Auth. S1-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) + dat += text("\nStatus: Auth. S1-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: --- [] +++
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), time_left, (src.timing ? "On" : "Off"), time_left, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off")) var/message = "AUTH" if (src.auth) message = text("[]", src.code) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index dca6d7b4b4..0a0b60d236 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -5,7 +5,7 @@ /datum/game_mode/traitor name = "traitor" config_tag = "traitor" - restricted_jobs = list("Cyborg")//Approved by headmins for a week test, if you see this it would be nice if you didn't spread it everywhere + restricted_jobs = list("Cyborg", "AI")//Approved by headmins for a week test, if you see this it would be nice if you didn't spread it everywhere required_players = 0 required_enemies = 1 diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index c3ac2943d8..0a923bf110 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -8,6 +8,7 @@ var list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam + /obj/machinery/telecomms/broadcaster name = "Subspace Broadcaster" icon = 'stationobjs.dmi' @@ -21,16 +22,21 @@ var heatgen = 60 delay = 7 circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster" + receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from) + // Don't broadcast rejected signals + if(signal.data["reject"]) + return if(signal.data["message"]) - // Kind of lame way to prevent MASSIVE RADIO SPAM but it works + // Prevents massive radio spam if("[signal.data["message"]]:[signal.data["realname"]]" in recentmessages) return recentmessages.Add( "[signal.data["message"]]:[signal.data["realname"]]" ) + signal.data["done"] = 1 // mark the signal as being broadcasted // Search for the original signal and mark it as done as well @@ -41,19 +47,48 @@ var if(signal.data["slow"] > 0) sleep(signal.data["slow"]) // simulate the network lag if necessary - /* ###### Broadcast a message using signal.data ###### */ - Broadcast_Message(signal.data["connection"], signal.data["mob"], - signal.data["vmask"], signal.data["vmessage"], - signal.data["radio"], signal.data["message"], - signal.data["name"], signal.data["job"], - signal.data["realname"], signal.data["vname"],, signal.data["compression"]) - /* --- Do a snazzy animation! --- */ - flick("broadcaster_send", src) + /** #### - Normal Broadcast - #### **/ + + if(signal.data["type"] == 0) + + /* ###### Broadcast a message using signal.data ###### */ + Broadcast_Message(signal.data["connection"], signal.data["mob"], + signal.data["vmask"], signal.data["vmessage"], + signal.data["radio"], signal.data["message"], + signal.data["name"], signal.data["job"], + signal.data["realname"], signal.data["vname"],, signal.data["compression"]) + + + /** #### - Simple Broadcast - #### **/ + + if(signal.data["type"] == 1) + + /* ###### Broadcast a message using signal.data ###### */ + Broadcast_SimpleMessage(signal.data["name"], signal.frequency, + signal.data["message"],null, null, + signal.data["compression"]) + + + /** #### - Artificial Broadcast - #### **/ + // (Imitates a mob) + + if(signal.data["type"] == 2) + + /* ###### Broadcast a message using signal.data ###### */ + // Parameter "data" as 4: AI can't track this person/mob + + Broadcast_Message(signal.data["connection"], signal.data["mob"], + signal.data["vmask"], signal.data["vmessage"], + signal.data["radio"], signal.data["message"], + signal.data["name"], signal.data["job"], + signal.data["realname"], signal.data["vname"], 4, signal.data["compression"]) spawn(1) recentmessages = list() + /* --- Do a snazzy animation! --- */ + flick("broadcaster_send", src) /* Basically just an empty shell for receiving and broadcasting radio messages. Not @@ -72,8 +107,8 @@ var machinetype = 6 heatgen = 0 var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel - var/frequency = 1439 var/nuke = 0 + var/frequency = 1439 receive_signal(datum/signal/signal) @@ -169,6 +204,7 @@ var 1 -- Will only broadcast to intercoms 2 -- Will only broadcast to intercoms and station-bounced radios 3 -- Broadcast to syndicate frequency + 4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob @param compression: If 0, the signal is audible @@ -211,22 +247,21 @@ var // --- Broadcast to syndicate radio! --- else if(data == 3) - var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(NUKE_FREQ) + var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ) for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"]) - receive |= R.send_hear(NUKE_FREQ) + receive |= R.send_hear(SYND_FREQ) // --- Broadcast to response team radio! --- - else if(data == 4) + else if(data == 5) var/datum/radio_frequency/interceptconnection = radio_controller.return_frequency(intercept_frequency) for (var/obj/item/device/radio/R in interceptconnection.devices["[RADIO_CHAT]"]) receive |= R.send_hear(intercept_frequency) - // --- Broadcast to ALL radio devices --- else @@ -281,7 +316,6 @@ var // - Just display a garbled message - else heard_garbled += R - for(var/obj/item/weapon/implant/imp in R) imp.hear(message,M) @@ -312,8 +346,6 @@ var freq_text = "Mining" if(1347) freq_text = "Cargo" - if(1439) - freq_text = "Response Team" if(connection.frequency == NUKE_FREQ) freq_text = "Agent" @@ -335,12 +367,12 @@ var if (display_freq==SYND_FREQ) part_a = "" - else if (display_freq==NUKE_FREQ) - part_a = "" else if (display_freq==COMM_FREQ) part_a = "" else if (display_freq in DEPT_FREQS) part_a = "" + else if (display_freq==NUKE_FREQ) + part_a = "" // --- Filter the message; place it in quotes apply a verb --- @@ -384,6 +416,8 @@ var //End of research and feedback code. + var/aitrack = "" + /* ###### Send the message ###### */ @@ -394,19 +428,27 @@ var var/J = job var/rendered = "[part_a][N][part_b][quotedmsg][part_c]" for (var/mob/R in heard_masked) + aitrack = "" + if(data == 4) + aitrack = "" + if(istype(R, /mob/living/silicon/ai) && job != "Automated Announcement") - R.show_message("[part_a][N] ([J]) [part_b][quotedmsg][part_c]", 2) + R.show_message("[part_a][aitrack][N] ([J]) [part_b][quotedmsg][part_c]", 2) else R.show_message(rendered, 2) /* --- Process all the mobs that heard the voice normally (understood) --- */ if (length(heard_normal)) - var/rendered = "[part_a][M.real_name][part_b][quotedmsg][part_c]" + var/rendered = "[part_a][realname][part_b][quotedmsg][part_c]" for (var/mob/R in heard_normal) + aitrack = "" + if(data == 4) + aitrack = "" + if(istype(R, /mob/living/silicon/ai) && job != "Automated Announcement") - R.show_message("[part_a][realname] ([job]) [part_b][quotedmsg][part_c]", 2) + R.show_message("[part_a][aitrack][realname] ([job]) [part_b][quotedmsg][part_c]", 2) else R.show_message(rendered, 2) @@ -414,13 +456,16 @@ var // Does not display message; displayes the mob's voice_message (ie "chimpers") if (length(heard_voice)) - var/rendered = "" - if(M) - rendered = "[part_a][vname][part_b][M.voice_message][part_c]" + var/rendered = "[part_a][vname][part_b][M.voice_message][part_c]" for (var/mob/R in heard_voice) + aitrack = "" + if(data == 4) + aitrack = "" + + if(istype(R, /mob/living/silicon/ai) && job != "Automated Announcement") - R.show_message("[part_a][vname] ([job]) [part_b][vmessage]][part_c]", 2) + R.show_message("[part_a][aitrack][vname] ([job]) [part_b][vmessage]][part_c]", 2) else R.show_message(rendered, 2) @@ -428,15 +473,17 @@ var // Displays garbled message (ie "f*c* **u, **i*er!") if (length(heard_garbled)) - if(M) - quotedmsg = M.say_quote(stars(message)) - else - quotedmsg = "\"" + stars(message) + "\"" + quotedmsg = M.say_quote(stars(message)) var/rendered = "[part_a][vname][part_b][quotedmsg][part_c]" for (var/mob/R in heard_garbled) + aitrack = "" + if(data == 4) + aitrack = "" + + if(istype(R, /mob/living/silicon/ai) && job != "Automated Announcement") - R.show_message("[part_a][vname][part_b][quotedmsg][part_c]", 2) + R.show_message("[part_a][aitrack][vname][part_b][quotedmsg][part_c]", 2) else R.show_message(rendered, 2) @@ -444,16 +491,239 @@ var /* --- Complete gibberish. Usually happens when there's a compressed message --- */ if (length(heard_gibberish)) - if(M) - quotedmsg = M.say_quote(Gibberish(message, compression + 50)) - else - quotedmsg = "\"" + Gibberish(message, compression + 50) + "\"" + quotedmsg = M.say_quote(Gibberish(message, compression + 50)) var/rendered = "[part_a][Gibberish(M.real_name, compression + 50)][part_b][quotedmsg][part_c]" for (var/mob/R in heard_gibberish) - if(istype(R, /mob/living/silicon/ai)) - R.show_message("[part_a][Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) [part_b][quotedmsg][part_c]", 2) + aitrack = "" + if(data == 4) + aitrack = "" + + + if(istype(R, /mob/living/silicon/ai) && job != "Automated Announcement") + R.show_message("[part_a][aitrack][Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) [part_b][quotedmsg][part_c]", 2) else R.show_message(rendered, 2) + +/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression) + + + /* ###### Prepare the radio connection ###### */ + + if(!M) + var/mob/living/carbon/human/H = new + M = H + + var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency) + + var/display_freq = connection.frequency + + var/list/receive = list() + + + // --- Broadcast only to intercom devices --- + + if(data == 1) + for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"]) + + receive |= R.send_hear(display_freq) + + + // --- Broadcast only to intercoms and station-bounced radios --- + + else if(data == 2) + for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) + + if(istype(R, /obj/item/device/radio/headset)) + continue + + receive |= R.send_hear(display_freq) + + + // --- Broadcast to syndicate radio! --- + + else if(data == 3) + var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ) + + for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"]) + + receive |= R.send_hear(SYND_FREQ) + + + // --- Broadcast to ALL radio devices --- + + else + for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"]) + + receive |= R.send_hear(display_freq) + + + /* ###### Organize the receivers into categories for displaying the message ###### */ + + // Understood the message: + var/list/heard_normal = list() // normal message + + // Did not understand the message: + var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!") + var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!") + + for (var/mob/R in receive) + + /* --- Loop through the receivers and categorize them --- */ + + if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios. + continue + + + // --- Check for compression --- + if(compression > 0) + + heard_gibberish += R + continue + + // --- Can understand the speech --- + + if (R.say_understands(M)) + + heard_normal += R + + // --- Can't understand the speech --- + + else + // - Just display a garbled message - + + heard_garbled += R + for(var/obj/item/weapon/implant/imp in R) + imp.hear(text,M) + + + /* ###### Begin formatting and sending the message ###### */ + if (length(heard_normal) || length(heard_garbled) || length(heard_gibberish)) + + /* --- Some miscellaneous variables to format the string output --- */ + var/part_a = "" // goes in the actual output + var/freq_text // the name of the channel + + // --- Set the name of the channel --- + switch(display_freq) + + if(SYND_FREQ) + freq_text = "#unkn" + if(COMM_FREQ) + freq_text = "Command" + if(1351) + freq_text = "Science" + if(1355) + freq_text = "Medical" + if(1357) + freq_text = "Engineering" + if(1359) + freq_text = "Security" + if(1349) + freq_text = "Mining" + if(1347) + freq_text = "Cargo" + + if(connection.frequency == NUKE_FREQ) + freq_text = "Agent" + //There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO + + + // --- If the frequency has not been assigned a name, just use the frequency as the name --- + + if(!freq_text) + freq_text = format_frequency(display_freq) + + // --- Some more pre-message formatting --- + + var/part_b_extra = "" + if(data == 3) // intercepted radio message + part_b_extra = " (Intercepted)" + + // Create a radio headset for the sole purpose of using its icon + var/obj/item/device/radio/headset/radio = new + + var/part_b = " \icon[radio]\[[freq_text]\][part_b_extra] " // Tweaked for security headsets -- TLE + var/part_c = "" + + if (display_freq==SYND_FREQ) + part_a = "" + else if (display_freq==COMM_FREQ) + part_a = "" + else if (display_freq in DEPT_FREQS) + part_a = "" + else if (display_freq==NUKE_FREQ) + part_a = "" + + // --- This following recording is intended for research and feedback in the use of department radio channels --- + + var/part_blackbox_b = " \[[freq_text]\] " // Tweaked for security headsets -- TLE + var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]" + //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]" + for (var/obj/machinery/blackbox_recorder/BR in world) + //BR.messages_admin += blackbox_admin_msg + switch(display_freq) + if(1459) + BR.msg_common += blackbox_msg + if(1351) + BR.msg_science += blackbox_msg + if(1353) + BR.msg_command += blackbox_msg + if(1355) + BR.msg_medical += blackbox_msg + if(1357) + BR.msg_engineering += blackbox_msg + if(1359) + BR.msg_security += blackbox_msg + if(1441) + BR.msg_deathsquad += blackbox_msg + if(1213) + BR.msg_syndicate += blackbox_msg + if(1349) + BR.msg_mining += blackbox_msg + if(1347) + BR.msg_cargo += blackbox_msg + else + BR.messages += blackbox_msg + + //End of research and feedback code. + + /* ###### Send the message ###### */ + + /* --- Process all the mobs that heard the voice normally (understood) --- */ + + if (length(heard_normal)) + var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]" + if(M.job == "Automated Announcement") + rendered = "[part_a][source][part_b][text][part_c]" + + for (var/mob/R in heard_normal) + R.show_message(rendered, 2) + + /* --- Process all the mobs that heard a garbled voice (did not understand) --- */ + // Displays garbled message (ie "f*c* **u, **i*er!") + + if (length(heard_garbled)) + var/quotedmsg = "\"[stars(text)]\"" + if(M.job == "Automated Announcement") + quotedmsg = "[stars(text)]" + var/rendered = "[part_a][source][part_b][quotedmsg][part_c]" + + for (var/mob/R in heard_garbled) + R.show_message(rendered, 2) + + + /* --- Complete gibberish. Usually happens when there's a compressed message --- */ + + if (length(heard_gibberish)) + var/quotedmsg = "\"[Gibberish(text, compression + 50)]\"" + if(M.job == "Automated Announcement") + quotedmsg = "[Gibberish(text, compression + 50)]" + var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]" + + for (var/mob/R in heard_gibberish) + R.show_message(rendered, 2) + + diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 03665dda37..a9934dd7b7 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -27,7 +27,7 @@ if(0) dat += "
[temp]
" - dat += "
Current Network: [network]
" + dat += "
Current Network: [network]
" if(servers.len) dat += "
Detected Telecommunication Servers: