Adds more robust labeller/rename logging (#20474)

* Adds more robust labeler logging

* Logs rename_interactive(), formatting

* Adds FLW link
This commit is contained in:
Adri
2023-03-07 22:43:47 -06:00
committed by GitHub
parent 4786927851
commit d2f41a297b
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -375,7 +375,7 @@
#define EXPLOSION_BLOCK_PROC -1
// Defines for investigate to prevent typos and for styling
#define INVESTIGATE_LABEL "labels"
#define INVESTIGATE_RENAME "renames"
#define INVESTIGATE_BOMB "bombs"
+7
View File
@@ -1226,6 +1226,13 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
t = sanitize(copytext(t, 1, MAX_NAME_LEN))
// Logging
var/logged_name = initial(name)
if(t)
logged_name = "[use_prefix ? "[prefix][t]" : t]"
investigate_log("[key_name(user)] ([ADMIN_FLW(user,"FLW")]) renamed \"[src]\" ([ADMIN_VV(src, "VV")]) as \"[logged_name]\".", INVESTIGATE_RENAME)
if(actually_rename)
if(t == "")
name = "[initial(name)]"
+1 -1
View File
@@ -29,7 +29,7 @@
user.visible_message("<span class='notice'>[user] labels [A] as [label].</span>", \
"<span class='notice'>You label [A] as [label].</span>")
investigate_log("[key_name(user)] labelled [A] as [label].", INVESTIGATE_LABEL) // Investigate goes BEFORE rename so the original name is preserved in the log
investigate_log("[key_name(user)] ([ADMIN_FLW(user,"FLW")]) labelled \"[A]\" ([ADMIN_VV(A, "VV")]) with \"[label]\" at [COORD(A.loc)] [ADMIN_JMP(A)].", INVESTIGATE_RENAME) // Investigate goes BEFORE rename so the original name is preserved in the log
A.AddComponent(/datum/component/label, label)
playsound(A, 'sound/items/handling/component_pickup.ogg', 20, TRUE)
labels_left--