From 32e95d68ac0d3c884cd2f34afea4d5ed086460ca Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 5 Jul 2022 08:51:02 +0200 Subject: [PATCH] [MIRROR] Adds logging for experisci completion [MDB IGNORE] (#14737) * Adds logging for experisci completion (#68147) Adds logging for experisci completion * Adds logging for experisci completion Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com> --- code/__HELPERS/logging/research.dm | 6 ++++++ code/modules/research/techweb/_techweb.dm | 1 + tgstation.dme | 1 + 3 files changed, 8 insertions(+) create mode 100644 code/__HELPERS/logging/research.dm diff --git a/code/__HELPERS/logging/research.dm b/code/__HELPERS/logging/research.dm new file mode 100644 index 00000000000..40fd2a9ec72 --- /dev/null +++ b/code/__HELPERS/logging/research.dm @@ -0,0 +1,6 @@ +/// Puts the text into the research html file, not log. See [INVESTIGATE_RESEARCH] for [/atom/proc/investigate_log] +/proc/log_research(text) + if(!text) + return + var/html_file = file("[GLOB.log_directory]/[INVESTIGATE_RESEARCH].html") + WRITE_FILE(html_file, "[time_stamp()] [text]
") diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index 8daa85c5b6e..1d5777f6442 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -298,6 +298,7 @@ /datum/techweb/proc/complete_experiment(datum/experiment/completed_experiment) available_experiments -= completed_experiment completed_experiments[completed_experiment.type] = completed_experiment + log_research("[completed_experiment.name] ([completed_experiment.type]) has been completed on techweb id [id]") /datum/techweb/proc/printout_points() return techweb_point_display_generic(research_points) diff --git a/tgstation.dme b/tgstation.dme index 2822bfefe29..ea89cb29c9d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -420,6 +420,7 @@ #include "code\__HELPERS\logging\mob.dm" #include "code\__HELPERS\logging\paper.dm" #include "code\__HELPERS\logging\pda.dm" +#include "code\__HELPERS\logging\research.dm" #include "code\__HELPERS\logging\shuttle.dm" #include "code\__HELPERS\logging\talk.dm" #include "code\__HELPERS\logging\tool.dm"