[MIRROR] remove old inputs (#10038)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-01 18:22:56 -07:00
committed by GitHub
parent f3ebea3af1
commit 965f8f4a61
101 changed files with 302 additions and 282 deletions

View File

@@ -3,7 +3,7 @@
if(!D)
return
var/add_or_remove = input("Remove/Add?", "Trait Remove/Add") as null|anything in list("Add","Remove")
var/add_or_remove = tgui_input_list(usr, "Remove/Add?", "Trait Remove/Add", list("Add","Remove"))
if(!add_or_remove)
return
var/list/availible_traits = list()
@@ -20,7 +20,7 @@
var/name = GLOB.trait_name_map[trait] || trait
availible_traits[name] = trait
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in availible_traits
var/chosen_trait = tgui_input_list(usr, "Select trait to modify", "Trait", availible_traits)
if(!chosen_trait)
return
chosen_trait = availible_traits[chosen_trait]
@@ -30,14 +30,14 @@
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
ADD_TRAIT(D,chosen_trait,source)
if("Remove")
var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific")
var/specific = tgui_input_list(usr, "All or specific source ?", "Trait Remove/Add", list("All","Specific"))
if(!specific)
return
switch(specific)
if("All")
source = null
if("Specific")
source = input("Source to be removed","Trait Remove/Add") as null|anything in D.status_traits[chosen_trait]
source = tgui_input_list(usr, "Source to be removed","Trait Remove/Add", D.status_traits[chosen_trait])
if(!source)
return
REMOVE_TRAIT(D,chosen_trait,source)
REMOVE_TRAIT(D,chosen_trait,source)

View File

@@ -685,7 +685,7 @@
choice = show_radial_menu(src, src, options, radius = 90)
if(!choice || QDELETED(src) || src.incapacitated())
return 0
var/new_color = input("Pick body color:","Body Color", overlay_colors["Body"]) as null|color
var/new_color = tgui_color_picker(src, "Pick body color:","Body Color", overlay_colors["Body"])
if(!new_color)
return 0
body = choice
@@ -698,7 +698,7 @@
choice = show_radial_menu(src, src, options, radius = 90)
if(!choice || QDELETED(src) || src.incapacitated())
return 0
var/new_color = input("Pick horn color:","Horn Color", overlay_colors["Horns"]) as null|color
var/new_color = tgui_color_picker(src, "Pick horn color:","Horn Color", overlay_colors["Horns"])
if(!new_color)
return 0
horns = choice
@@ -711,7 +711,7 @@
choice = show_radial_menu(src, src, options, radius = 90)
if(!choice || QDELETED(src) || src.incapacitated())
return 0
var/new_color = input("Pick marking color:","Marking Color", overlay_colors["Marks"]) as null|color
var/new_color = tgui_color_picker(src, "Pick marking color:","Marking Color", overlay_colors["Marks"])
if(!new_color)
return 0
markings = choice
@@ -724,7 +724,7 @@
choice = show_radial_menu(src, src, options, radius = 90)
if(!choice || QDELETED(src) || src.incapacitated())
return 0
var/new_color = input("Pick eye color:","Eye Color", overlay_colors["Eyes"]) as null|color
var/new_color = tgui_color_picker(src, "Pick eye color:","Eye Color", overlay_colors["Eyes"])
if(!new_color)
return 0
eyes = choice

View File

@@ -27,7 +27,7 @@
set desc = "Import a string of text that was made using the import style verb to get back that style"
set category = "Abilities.Settings"
var/input_style
input_style = sanitizeSafe(input(src,"Paste the style string you exported with Export Style.", "Style loading","") as text, MAX_MESSAGE_LEN)
input_style = sanitizeSafe(tgui_input_text(src,"Paste the style string you exported with Export Style.", "Style loading"))
if(input_style)
var/list/input_style_list = splittext(input_style, ";")
if((LAZYLEN(input_style_list) == 12) && (input_style_list[2] in underbelly_styles) && (input_style_list[4] in body_styles) && (input_style_list[6] in ear_styles) && (input_style_list[8] in mane_styles) && (input_style_list[10] in horn_styles) && (input_style_list[12] in ear_styles))

View File

@@ -292,7 +292,7 @@
if(usr != src)
usr.put_in_active_hand(Vac)
else
var/mob/living/L = input("Borrow Vac-Pack for") as null| mob in view(1,usr.loc)
var/mob/living/L = tgui_input_list(usr, "Borrow Vac-Pack for", "Swoopie", mobs_in_view(1, usr))
if(!L || L == usr)
return
L.put_in_active_hand(Vac)

View File

@@ -17,8 +17,8 @@
to_chat(src, span_warning("You are immune to resizing!"))
return
var/nagmessage = "Pick a size between 25 to 200%. (Only usable once!)"
var/new_size = input(nagmessage, "Pick a Size") as num|null
var/nagmessage = "Pick a size between [RESIZE_MINIMUM * 100] to [RESIZE_MAXIMUM * 100]%. (Only usable once!)"
var/new_size = tgui_input_number(src, nagmessage, "Pick a Size", size_multiplier*100, RESIZE_MAXIMUM * 100, RESIZE_MINIMUM * 100)
if(size_range_check(new_size))
resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE)
picked_size = TRUE

