mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
TGUIfies some VV actions, replaces the actions dropdown with a searchable one (#95480)
This commit is contained in:
@@ -181,7 +181,7 @@ ADMIN_VERB(cmd_give_direct_control, R_ADMIN, "Give Direct Control", "Give direct
|
||||
if(M.ckey)
|
||||
if(tgui_alert(user,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
|
||||
return
|
||||
var/client/newkey = input(user, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
|
||||
var/client/newkey = tgui_input_list(user, "Pick the player to put in control.", "New player", sort_list(GLOB.clients))
|
||||
if(isnull(newkey))
|
||||
return
|
||||
var/mob/oldmob = newkey.mob
|
||||
@@ -413,7 +413,7 @@ ADMIN_VERB(cmd_admin_areatest_all, R_DEBUG, "Test Areas (ALL)", "Tests the areas
|
||||
var/datum/outfit/O = path //not much to initalize here but whatever
|
||||
outfits[initial(O.name)] = path
|
||||
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sort_list(outfits)
|
||||
var/dresscode = tgui_input_list(usr, "Select outfit", "Robust quick dress shop", baseoutfits + sort_list(outfits, GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
if (isnull(dresscode))
|
||||
return
|
||||
|
||||
@@ -427,7 +427,7 @@ ADMIN_VERB(cmd_admin_areatest_all, R_DEBUG, "Test Areas (ALL)", "Tests the areas
|
||||
var/datum/outfit/O = path
|
||||
job_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sort_list(job_outfits)
|
||||
dresscode = tgui_input_list(usr, "Select job equipment", "Robust quick dress shop", sort_list(job_outfits, GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
dresscode = job_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -439,7 +439,7 @@ ADMIN_VERB(cmd_admin_areatest_all, R_DEBUG, "Test Areas (ALL)", "Tests the areas
|
||||
var/datum/outfit/O = path
|
||||
plasmaman_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sort_list(plasmaman_outfits)
|
||||
dresscode = tgui_input_list(usr, "Select plasmeme equipment", "Robust quick dress shop", sort_list(plasmaman_outfits, GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
dresscode = plasmaman_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -448,7 +448,7 @@ ADMIN_VERB(cmd_admin_areatest_all, R_DEBUG, "Test Areas (ALL)", "Tests the areas
|
||||
var/list/custom_names = list()
|
||||
for(var/datum/outfit/D in GLOB.custom_outfits)
|
||||
custom_names[D.name] = D
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sort_list(custom_names)
|
||||
var/selected_name = tgui_input_list(usr, "Select outfit", "Robust quick dress shop", sort_list(custom_names, GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
dresscode = custom_names[selected_name]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -621,12 +621,12 @@ ADMIN_VERB(place_ruin, R_DEBUG, "Spawn Ruin", "Attempt to randomly place a speci
|
||||
return
|
||||
var/datum/map_template/ruin/template = data[1]
|
||||
if (exists[template])
|
||||
var/response = tgui_alert(user,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another", "Cancel"))
|
||||
var/response = tgui_alert(user,"There is already a [template] in existence.", "Spawn Ruin", list("Jump", "Place Another"))
|
||||
if (!response)
|
||||
return
|
||||
if (response == "Jump")
|
||||
user.mob.forceMove(get_turf(exists[template]))
|
||||
return
|
||||
else if (response == "Cancel")
|
||||
return
|
||||
|
||||
var/len = GLOB.ruin_landmarks.len
|
||||
seedRuins(SSmapping.levels_by_trait(data[2]), max(1, template.cost), data[3], list(ruinname = template))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
set category = "Debug"
|
||||
|
||||
var/list/infusions = list()
|
||||
for(var/datum/infuser_entry/path as anything in subtypesof(/datum/infuser_entry))
|
||||
for(var/datum/infuser_entry/path as anything in sort_list(subtypesof(/datum/infuser_entry), GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
var/str = "[initial(path.name)] ([path])"
|
||||
infusions[str] = path
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
ADMIN_VERB_VISIBILITY(manipulate_organs, ADMIN_VERB_VISIBLITY_FLAG_MAPPING_DEBUG)
|
||||
ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the organs of a living carbon.", ADMIN_CATEGORY_DEBUG, mob/living/carbon/carbon_victim in world)
|
||||
var/operation = tgui_input_list(user, "Select organ operation", "Organ Manipulation", list("add organ", "add implant", "drop organ/implant", "remove organ/implant"))
|
||||
var/operation = tgui_input_list(user, "Select organ operation", "Organ Manipulation", list("Add organ", "Add implant", "Drop organ/implant", "Remove organ/implant"))
|
||||
if (isnull(operation))
|
||||
return
|
||||
|
||||
var/list/organs = list()
|
||||
switch(operation)
|
||||
if("add organ")
|
||||
for(var/path in subtypesof(/obj/item/organ))
|
||||
if("Add organ")
|
||||
// BYOND actually cares about order of addition in assoc lists, as long as its not an alist
|
||||
for(var/path in sort_list(subtypesof(/obj/item/organ), GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
var/dat = replacetext("[path]", "/obj/item/organ/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
@@ -22,8 +23,8 @@ ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the orga
|
||||
log_admin("[key_name(user)] has added organ [organ_to_grant.type] to [key_name(carbon_victim)]")
|
||||
message_admins("[key_name_admin(user)] has added organ [organ_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
|
||||
|
||||
if("add implant")
|
||||
for(var/path in subtypesof(/obj/item/implant))
|
||||
if("Add implant")
|
||||
for(var/path in sort_list(subtypesof(/obj/item/implant), GLOBAL_PROC_REF(cmp_typepaths_asc)))
|
||||
var/dat = replacetext("[path]", "/obj/item/implant/", ":")
|
||||
organs[dat] = path
|
||||
|
||||
@@ -41,7 +42,7 @@ ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the orga
|
||||
log_admin("[key_name(user)] has added implant [implant_to_grant.type] to [key_name(carbon_victim)]")
|
||||
message_admins("[key_name_admin(user)] has added implant [implant_to_grant.type] to [ADMIN_LOOKUPFLW(carbon_victim)]")
|
||||
|
||||
if("drop organ/implant", "remove organ/implant")
|
||||
if("Drop organ/implant", "Remove organ/implant")
|
||||
for(var/obj/item/organ/user_organs as anything in carbon_victim.organs)
|
||||
organs["[user_organs.name] ([user_organs.type])"] = user_organs
|
||||
|
||||
@@ -70,7 +71,7 @@ ADMIN_VERB(manipulate_organs, R_DEBUG, "Manipulate Organs", "Manipulate the orga
|
||||
|
||||
organ_to_modify.forceMove(get_turf(carbon_victim))
|
||||
|
||||
if(operation == "remove organ/implant")
|
||||
if(operation == "Remove organ/implant")
|
||||
qdel(organ_to_modify)
|
||||
else if(implant_holder) // Put the implant in case.
|
||||
var/obj/item/implantcase/case = new(get_turf(carbon_victim))
|
||||
|
||||
Reference in New Issue
Block a user