port ADMIN_VERB and friends (#30646)

* port ADMIN_VERB and friends

* some renaming

* dumb

* one more rename

* never search and replace this codebase

* fix TM issues, more renaming

* add a static analysis to shore up user verbs

* fix double message on roundstart

* remove macro we're not using yet

* convert remaining playsounds verbs

* convert more verbs i missed somehow

* why is this a completely different signature than everything else

* fix ui_interact arg

* fix logging view and others

* buncha issues caught in TM

* fix mentor tickets ui

* fix bug report viewing

* moron
This commit is contained in:
warriorstar-orion
2025-12-12 19:18:22 +00:00
committed by GitHub
parent f89b05ee88
commit 2a842644d5
92 changed files with 1751 additions and 3113 deletions
+20 -51
View File
@@ -35,13 +35,8 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
/obj/effect/debugging/marker/Move()
return 0
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
if(!check_rights(R_DEBUG))
return
USER_VERB_VISIBILITY(debug_camera_view, VERB_VISIBILITY_FLAG_MOREDEBUG)
USER_VERB(debug_camera_view, R_DEBUG, "Camera Range Display", "Camera Range Display", VERB_CATEGORY_MAPPING)
if(GLOB.camera_range_display_status)
GLOB.camera_range_display_status = 0
else
@@ -59,13 +54,8 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Camera Range Display") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sec_camera_report()
set category = "Mapping"
set name = "Camera Report"
if(!check_rights(R_DEBUG))
return
USER_VERB_VISIBILITY(debug_camera_report, VERB_VISIBILITY_FLAG_MOREDEBUG)
USER_VERB(debug_camera_report, R_DEBUG, "Camera Report", "Camera Report", VERB_CATEGORY_MAPPING)
var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
@@ -95,16 +85,11 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>"
output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500")
client << browse(output,"window=airreport;size=1000x500")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Camera Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
if(!check_rights(R_DEBUG))
return
USER_VERB_VISIBILITY(debug_view_intercoms, VERB_VISIBILITY_FLAG_MOREDEBUG)
USER_VERB(debug_view_intercoms, R_DEBUG, "Intercom Range Display", "Intercom Range Display", VERB_CATEGORY_MAPPING)
if(GLOB.intercom_range_display_status)
GLOB.intercom_range_display_status = 0
else
@@ -121,20 +106,15 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
qdel(F)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Intercom Range Display") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
if(!check_rights(R_DEBUG))
return
var/level = clean_input("Which z-level?","Level?")
USER_VERB_VISIBILITY(debug_object_count_zlevel, VERB_VISIBILITY_FLAG_MOREDEBUG)
USER_VERB(debug_object_count_zlevel, R_DEBUG, "Count Objects On Level", "Count Objects On Level", VERB_CATEGORY_MAPPING)
var/level = clean_input("Which z-level?","Level?", user = client)
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
var/type_text = clean_input("Which type path?","Path?")
var/type_text = clean_input("Which type path?","Path?", user = client)
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
@@ -159,14 +139,9 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (On Level)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
set category = "Mapping"
set name = "Count Objects All"
if(!check_rights(R_DEBUG))
return
var/type_text = clean_input("Which type path?","")
USER_VERB_VISIBILITY(debug_object_count_world, VERB_VISIBILITY_FLAG_MOREDEBUG)
USER_VERB(debug_object_count_world, R_DEBUG, "Count Objects All", "Count Objects All", VERB_CATEGORY_MAPPING)
var/type_text = clean_input("Which type path?","", user = client)
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
@@ -180,28 +155,22 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
to_chat(world, "There are [count] objects of type [type_path] in the game world.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (Global)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/set_next_map()
set category = "Server"
set name = "Set Next Map"
if(!check_rights(R_SERVER))
return
USER_VERB(set_next_map, R_SERVER, "Set Next Map", "Set Next Map", VERB_CATEGORY_SERVER)
var/list/map_datums = list()
for(var/x in subtypesof(/datum/map))
var/datum/map/M = x
if(initial(M.voteable))
map_datums["[initial(M.fluff_name)] ([initial(M.technical_name)])"] = M // Put our map in
var/target_map_name = input(usr, "Select target map", "Next map", null) as null|anything in map_datums
var/target_map_name = input(client, "Select target map", "Next map", null) as null|anything in map_datums
if(!target_map_name)
return
var/datum/map/TM = map_datums[target_map_name]
SSmapping.next_map = new TM
var/announce_to_players = alert(usr, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
message_admins("[key_name_admin(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
log_admin("[key_name(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
var/announce_to_players = alert(client, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
message_admins("[key_name_admin(client)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
log_admin("[key_name(client)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
if(announce_to_players == "Yes")
to_chat(world, "<span class='boldannounceooc'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
to_chat(world, "<span class='boldannounceooc'>[client.key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")