View File

@@ -186,14 +186,14 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
desc = initial(desc)
if(loaded)
var/confirm = alert(user, "Sever bluespace link? This location will become permanently inaccessible.", "Are you sure?", "No", "Yes")
var/confirm = tgui_alert(user, "Sever bluespace link? This location will become permanently inaccessible.", "Are you sure?", list("No", "Yes"))
if(confirm == "Yes")
if(is_empty(1)) // Dynamic POI's should only ever have 1 entry in map_z
destroy_poi(user) // Delete POI from dynamic z-level
else
to_chat(user, "Unable to sever link. Location likely contains living realspace entities.")
else
var/confirm = alert(user, "Transient subspace anomaly detected. Tether object to realspace?", "Stabilize anomaly?", "Yes", "No")
var/confirm = tgui_alert(user, "Transient subspace anomaly detected. Tether object to realspace?", "Stabilize anomaly?", list("Yes", "No"))
if(confirm == "Yes")
create_poi(user) // Load POI to dynamic z-level
@@ -224,17 +224,16 @@ GLOBAL_VAR_INIT(dynamic_sector_master, null)
map_sectors["[parent.map_z[i]]"] = src // Pass ownership of z-level to child, probably hacky and terribad, also mandatory for using forceMove() on shuttle landmarks
break // Terminate loop
if(!my_index) // No z-levels available
var/confirm = alert(user, "\[REDACTED\] matrix at capacity; a bluespace link must be permanently severed to stabilize this anomaly. Continue?", "Are you sure?", "No", "Yes")
if(confirm == "Yes")
my_index = parent.cull_child(user)
if(my_index)
parent.active_pois[my_index] = src
map_z[1] = parent.map_z[my_index]
map_sectors["[parent.map_z[my_index]]"] = src
else // Something went wrong, ideally due to all relevant z-levels containing players.
to_chat(user, "Unable to sever any bluespace link. All links likely contain living realspace entities.")
return
else
var/confirm = tgui_alert(user, "\[REDACTED\] matrix at capacity; a bluespace link must be permanently severed to stabilize this anomaly. Continue?", "Are you sure?", list("No", "Yes"))
if(confirm != "Yes")
return
my_index = parent.cull_child(user)
if(my_index)
parent.active_pois[my_index] = src
map_z[1] = parent.map_z[my_index]
map_sectors["[parent.map_z[my_index]]"] = src
else // Something went wrong, ideally due to all relevant z-levels containing players.
to_chat(user, "Unable to sever any bluespace link. All links likely contain living realspace entities.")
return
var/turf/T = locate(round(world.maxx/2), round(world.maxy/2), map_z[1]) // Find center turf, or near center for even-dimension maps.

View File

