mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
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   ## 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user