Fixes multiple admin verbs using incorrect search, updates them to TGUI (#85744)

## About The Pull Request

Closes #85740
BYOND doesn't support this sort of type picking, these are the 3 last
admin verbs to use it

## Changelog
🆑
fix: Fixed nuke toggle, smite and machine upgrade admin verbs using
incorrect sorting
admin: Updated nuke toggle, smite and machine upgrade admin verbs to use
TGUI
/🆑
This commit is contained in:
SmArtKar
2024-08-14 15:01:17 +03:00
committed by GitHub
parent e12519edb7
commit 67387a1d5c
3 changed files with 11 additions and 5 deletions
+8 -2
View File
@@ -218,9 +218,15 @@ ADMIN_VERB(hostile_environment, R_ADMIN, "Hostile Environment", "Disable the shu
SSshuttle.hostile_environments.Cut()
SSshuttle.checkHostileEnvironment()
ADMIN_VERB(toggle_nuke, R_DEBUG|R_ADMIN, "Toggle Nuke", "Arm or disarm a nuke.", ADMIN_CATEGORY_EVENTS, obj/machinery/nuclearbomb/nuke in world)
ADMIN_VERB(toggle_nuke, R_DEBUG|R_ADMIN, "Toggle Nuke", "Arm or disarm a nuke.", ADMIN_CATEGORY_EVENTS)
var/list/nukes = list()
for (var/obj/machinery/nuclearbomb/bomb in world)
nukes += bomb
var/obj/machinery/nuclearbomb/nuke = tgui_input_list(user, "", "Toggle Nuke", nukes)
if (isnull(nuke))
return
if(!nuke.timing)
var/newtime = input(user, "Set activation timer.", "Activate Nuke", "[nuke.timer_set]") as num|null
var/newtime = tgui_input_number(user, "Set activation timer.", "Activate Nuke", nuke.timer_set)
if(!newtime)
return
nuke.timer_set = newtime
+1 -1
View File
@@ -154,7 +154,7 @@ ADMIN_VERB(polymorph_all, R_ADMIN, "Polymorph All", "Applies the effects of the
message_admins("Mass polymorph started by [who_did_it] is complete.")
ADMIN_VERB_AND_CONTEXT_MENU(admin_smite, R_ADMIN|R_FUN, "Smite", "Smite a player with divine power.", ADMIN_CATEGORY_FUN, mob/living/target in world)
var/punishment = input(user, "Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
var/punishment = tgui_input_list(user, "Choose a punishment", "DIVINE SMITING", GLOB.smites)
if(QDELETED(target) || !punishment)
return
+2 -2
View File
@@ -1,5 +1,5 @@
ADMIN_VERB(machine_upgrade, R_DEBUG, "Tweak Component Ratings", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, obj/machinery/machine in world)
var/new_rating = input(user, "Enter new rating:","Num") as num|null
ADMIN_VERB_AND_CONTEXT_MENU(machine_upgrade, R_DEBUG, "Tweak Component Ratings", ADMIN_VERB_NO_DESCRIPTION, ADMIN_CATEGORY_HIDDEN, obj/machinery/machine in world)
var/new_rating = tgui_input_number(user, "", "Enter new rating:")
if(new_rating && machine.component_parts)
for(var/obj/item/stock_parts/P in machine.component_parts)
P.rating = new_rating