[MIRROR] More admin verb conversion & Secrets panel overhaul (#11124)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-06-28 19:34:54 -07:00
committed by GitHub
parent 873fa555c2
commit a3028dcb9e
72 changed files with 1949 additions and 1132 deletions

View File

@@ -737,3 +737,47 @@
set desc = "Reloads the dmis from the test folder and creates the test datums."
SSrobot_sprites.reload_test_sprites()
ADMIN_VERB(quick_nif, R_ADMIN, "Quick NIF", "Spawns a NIF into someone in quick-implant mode.", "Fun.Add Nif")
var/input_NIF
var/mob/living/carbon/human/H = tgui_input_list(user, "Pick a mob with a player","Quick NIF", player_list)
if(!H)
return
if(!istype(H))
to_chat(user, span_warning("That mob type ([H.type]) doesn't support NIFs, sorry."))
return
if(!H.get_organ(BP_HEAD))
to_chat(user, span_warning("Target is unsuitable."))
return
if(H.nif)
to_chat(user, span_warning("Target already has a NIF."))
return
if(H.species.flags & NO_DNA)
var/obj/item/nif/S = /obj/item/nif/bioadap
input_NIF = initial(S.name)
new /obj/item/nif/bioadap(H)
else
var/list/NIF_types = typesof(/obj/item/nif)
var/list/NIFs = list()
for(var/NIF_type in NIF_types)
var/obj/item/nif/S = NIF_type
NIFs[capitalize(initial(S.name))] = NIF_type
var/list/show_NIFs = sortList(NIFs) // the list that will be shown to the user to pick from
input_NIF = tgui_input_list(user, "Pick the NIF type","Quick NIF", show_NIFs)
var/chosen_NIF = NIFs[capitalize(input_NIF)]
if(chosen_NIF)
new chosen_NIF(H)
else
new /obj/item/nif(H)
log_and_message_admins("Quick NIF'd [H.real_name] with a [input_NIF].", user)
feedback_add_details("admin_verb","QNIF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!