@@ -341,7 +341,7 @@
queue -= queue[index]
if("clear_queue")
// Remove all entries from the queue except the currently processing recipe.
var/confirm = alert(usr, "Are you sure you want to clear the running queue?", "Confirm", "No", "Yes")
var/confirm = tgui_alert(usr, "Are you sure you want to clear the running queue?", "Confirm", list("No", "Yes"))
if(confirm == "Yes")
if(busy)
// Oh no, I've broken code convention to remove all entries but the first.
@@ -362,7 +362,7 @@
if("emergency_stop")
// Stops everything if that's desirable for some reason.
if(busy)
var/confirm = alert(usr, "Are you sure you want to stall the machine?", "Confirm", "Yes", "No")
var/confirm = tgui_alert(usr, "Are you sure you want to stall the machine?", "Confirm", list("Yes", "No"))
if(confirm == "Yes")
stalled = TRUE
if("bottle_product")
@@ -388,7 +388,7 @@
if("rem_recipe")
// Allows the user to remove recipes while the machine is idle.
if(!busy)
var/confirm = alert(usr, "Are you sure you want to remove this recipe?", "Confirm", "No", "Yes")
var/confirm = tgui_alert(usr, "Are you sure you want to remove this recipe?", "Confirm", list("No", "Yes"))
if(confirm == "Yes")
var/index = params["rm_index"]
if(index in recipes)
@@ -479,12 +479,12 @@
// This proc is lets users create recipes step-by-step and exports a comma delineated list to chat. It's intended to teach how to use the machine.
/obj/machinery/chemical_synthesizer/proc/babystep_recipe(mob/user)
var/rec_name = sanitizeSafe(input(user, "Name your recipe. Consider including the output volume.", "Recipe naming", null) as text, MAX_NAME_LEN)
var/rec_name = sanitizeSafe(tgui_input_text(user, "Name your recipe. Consider including the output volume.", "Recipe naming"))
if(!rec_name || (rec_name in recipes)) // Code requires each recipe to have a unique name.
to_chat(user, "Please provide a unique recipe name!")
return
var/steps = 2 * CLAMP(round(input(user, "How many steps does your recipe contain (16 max)?", "Steps", null) as num), 0, RECIPE_MAX_STEPS) // Round to get a whole integer, clamp to ensure proper range.
var/steps = 2 * tgui_input_number(user, "How many steps does your recipe contain (16 max)?", "Steps", 1, RECIPE_MAX_STEPS, 1) // Round to get a whole integer, clamp to ensure proper range.
if(!steps)
to_chat(user, "Please input a valid number of steps!")
return
@@ -496,7 +496,7 @@
to_chat(user, "Please select a chemical!")
return
new_rec[++new_rec.len] = label // Add the reagent ID.
var/amount = CLAMP(round(input(user, "How much of the chemical would you like to add?", "Volume", null) as num), 0, src.reagents.maximum_volume)
var/amount = tgui_input_number(user, "How much of the chemical would you like to add?", "Volume", 1, src.reagents.maximum_volume, 1)
if(!amount)
to_chat(user, "Please select a volume!")
return
@@ -509,12 +509,12 @@
// This proc allows users to copy-paste a comma delineated list to create a recipe. The recipe will cause a stall() if formatted incorrectly.
/obj/machinery/chemical_synthesizer/proc/import_recipe(mob/user)
var/rec_name = sanitizeSafe(input(user, "Name your recipe. Consider including the output volume.", "Recipe naming", null) as text, MAX_NAME_LEN)
var/rec_name = sanitizeSafe(tgui_input_text(user, "Name your recipe. Consider including the output volume.", "Recipe naming", max_length=MAX_NAME_LEN), MAX_NAME_LEN)
if(!rec_name || (rec_name in recipes)) // Code requires each recipe to have a unique name.
to_chat(user, "Please provide a unique recipe name!")
return
var/rec_input = input(user, "Input your recipe as 'Chem1,vol1,Chem2,vol2,...'", "Import recipe", null)
var/rec_input = tgui_input_text(user, "Input your recipe as 'Chem1,vol1,Chem2,vol2,...'", "Import recipe")
if(!rec_input || (length(rec_input) > RECIPE_MAX_STRING) || !findtext(rec_input, ",")) // The smallest possible recipe will contain 1 comma.
to_chat(user, "Invalid input or recipe max length exceeded!")
return