mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Adds more robust labeller/rename logging (#20474)
* Adds more robust labeler logging * Logs rename_interactive(), formatting * Adds FLW link
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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)]"
|
||||
|
||||
@@ -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--
|
||||
|
||||
Reference in New Issue
Block a user