Refactors admin verbs from giant ass lists into datums (#72407)

## About The Pull Request

See title.
## Why It's Good For The Game

Makes it easier for people to add new admin buttons, and also removes
the giant ass ugly lists that are an affront to my eyes.

Yes you are still able to call them manually via the verb bar

![image](https://user-images.githubusercontent.com/12817816/210163285-2ecb4b59-67b4-47d2-b324-77048ce852fe.png)

![image](https://user-images.githubusercontent.com/12817816/210163288-5a0ec98c-9589-4cab-8a6b-1ab5151aa040.png)
## Changelog
🆑
refactor: Admin verbs are now datums with a dedicated panel handler
admin: Admin verbs now come with a handy description when you hover over
them!
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Zephyr
2023-02-03 19:32:37 -05:00
committed by GitHub
parent 5325244a5e
commit 7f25d7f17b
110 changed files with 2074 additions and 3359 deletions
+15 -7
View File
@@ -196,14 +196,26 @@
if(isweakref(thing_to_debug))
var/datum/weakref/ref = thing_to_debug
thing_to_debug = ref.resolve()
INVOKE_ASYNC(usr.client, TYPE_PROC_REF(/client, debug_variables), thing_to_debug)
INVOKE_ASYNC( \
SSadmin_verbs, \
TYPE_PROC_REF(/datum/controller/subsystem/admin_verbs, dynamic_invoke_admin_verb), \
usr.client, \
/mob/admin_module_holder/debug/view_variables, \
list(thing_to_debug), \
)
return FALSE
if("vvGlobal")
var/thing_to_debug = traverse_list(params["indices"], current_state.globals)
if(isweakref(thing_to_debug))
var/datum/weakref/ref = thing_to_debug
thing_to_debug = ref.resolve()
INVOKE_ASYNC(usr.client, TYPE_PROC_REF(/client, debug_variables), thing_to_debug)
INVOKE_ASYNC( \
SSadmin_verbs, \
TYPE_PROC_REF(/datum/controller/subsystem/admin_verbs, dynamic_invoke_admin_verb), \
usr.client, \
/mob/admin_module_holder/debug/view_variables, \
list(thing_to_debug), \
)
return FALSE
if("clearArgs")
arguments.Cut()
@@ -222,11 +234,7 @@
. = ..()
qdel(src)
/client/proc/open_lua_editor()
set name = "Open Lua Editor"
set category = "Debug"
if(!check_rights_for(src, R_DEBUG))
return
ADMIN_VERB(debug, open_lua_editor, "", R_DEBUG)
if(SSlua.initialized != TRUE)
to_chat(usr, span_warning("SSlua is not initialized!"))
return