verb macro system (pr 1/3) (#96720)

## About The Pull Request

just macro-izes all the usages of verbs in the codebase as a
pre-requisite to my follow up pr that serializes all the verbs arguments
so we can tgui-ify the command bar, so we can then put it on the
onscreen map.

this also basically does the same as #94487 so can easily be integrated
into the verb queueing stuff... but does not actually do any verb
queueing by itself. basically im just trying to be
https://github.com/tgstation/tgstation/labels/Atomic
## Why It's Good For The Game
it doesn't really do anything by itself but it does let us do more stuff

## Changelog
🆑
code: the backend to all verbs in the game has been played with, please
report any issues to github
/🆑

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
This commit is contained in:
harry
2026-07-04 02:45:07 -04:00
committed by GitHub
co-authored by harryob
parent e5afe71e87
commit ff006aa4a5
79 changed files with 369 additions and 565 deletions
+1 -3
View File
@@ -221,9 +221,7 @@ ADMIN_VERB_ONLY_CONTEXT_MENU(show_occupants_player_panel, R_ADMIN, "Show Occupan
SSadmin_verbs.dynamic_invoke_verb(user, /datum/admin_verb/show_player_panel, selected_mob)
return
/client/proc/cmd_admin_godmode(mob/mob in GLOB.mob_list)
set category = "Admin.Game"
set name = "Godmode"
GAME_VERB_PROC(/client, cmd_admin_godmode, "Godmode", "Admin.Game", mob/mob in GLOB.mob_list)
if(!check_rights(R_ADMIN))
return
+3 -11
View File
@@ -792,10 +792,7 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
new /datum/admin_help(message, user_client, FALSE, urgent)
/client/verb/no_tgui_adminhelp(message as message)
set name = "NoTguiAdminhelp"
set hidden = TRUE
GAME_VERB_HIDDEN(/client, no_tgui_adminhelp, "NoTguiAdminhelp", message as message)
if(adminhelptimerid)
return
@@ -803,16 +800,11 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
GLOB.admin_help_ui_handler.perform_adminhelp(src, message, FALSE)
/client/verb/adminhelp()
set category = "Admin"
set name = "Adminhelp"
GAME_VERB(/client, adminhelp, "Adminhelp", "Admin")
GLOB.admin_help_ui_handler.ui_interact(mob)
to_chat(src, span_boldnotice("Adminhelp failing to open or work? <a href='byond://?src=[REF(src)];tguiless_adminhelp=1'>Click here</a>"))
/client/verb/view_latest_ticket()
set category = "Admin"
set name = "View Latest Ticket"
GAME_VERB(/client, view_latest_ticket, "View Latest Ticket", "Admin")
if(!current_ticket)
// Check if the client had previous tickets, and show the latest one
var/list/prev_tickets = list()
+1 -3
View File
@@ -28,9 +28,7 @@ GLOBAL_DATUM(triple_ai_controller, /datum/triple_ai_controller)
GLOB.triple_ai_controller = null
. = ..()
/client/proc/triple_ai()
set category = "Admin.Events"
set name = "Toggle AI Triumvirate"
GAME_VERB_PROC(/client, triple_ai, "Toggle AI Triumvirate", "Admin.Events")
if(SSticker.current_state > GAME_STATE_PREGAME)
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.", confidential = TRUE)
+1 -3
View File
@@ -7,9 +7,7 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
this is the setup, it handles announcing crew and other settings for the mode and then creating the datum singleton
*/
/client/proc/anon_names()
set category = "Admin.Events"
set name = "Setup Anonymous Names"
GAME_VERB_PROC(/client, anon_names, "Setup Anonymous Names", "Admin.Events")
if(GLOB.current_anonymous_theme)
var/response = tgui_alert(usr, "Anon mode is currently enabled. Disable?", "cold feet", list("Disable Anon Names", "Keep it Enabled"))
@@ -3,9 +3,7 @@
* Returns the entry if all organs were successfully replaced.
* If no infusion was picked, the infusion had no organs, or if one or more organs could not be granted, returns FALSE
*/
/client/proc/grant_dna_infusion(mob/living/carbon/human/target in world)
set name = "Apply DNA Infusion"
set category = "Debug"
GAME_VERB_PROC(/client, grant_dna_infusion, "Apply DNA Infusion", "Debug", mob/living/carbon/human/target in world)
var/list/infusions = list()
for(var/datum/infuser_entry/path as anything in sort_list(subtypesof(/datum/infuser_entry), GLOBAL_PROC_REF(cmp_typepaths_asc)))
+1 -3
View File
@@ -1,6 +1,4 @@
/mob/verb/pray(message as text)
set name = VERB_PRAY
GAME_VERB(/mob, pray, VERB_PRAY, null, message as text)
if(GLOB.say_disabled) //This is here to try to identify lag problems
to_chat(src, span_danger("Speech is currently admin-disabled."), confidential = TRUE)
return
@@ -1,7 +1,4 @@
/mob/verb/request_internet_sound()
set category = "OOC"
set name = "Request Internet Sound"
GAME_VERB(/mob, request_internet_sound, "Request Internet Sound", "OOC")
if(!CONFIG_GET(flag/request_internet_sound))
to_chat(usr, span_danger("This server has disabled internet sound requests."), confidential = TRUE)
return
+4 -11
View File
@@ -1,19 +1,14 @@
// Admin Verbs in this file are special and cannot use the AVD system for some reason or another.
/client/proc/show_verbs()
set name = "Adminverbs - Show"
set category = ADMIN_CATEGORY_MAIN
GAME_VERB_PROC(/client, show_verbs, "Adminverbs - Show", ADMIN_CATEGORY_MAIN)
remove_verb(src, /client/proc/show_verbs)
UNASSIGN_GAME_VERB(src, /client, show_verbs)
add_admin_verbs()
to_chat(src, span_interface("All of your adminverbs are now visible."), confidential = TRUE)
BLACKBOX_LOG_ADMIN_VERB("Show Adminverbs")
/client/proc/readmin()
set name = "Readmin"
set category = "Admin"
set desc = "Regain your admin powers."
GAME_VERB_PROC_DESC(/client, readmin, "Readmin", "Regain your admin powers.", "Admin")
var/datum/admins/A = GLOB.deadmins[ckey]
@@ -35,9 +30,7 @@
log_admin("[src] re-adminned themselves.")
BLACKBOX_LOG_ADMIN_VERB("Readmin")
/client/proc/admin_2fa_verify()
set name = "Verify Admin"
set category = "Admin"
GAME_VERB_PROC(/client, admin_2fa_verify, "Verify Admin", "Admin")
var/datum/admins/admin = GLOB.admin_datums[ckey]
admin?.associate(src)