From de62acadf4d90898eeedb019f6a9a92012d38780 Mon Sep 17 00:00:00 2001 From: Ansari Date: Thu, 17 May 2018 18:27:11 +0800 Subject: [PATCH 1/2] Add labeler to investigate logs --- code/modules/paperwork/handlabeler.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 2700c8702db..666fbcbc183 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -35,6 +35,7 @@ user.visible_message("[user] labels [A] as [label].", \ "You label [A] as [label].") + investigate_log("[key_name(user)] labelled [A] as [label].", "label") // Investigate goes BEFORE rename so the original name is preserved in the log A.name = "[A.name] ([label])" /obj/item/hand_labeler/attack_self(mob/user as mob) From 215232507650610ac5ba53d541226be1eebddfe8 Mon Sep 17 00:00:00 2001 From: Ansari Date: Fri, 18 May 2018 11:37:22 +0800 Subject: [PATCH 2/2] Uses define instead of string --- code/__DEFINES/misc.dm | 3 +++ code/modules/paperwork/handlabeler.dm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 4f38a183a80..8962da6ba2f 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -344,5 +344,8 @@ //for obj explosion block calculation #define EXPLOSION_BLOCK_PROC -1 +// Defines for investigate to prevent typos and for styling +#define INVESTIGATE_LABEL "labels" + // The SQL version required by this version of the code #define SQL_VERSION 2 diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 666fbcbc183..e3cceb9738a 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -35,7 +35,7 @@ user.visible_message("[user] labels [A] as [label].", \ "You label [A] as [label].") - investigate_log("[key_name(user)] labelled [A] as [label].", "label") // Investigate goes BEFORE rename so the original name is preserved in the log + investigate_log("[key_name(user)] labelled [A] as [label].", INVESTIGATE_LABEL) // Investigate goes BEFORE rename so the original name is preserved in the log A.name = "[A.name] ([label])" /obj/item/hand_labeler/attack_self(mob/user as mob)