From 84e42fd0ebcbd0601d4c034f0516053c3697565f Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Mon, 27 Nov 2023 07:02:37 +0100
Subject: [PATCH] [MIRROR] Removes some code soul (`IF YOU ARE COPY PASTING
THIS...`), replaces it with a macro [MDB IGNORE] (#25272)
* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro (#79935)
## About The Pull Request
Replaces all instances of `SSblackbox.record_feedback\("tally",
"admin_verb", 1, (.+)\)` with `BLACKBOX_LOG_ADMIN_VERB($1)`
This makes so the funny comment isn't necessary.
It also reveals one location which someone did not heed the comment, the
`debug_controller` proc copy+pasted the line but did not change the
fourth argument. PEOPLE DON'T READ!
* Removes some code soul (`IF YOU ARE COPY PASTING THIS...`), replaces it with a macro
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
---
code/__DEFINES/admin.dm | 4 ++
code/controllers/admin.dm | 6 +-
code/modules/admin/admin.dm | 8 +--
code/modules/admin/admin_verbs.dm | 56 +++++++++----------
code/modules/admin/adminmenu.dm | 2 +-
code/modules/admin/callproc/callproc.dm | 4 +-
code/modules/admin/verbs/admin.dm | 8 +--
code/modules/admin/verbs/adminevents.dm | 20 +++----
code/modules/admin/verbs/adminfun.dm | 16 +++---
code/modules/admin/verbs/admingame.dm | 8 +--
code/modules/admin/verbs/adminhelp.dm | 2 +-
code/modules/admin/verbs/adminjump.dm | 16 +++---
code/modules/admin/verbs/adminpm.dm | 4 +-
code/modules/admin/verbs/adminsay.dm | 2 +-
code/modules/admin/verbs/atmosdebug.dm | 4 +-
code/modules/admin/verbs/commandreport.dm | 2 +-
code/modules/admin/verbs/config_helpers.dm | 2 +-
code/modules/admin/verbs/deadsay.dm | 2 +-
code/modules/admin/verbs/debug.dm | 32 +++++------
code/modules/admin/verbs/diagnostics.dm | 8 +--
code/modules/admin/verbs/lawpanel.dm | 2 +-
code/modules/admin/verbs/mapping.dm | 20 +++----
code/modules/admin/verbs/playsound.dm | 12 ++--
code/modules/admin/verbs/possess.dm | 6 +-
code/modules/admin/verbs/pray.dm | 2 +-
.../admin/verbs/reestablish_db_connection.dm | 4 +-
code/modules/admin/verbs/requests.dm | 2 +-
code/modules/admin/verbs/secrets.dm | 2 +-
code/modules/admin/verbs/selectequipment.dm | 2 +-
code/modules/admin/verbs/server.dm | 10 ++--
code/modules/admin/verbs/spawnobjasmob.dm | 2 +-
.../admin/view_variables/admin_delete.dm | 2 +-
.../view_variables/mass_edit_variables.dm | 2 +-
code/modules/buildmode/submodes/proccall.dm | 2 +-
code/modules/cargo/centcom_podlauncher.dm | 4 +-
code/modules/mob/living/living.dm | 2 +-
code/modules/pai/debug.dm | 2 +-
37 files changed, 144 insertions(+), 140 deletions(-)
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index ad497a4f718..6944115e35a 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -173,3 +173,7 @@ GLOBAL_VAR_INIT(ghost_role_flags, ALL)
#define INTERVIEW_DENIED "interview_denied"
/// State when an interview has had no action on it yet
#define INTERVIEW_PENDING "interview_pending"
+
+/// Used in logging uses of admin verbs (and sometimes some non-admin or debug verbs) to the blackbox
+/// Only pass it a string key, the verb being used.
+#define BLACKBOX_LOG_ADMIN_VERB(the_verb) SSblackbox.record_feedback("tally", "admin_verb", 1, the_verb)
diff --git a/code/controllers/admin.dm b/code/controllers/admin.dm
index 1105a5c693f..421712d5ad4 100644
--- a/code/controllers/admin.dm
+++ b/code/controllers/admin.dm
@@ -56,10 +56,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
switch(controller)
if("Master")
Recreate_MC()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Master Controller")
+ BLACKBOX_LOG_ADMIN_VERB("Restart Master Controller")
if("Failsafe")
new /datum/controller/failsafe()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
+ BLACKBOX_LOG_ADMIN_VERB("Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
@@ -87,5 +87,5 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
return
debug_variables(controller)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
+ BLACKBOX_LOG_ADMIN_VERB("Debug Controller")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 2d2c692ed5f..a1f083f6139 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -76,7 +76,7 @@
A.flags_1 |= ADMIN_SPAWNED_1
log_admin("[key_name(usr)] spawned [amount] x [chosen] at [AREACOORD(usr)]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Spawn Atom")
/datum/admins/proc/podspawn_atom(object as text)
set category = "Debug"
@@ -103,7 +103,7 @@
A.flags_1 |= ADMIN_SPAWNED_1
log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Podspawn Atom") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Podspawn Atom")
/datum/admins/proc/spawn_cargo(object as text)
set category = "Debug"
@@ -121,7 +121,7 @@
S.generate(get_turf(usr))
log_admin("[key_name(usr)] spawned cargo pack [chosen] at [AREACOORD(usr)]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Cargo") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Spawn Cargo")
/datum/admins/proc/dynamic_mode_options(mob/user)
var/dat = {"
@@ -304,7 +304,7 @@
message_admins(span_adminnotice("[key_name_admin(usr)] has put [frommob.key] in control of [tomob.name]."))
log_admin("[key_name(usr)] stuffed [frommob.key] into [tomob.name].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Ghost Drag Control")
+ BLACKBOX_LOG_ADMIN_VERB("Ghost Drag Control")
tomob.key = frommob.key
tomob.client?.init_verbs()
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index e3574081e0b..985178b9c2e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -340,7 +340,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
add_verb(src, /client/proc/show_verbs)
to_chat(src, span_interface("Almost all of your adminverbs have been hidden."), confidential = TRUE)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Hide All Adminverbs") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Hide All Adminverbs")
return
/client/proc/show_verbs()
@@ -351,7 +351,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
add_admin_verbs()
to_chat(src, span_interface("All of your adminverbs are now visible."), confidential = TRUE)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Adminverbs") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Show Adminverbs")
@@ -372,7 +372,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
message_admins("[key_name_admin(usr)] re-entered corpse")
ghost.can_reenter_corpse = 1 //force re-entering even when otherwise not possible
ghost.reenter_corpse()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Reenter") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Admin Reenter")
else if(isnewplayer(mob))
to_chat(src, "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.", confidential = TRUE)
return FALSE
@@ -385,7 +385,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
init_verbs()
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Ghost") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Admin Ghost")
/client/proc/invisimin()
set name = "Invisimin"
@@ -412,7 +412,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
log_admin("[key_name(usr)] checked antagonists.") //for tsar~
if(!isobserver(usr) && SSticker.HasRoundStarted())
message_admins("[key_name_admin(usr)] checked antagonists.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Antagonists") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Check Antagonists")
/client/proc/list_bombers()
set name = "List Bombers"
@@ -420,7 +420,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.list_bombers()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "List Bombers") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("List Bombers")
/client/proc/list_signalers()
set name = "List Signalers"
@@ -428,7 +428,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.list_signalers()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "List Signalers") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("List Signalers")
/client/proc/list_law_changes()
set name = "List Law Changes"
@@ -436,7 +436,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.list_law_changes()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "List Law Changes") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("List Law Changes")
/client/proc/show_manifest()
set name = "Show Manifest"
@@ -444,7 +444,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.show_manifest()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Manifest") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Show Manifest")
/client/proc/list_dna()
set name = "List DNA"
@@ -452,7 +452,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.list_dna()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "List DNA") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("List DNA")
/client/proc/list_fingerprints()
set name = "List Fingerprints"
@@ -460,7 +460,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder)
return
holder.list_fingerprints()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "List Fingerprints") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("List Fingerprints")
/client/proc/ban_panel()
set name = "Banning Panel"
@@ -468,7 +468,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!check_rights(R_BAN))
return
holder.ban_panel()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Banning Panel") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Banning Panel")
/client/proc/unban_panel()
set name = "Unbanning Panel"
@@ -476,14 +476,14 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!check_rights(R_BAN))
return
holder.unban_panel()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Unbanning Panel") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Unbanning Panel")
/client/proc/game_panel()
set name = "Game Panel"
set category = "Admin.Game"
if(holder)
holder.Game()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Game Panel") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Game Panel")
/client/proc/poll_panel()
set name = "Server Poll Management"
@@ -491,7 +491,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!check_rights(R_POLL))
return
holder.poll_list_panel()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Server Poll Management") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Server Poll Management")
/// Returns this client's stealthed ckey
/client/proc/getStealthKey()
@@ -537,7 +537,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
else
enable_stealth_mode()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Stealth Mode") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Stealth Mode")
#define STEALTH_MODE_TRAIT "stealth_mode"
@@ -620,7 +620,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
explosion(epicenter, devastation_range = range_devastation, heavy_impact_range = range_heavy, light_impact_range = range_light, flash_range = range_flash, adminlog = TRUE, ignorecap = TRUE, explosion_cause = mob)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Bomb") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Drop Bomb")
/client/proc/drop_dynex_bomb()
set category = "Admin.Fun"
@@ -633,7 +633,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
dyn_explosion(epicenter, ex_power)
message_admins("[ADMIN_LOOKUPFLW(usr)] creating an admin explosion at [epicenter.loc].")
log_admin("[key_name(usr)] created an admin explosion at [epicenter.loc].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Dynamic Bomb") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Drop Dynamic Bomb")
/client/proc/get_dynex_range()
set category = "Debug"
@@ -771,7 +771,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
message_admins("[key_name_admin(usr)] added mob ability [ability_type] to mob [ability_recipient].")
log_admin("[key_name(usr)] added mob ability [ability_type] to mob [ability_recipient].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Mob Ability") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Add Mob Ability")
/client/proc/remove_mob_action(mob/removal_target in GLOB.mob_list)
set category = "Admin.Fun"
@@ -795,7 +795,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
qdel(to_remove)
log_admin("[key_name(usr)] removed the ability [chosen_ability] from [key_name(removal_target)].")
message_admins("[key_name_admin(usr)] removed the ability [chosen_ability] from [key_name_admin(removal_target)].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Mob Ability") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Remove Mob Ability")
/client/proc/give_spell(mob/spell_recipient in GLOB.mob_list)
set category = "Admin.Fun"
@@ -833,7 +833,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
to_chat(usr, span_warning("The intended spell recipient no longer exists."))
return
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Spell") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Give Spell")
log_admin("[key_name(usr)] gave [key_name(spell_recipient)] the spell [chosen_spell][robeless ? " (Forced robeless)" : ""].")
message_admins("[key_name_admin(usr)] gave [key_name_admin(spell_recipient)] the spell [chosen_spell][robeless ? " (Forced robeless)" : ""].")
@@ -870,7 +870,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
qdel(to_remove)
log_admin("[key_name(usr)] removed the spell [chosen_spell] from [key_name(removal_target)].")
message_admins("[key_name_admin(usr)] removed the spell [chosen_spell] from [key_name_admin(removal_target)].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Remove Spell") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Remove Spell")
/client/proc/give_disease(mob/living/T in GLOB.mob_living_list)
set category = "Admin.Fun"
@@ -883,7 +883,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!D)
return
T.ForceContractDisease(new D, FALSE, TRUE)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Give Disease") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Give Disease")
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
message_admins(span_adminnotice("[key_name_admin(usr)] gave [key_name_admin(T)] the disease [D]."))
@@ -897,7 +897,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
O.say(message, sanitize = FALSE)
log_admin("[key_name(usr)] made [O] at [AREACOORD(O)] say \"[message]\"")
message_admins(span_adminnotice("[key_name_admin(usr)] made [O] at [AREACOORD(O)]. say \"[message]\""))
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Object Say") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Object Say")
/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Admin.Events"
@@ -905,7 +905,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
return
if(src.mob)
togglebuildmode(src.mob)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Build Mode") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Toggle Build Mode")
/client/proc/check_ai_laws()
set name = "Check AI Laws"
@@ -953,7 +953,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
to_chat(src, span_interface("You are now a normal player."))
log_admin("[src] deadminned themselves.")
message_admins("[src] deadminned themselves.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Deadmin")
+ BLACKBOX_LOG_ADMIN_VERB("Deadmin")
/client/proc/readmin()
set name = "Readmin"
@@ -978,7 +978,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
to_chat(src, span_interface("You are now an admin."), confidential = TRUE)
message_admins("[src] re-adminned themselves.")
log_admin("[src] re-adminned themselves.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Readmin")
+ BLACKBOX_LOG_ADMIN_VERB("Readmin")
/client/proc/populate_world(amount = 50)
set name = "Populate World"
@@ -1178,7 +1178,7 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!holder.library_manager)
holder.library_manager = new()
holder.library_manager.ui_interact(usr)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Library Management") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Library Management")
/client/proc/create_mob_worm()
set category = "Admin.Fun"
diff --git a/code/modules/admin/adminmenu.dm b/code/modules/admin/adminmenu.dm
index 67b8bfbb14c..9a93856aa4e 100644
--- a/code/modules/admin/adminmenu.dm
+++ b/code/modules/admin/adminmenu.dm
@@ -8,4 +8,4 @@
set category = "Admin.Game"
if(usr.client.holder)
usr.client.holder.player_panel_new()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Player Panel New") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Player Panel New")
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index 22a6b43b17a..1680304679e 100644
--- a/code/modules/admin/callproc/callproc.dm
+++ b/code/modules/admin/callproc/callproc.dm
@@ -160,7 +160,7 @@ GLOBAL_PROTECT(AdminProcCallHandler)
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") //Proccall announce removed.
returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Advanced ProcCall") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Advanced ProcCall")
if(get_retval)
get_retval += returnval
. = get_callproc_returnval(returnval, procname)
@@ -255,7 +255,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]."
message_admins(msg)
admin_ticket_log(A, msg)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Atom ProcCall") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Atom ProcCall")
var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc
. = get_callproc_returnval(returnval,procname)
diff --git a/code/modules/admin/verbs/admin.dm b/code/modules/admin/verbs/admin.dm
index ad54e75fc40..0bd348076aa 100644
--- a/code/modules/admin/verbs/admin.dm
+++ b/code/modules/admin/verbs/admin.dm
@@ -24,7 +24,7 @@
message_admins("[key_name_admin(usr)] sent a tip of the round.")
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Tip")
+ BLACKBOX_LOG_ADMIN_VERB("Show Tip")
/datum/admins/proc/announce()
set category = "Admin"
@@ -39,7 +39,7 @@
message = adminscrub(message,500)
to_chat(world, "[span_adminnotice("[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:")]\n \t [message]", confidential = TRUE)
log_admin("Announce: [key_name(usr)] : [message]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Announce")
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
set category = "Admin"
@@ -50,7 +50,7 @@
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
else
tgui_alert(usr,"[M.name] is not prisoned.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Unprison") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Unprison")
/client/proc/cmd_admin_check_player_exp() //Allows admins to determine who the newer players are.
set category = "Admin"
@@ -183,7 +183,7 @@
var/msg = "[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] drop everything!"
message_admins(msg)
admin_ticket_log(M, msg)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Drop Everything") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Drop Everything")
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
if(!whom)
diff --git a/code/modules/admin/verbs/adminevents.dm b/code/modules/admin/verbs/adminevents.dm
index 9ba0fa7608c..26219353cce 100644
--- a/code/modules/admin/verbs/adminevents.dm
+++ b/code/modules/admin/verbs/adminevents.dm
@@ -25,7 +25,7 @@
msg = span_adminnotice(" SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]")
message_admins(msg)
admin_ticket_log(M, msg)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Subtle Message")
/client/proc/cmd_admin_headset_message(mob/M in GLOB.mob_list)
set category = "Admin.Events"
@@ -71,7 +71,7 @@
target.balloon_alert(target, "you hear a voice")
to_chat(target, span_hear("You hear something crackle in your [human_recipient ? "ears" : "radio receiver"] for a moment before a voice speaks. \"Please stand by for a message from [sender == "Syndicate" ? "your benefactor" : "Central Command"]. Message as follows[sender == "Syndicate" ? ", agent." : ":"] [input]. Message ends.\""), confidential = TRUE)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Headset Message") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Headset Message")
/client/proc/cmd_admin_world_narrate()
set category = "Admin.Events"
@@ -87,7 +87,7 @@
to_chat(world, "[msg]", confidential = TRUE)
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins(span_adminnotice("[key_name_admin(usr)] Sent a global narrate"))
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Global Narrate") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Global Narrate")
/client/proc/cmd_admin_local_narrate(atom/A)
set category = "Admin.Events"
@@ -108,7 +108,7 @@
log_admin("LocalNarrate: [key_name(usr)] at [AREACOORD(A)]: [msg]")
message_admins(span_adminnotice(" LocalNarrate: [key_name_admin(usr)] at [ADMIN_VERBOSEJMP(A)]: [msg]
"))
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Local Narrate") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Local Narrate")
/client/proc/cmd_admin_direct_narrate(mob/M)
set category = "Admin.Events"
@@ -133,7 +133,7 @@
msg = span_adminnotice(" DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
")
message_admins(msg)
admin_ticket_log(M, msg)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Direct Narrate") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Direct Narrate")
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Admin.Events"
@@ -156,7 +156,7 @@
ion.announce_chance = announce_ion_laws
ion.ionMessage = input
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Add Custom AI Law") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Add Custom AI Law")
/client/proc/admin_call_shuttle()
set category = "Admin.Events"
@@ -177,7 +177,7 @@
SSshuttle.emergency.mode = SHUTTLE_IDLE
SSshuttle.emergency.request()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Call Shuttle") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Call Shuttle")
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-called the emergency shuttle[confirm == "Yes (No Recall)" ? " (non-recallable)" : ""]."))
return
@@ -197,7 +197,7 @@
return
SSshuttle.emergency.cancel()
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Cancel Shuttle") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Cancel Shuttle")
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins(span_adminnotice("[key_name_admin(usr)] admin-recalled the emergency shuttle."))
@@ -325,7 +325,7 @@
log_admin("[key_name(usr)] changed the security level to [level]")
message_admins("[key_name_admin(usr)] changed the security level to [level]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Set Security Level [capitalize(level)]") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Set Security Level [capitalize(level)]")
/client/proc/run_weather()
set category = "Admin.Events"
@@ -348,7 +348,7 @@
message_admins("[key_name_admin(usr)] started weather of type [weather_type] on the z-level [z_level].")
log_admin("[key_name(usr)] started weather of type [weather_type] on the z-level [z_level].")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Run Weather")
+ BLACKBOX_LOG_ADMIN_VERB("Run Weather")
/client/proc/add_marked_mob_ability()
set category = "Admin.Events"
diff --git a/code/modules/admin/verbs/adminfun.dm b/code/modules/admin/verbs/adminfun.dm
index f51a922e419..fcba8d40928 100644
--- a/code/modules/admin/verbs/adminfun.dm
+++ b/code/modules/admin/verbs/adminfun.dm
@@ -31,7 +31,7 @@
explosion(O, devastation, heavy, light, flames, flash, explosion_cause = mob)
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at [AREACOORD(O)]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Explosion") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Explosion")
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
set category = "Admin.Fun"
@@ -51,7 +51,7 @@
empulse(O, heavy, light)
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at [AREACOORD(O)]")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "EM Pulse") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("EM Pulse")
/client/proc/cmd_admin_gib(mob/victim in GLOB.mob_list)
set category = "Admin.Fun"
@@ -82,7 +82,7 @@
else
living_victim.gib(DROP_ORGANS|DROP_BODYPARTS)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Gib")
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
@@ -93,7 +93,7 @@
return
log_admin("[key_name(usr)] used gibself.")
message_admins(span_adminnotice("[key_name_admin(usr)] used gibself."))
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib Self") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Gib Self")
var/mob/living/ourself = mob
if (istype(ourself))
@@ -128,7 +128,7 @@
to_chat(usr, "Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet.", confidential = TRUE)
CONFIG_SET(flag/force_random_names, TRUE)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Everyone Random") // If you are copy-pasting this, ensure the 4th parameter is unique to the new proc!
+ BLACKBOX_LOG_ADMIN_VERB("Make Everyone Random")
/client/proc/mass_zombie_infection()
set category = "Admin.Fun"
@@ -149,7 +149,7 @@
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Zombie Infection")
+ BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Infection")
/client/proc/mass_zombie_cure()
set category = "Admin.Fun"
@@ -167,7 +167,7 @@
message_admins("[key_name_admin(usr)] cured all zombies.")
log_admin("[key_name(usr)] cured all zombies.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Mass Zombie Cure")
+ BLACKBOX_LOG_ADMIN_VERB("Mass Zombie Cure")
/client/proc/polymorph_all()
set category = "Admin.Fun"
@@ -186,7 +186,7 @@
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
log_admin("[key_name(usr)] polymorphed all living mobs.")
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Polymorph All")
+ BLACKBOX_LOG_ADMIN_VERB("Polymorph All")
for(var/mob/living/M in mobs)
CHECK_TICK
diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm
index 317c8fafd3b..197a870b48b 100644
--- a/code/modules/admin/verbs/admingame.dm
+++ b/code/modules/admin/verbs/admingame.dm
@@ -163,7 +163,7 @@
body += "