Redoes the admin verb define to require passing in an Admin Visible Name, and restores the usage of '-' for the verb bar when you want to call verbs from the command bar. Also cleans up and organizes the backend for drawing verbs to make it easier in the future for me to make it look better (#73214)

## About The Pull Request

Damn that's a long title.

Admin Verbs can be used in the verb bar with hyphens instead of spaces
again.
## Why It's Good For The Game

Admin muscle memory
## Changelog
This commit is contained in:
Zephyr
2023-02-04 01:20:18 -08:00
committed by GitHub
parent b1e2b18e7f
commit fca90f5c78
56 changed files with 317 additions and 288 deletions
+1 -10
View File
@@ -72,20 +72,11 @@ GENERAL_PROTECT_DATUM(/datum/controller/subsystem/admin_verbs)
cached_formats[verb_module] = verb_module_formatted
var/original_name = verb_information[VERB_MAP_NAME]
if(!cached_formats[original_name])
var/formatted_name = ""
for(var/name_part in splittext(original_name, "_"))
if(name_part in abbreviations)
formatted_name += "[uppertext(name_part)] "
else
formatted_name += "[capitalize(name_part)] "
formatted_name = copytext(formatted_name, 1, -1)
cached_formats[original_name] = formatted_name
var/verb_desc = verb_information[VERB_MAP_DESCRIPTION]
if(!stat_data[cached_formats[verb_module]])
stat_data[cached_formats[verb_module]] = list()
stat_data[cached_formats[verb_module]] += list(list(cached_formats[original_name], verb_desc, original_name))
stat_data[cached_formats[verb_module]] += list(list(original_name, verb_desc, original_name))
var/sorted_stat_data = list()
for(var/verb_category in stat_data)
sorted_stat_data[verb_category] = sort_list(stat_data[verb_category], GLOBAL_PROC_REF(cmp_admin_verb_name))
+1 -1
View File
@@ -81,7 +81,7 @@ SUBSYSTEM_DEF(explosions)
flameturf -= T
throwturf -= T
ADMIN_VERB(debug, check_bomb_impact, "", R_DEBUG)
ADMIN_VERB(debug, check_bomb_impact, "Check Bomb Impact", "", R_DEBUG)
var/newmode = tgui_alert(usr, "Use reactionary explosions?","Check Bomb Impact", list("Yes", "No"))
var/turf/epicenter = get_turf(usr)
if(!epicenter)
+1 -1
View File
@@ -603,7 +603,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
holodeck_templates[holo_template.template_id] = holo_template
ADMIN_VERB(events, load_away_mission, "", R_FUN)
ADMIN_VERB(events, load_away_mission, "Load Away Mission", "", R_FUN)
if(!GLOB.the_gateway)
if(tgui_alert(usr, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
return