diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 92f7b21bb70..b8e699323d7 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -103,6 +103,10 @@ //reusing the PDA option because I really don't think news comments are worth a config option WRITE_LOG(GLOB.world_pda_log, "COMMENT: [text]") +/proc/log_telecomms(text) + if (CONFIG_GET(flag/log_telecomms)) + WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]") + /proc/log_chat(text) if (CONFIG_GET(flag/log_pda)) //same thing here diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 2951ddf1654..7ca2d0d6f0a 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -18,6 +18,8 @@ GLOBAL_VAR(sql_error_log) GLOBAL_PROTECT(sql_error_log) GLOBAL_VAR(world_pda_log) GLOBAL_PROTECT(world_pda_log) +GLOBAL_VAR(world_telecomms_log) +GLOBAL_PROTECT(world_telecomms_log) GLOBAL_VAR(world_manifest_log) GLOBAL_PROTECT(world_manifest_log) GLOBAL_VAR(query_debug_log) diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 1d41e9a765d..4521aab14ed 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -49,6 +49,8 @@ /datum/config_entry/flag/log_pda // log pda messages +/datum/config_entry/flag/log_telecomms // log telecomms messages + /datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. /datum/config_entry/flag/log_world_topic // log all world.Topic() calls diff --git a/code/game/machinery/telecomms/broadcasting.dm b/code/game/machinery/telecomms/broadcasting.dm index 0873ad2df6b..e4694997904 100644 --- a/code/game/machinery/telecomms/broadcasting.dm +++ b/code/game/machinery/telecomms/broadcasting.dm @@ -190,4 +190,15 @@ if(length(receive)) SSblackbox.LogBroadcast(frequency) + var/spans_part = "" + if(length(spans)) + spans_part = "(" + for(var/S in spans) + spans_part = "[spans_part] [S]" + spans_part = "[spans_part] ) " + + var/lang_name = data["language"] + + log_telecomms("[datum_info_line(virt.source)] : \[[get_radio_name(frequency)]\] [spans_part]\"[message]\" language: [lang_name] at [atom_loc_line(get_turf(src.source))]") + QDEL_IN(virt, 50) // Make extra sure the virtualspeaker gets qdeleted diff --git a/code/game/world.dm b/code/game/world.dm index 2563a26cdca..9f6b7093958 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -87,6 +87,7 @@ GLOBAL_PROTECT(security_mode) GLOB.world_game_log = "[GLOB.log_directory]/game.log" GLOB.world_attack_log = "[GLOB.log_directory]/attack.log" GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" + GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" GLOB.world_manifest_log = "[GLOB.log_directory]/manifest.log" GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log" GLOB.sql_error_log = "[GLOB.log_directory]/sql.log" @@ -102,6 +103,7 @@ GLOBAL_PROTECT(security_mode) start_log(GLOB.world_game_log) start_log(GLOB.world_attack_log) start_log(GLOB.world_pda_log) + start_log(GLOB.world_telecomms_log) start_log(GLOB.world_manifest_log) start_log(GLOB.world_href_log) start_log(GLOB.world_qdel_log) diff --git a/config/config.txt b/config/config.txt index 5a8d1bb25da..3a38e748c1a 100644 --- a/config/config.txt +++ b/config/config.txt @@ -109,6 +109,9 @@ LOG_ATTACK ## log pda messages LOG_PDA +## log telecomms messages +LOG_TELECOMMS + ## log prayers LOG_PRAYER