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
+5 -10
View File
@@ -1,20 +1,15 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "\[Admin\] Tweak Component Ratings"
if(!check_rights(R_DEBUG))
return
USER_CONTEXT_MENU(machine_upgrade, R_DEBUG, "\[Admin\] Tweak Component Ratings", obj/machinery/M as obj in world)
if(!istype(M))
to_chat(usr, "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>")
to_chat(client, "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>")
return
var/new_rating = input("Enter new rating:","Num") as num
var/new_rating = input(client, "Enter new rating:","Num") as num
if(!isnull(new_rating) && M.component_parts)
for(var/obj/item/stock_parts/P in M.component_parts)
P.rating = new_rating
M.RefreshParts()
message_admins("[key_name_admin(usr)] has set the component rating of [M] to [new_rating]")
log_admin("[key_name(usr)] has set the component rating of [M] to [new_rating]")
message_admins("[key_name_admin(client)] has set the component rating of [M] to [new_rating]")
log_admin("[key_name(client)] has set the component rating of [M] to [new_rating]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Machine Upgrade") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!