From 92961c85e4223cbff09cd02b8de1ceb042c8511a Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Sun, 12 May 2024 23:12:13 -0500 Subject: [PATCH] makes the profiler more accessible (#25312) --- code/modules/admin/admin_verbs.dm | 12 ++++++++++-- code/modules/client/client_procs.dm | 1 + interface/skin.dmf | 5 +++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 0b9abc3abf3..baf89390823 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -169,7 +169,8 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/debug_timers, /client/proc/force_verb_bypass, /client/proc/show_gc_queues, - /client/proc/debug_global_variables + /client/proc/debug_global_variables, + /client/proc/profile_code )) GLOBAL_LIST_INIT(admin_verbs_possess, list( /proc/possess, @@ -236,7 +237,8 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( /client/proc/debug_global_variables, /client/proc/visualise_active_turfs, /client/proc/debug_timers, - /client/proc/timer_log + /client/proc/timer_log, + /client/proc/profile_code )) /client/proc/add_admin_verbs() @@ -955,6 +957,12 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( src.stat_panel.send_message("create_debug") +/client/proc/profile_code() + set name = "Profile Code" + set category = "Debug" + + winset(usr, null, "command=.profile") + /client/proc/export_current_character() set name = "Export Character DMI/JSON" set category = "Admin" diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 66d1d4ad21e..e66ed538b06 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -456,6 +456,7 @@ display_job_bans(TRUE) if(check_rights(R_DEBUG|R_VIEWRUNTIMES, FALSE, mob)) winset(src, "debugmcbutton", "is-disabled=false") + winset(src, "profilecode", "is-disabled=false") /client/proc/is_connecting_from_localhost() var/static/list/localhost_addresses = list("127.0.0.1", "::1") diff --git a/interface/skin.dmf b/interface/skin.dmf index 729792edc29..df48d1dcdd7 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -21,6 +21,11 @@ menu "menu" command = "SS-Info-Breakdown" category = "&File" is-disabled = true + elem "profilecode" + name = "&Profile Code" + command = ".profile" + category = "&File" + is-disabled = true elem name = "&Quit" command = ".quit"