diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index afac9b40f62..27a9597ff90 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -378,7 +378,7 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
#endif
-GLOBAL_LIST_INIT(pipe_paint_colors, list(
+GLOBAL_LIST_INIT(pipe_paint_colors, sortList(list(
"amethyst" = rgb(130,43,255), //supplymain
"blue" = rgb(0,0,255),
"brown" = rgb(178,100,56),
@@ -391,7 +391,7 @@ GLOBAL_LIST_INIT(pipe_paint_colors, list(
"red" = rgb(255,0,0),
"violet" = rgb(64,0,128),
"yellow" = rgb(255,198,0)
-))
+)))
#define MIASMA_CORPSE_MOLES 0.02
#define MIASMA_GIBS_MOLES 0.005
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index ea77376d403..03ed7b4262e 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -220,7 +220,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define ORBITRON "Orbitron"
#define SHARE "Share Tech Mono"
-GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
+GLOBAL_LIST_INIT(pda_styles, sortList(list(MONO, VT, ORBITRON, SHARE)))
/////////////////////////////////////
// atom.appearence_flags shortcuts //
@@ -462,4 +462,4 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
// art quality defines, used in datums/components/art.dm, elsewhere
#define BAD_ART 12.5
#define GOOD_ART 25
-#define GREAT_ART 50
\ No newline at end of file
+#define GREAT_ART 50
diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm
index dd3c0d2df32..165dae58383 100644
--- a/code/__HELPERS/cmp.dm
+++ b/code/__HELPERS/cmp.dm
@@ -102,3 +102,6 @@ GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_reagents_asc(datum/reagent/a, datum/reagent/b)
return sorttext(initial(b.name),initial(a.name))
+
+/proc/cmp_typepaths_asc(A, B)
+ return sorttext("[B]","[A]")
diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm
index 5d6106cf918..84d36f9db4b 100644
--- a/code/__HELPERS/files.dm
+++ b/code/__HELPERS/files.dm
@@ -11,7 +11,7 @@
if(path != root)
choices.Insert(1,"/")
- var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
+ var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in sortList(choices)
switch(choice)
if(null)
return
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 06c590a78c2..e33cc754baf 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -37,15 +37,18 @@
for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath()
GLOB.species_list[S.id] = spath
+ sortList(GLOB.species_list)
//Surgeries
for(var/path in subtypesof(/datum/surgery))
GLOB.surgeries_list += new path()
+ sortList(GLOB.surgeries_list)
//Materials
for(var/path in subtypesof(/datum/material))
var/datum/material/D = new path()
GLOB.materials_list[D.id] = D
+ sortList(GLOB.materials_list)
GLOB.emote_list = init_emote_list()
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 89366a6203b..e12816978d3 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -137,7 +137,7 @@
/proc/random_skin_tone()
return pick(GLOB.skin_tones)
-GLOBAL_LIST_INIT(skin_tones, list(
+GLOBAL_LIST_INIT(skin_tones, sortList(list(
"albino",
"caucasian1",
"caucasian2",
@@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(skin_tones, list(
"indian",
"african1",
"african2"
- ))
+ )))
GLOBAL_LIST_EMPTY(species_list)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 8d8c4263636..45682f184d7 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -281,7 +281,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/borgs = active_free_borgs()
if(borgs.len)
if(user)
- . = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in borgs
+ . = input(user,"Unshackled cyborg signals detected:", "Cyborg Selection", borgs[1]) in sortList(borgs)
else
. = pick(borgs)
return .
@@ -290,7 +290,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/list/ais = active_ais()
if(ais.len)
if(user)
- . = input(user,"AI signals detected:", "AI Selection", ais[1]) in ais
+ . = input(user,"AI signals detected:", "AI Selection", ais[1]) in sortList(ais)
else
. = pick(ais)
return .
@@ -1188,7 +1188,7 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
if(matches.len==1)
chosen = matches[1]
else
- chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
+ chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in sortList(matches)
if(!chosen)
return
chosen = matches[chosen]
diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm
index f71f241a1a4..1f7b93f6382 100644
--- a/code/_globalvars/lists/flavor_misc.dm
+++ b/code/_globalvars/lists/flavor_misc.dm
@@ -72,7 +72,7 @@ GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list(
GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things
-GLOBAL_LIST_INIT(ai_core_display_screens, list(
+GLOBAL_LIST_INIT(ai_core_display_screens, sortList(list(
":thinking:",
"Alien",
"Angel",
@@ -109,7 +109,7 @@ GLOBAL_LIST_INIT(ai_core_display_screens, list(
"Too Deep",
"Triumvirate",
"Triumvirate-M",
- "Weird"))
+ "Weird")))
/proc/resolve_ai_icon(input)
if(!input || !(input in GLOB.ai_core_display_screens))
@@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(ai_core_display_screens, list(
input = pick(GLOB.ai_core_display_screens - "Random")
return "ai-[lowertext(input)]"
-GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY))
+GLOBAL_LIST_INIT(security_depts_prefs, sortList(list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)))
//Backpacks
#define GBACKPACK "Grey Backpack"
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 0a778bc485a..aaf5fee4d2e 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -5,14 +5,14 @@
*/
// The default UI style is the first one in the list
-GLOBAL_LIST_INIT(available_ui_styles, list(
+GLOBAL_LIST_INIT(available_ui_styles, sortList(list(
"Midnight" = 'icons/mob/screen_midnight.dmi',
"Retro" = 'icons/mob/screen_retro.dmi',
"Plasmafire" = 'icons/mob/screen_plasmafire.dmi',
"Slimecore" = 'icons/mob/screen_slimecore.dmi',
"Operative" = 'icons/mob/screen_operative.dmi',
"Clockwork" = 'icons/mob/screen_clockwork.dmi'
-))
+)))
/proc/ui_style2icon(ui_style)
return GLOB.available_ui_styles[ui_style] || GLOB.available_ui_styles[GLOB.available_ui_styles[1]]
diff --git a/code/controllers/subsystem/traumas.dm b/code/controllers/subsystem/traumas.dm
index e6a1c9c5fac..969893e6714 100644
--- a/code/controllers/subsystem/traumas.dm
+++ b/code/controllers/subsystem/traumas.dm
@@ -12,9 +12,9 @@ SUBSYSTEM_DEF(traumas)
/datum/controller/subsystem/traumas/Initialize()
//phobia types is to pull from randomly for brain traumas, e.g. conspiracies is for special assignment only
- phobia_types = list("spiders", "space", "security", "clowns", "greytide", "lizards",
+ phobia_types = sortList(list("spiders", "space", "security", "clowns", "greytide", "lizards",
"skeletons", "snakes", "robots", "doctors", "authority", "the supernatural",
- "aliens", "strangers", "birds", "falling", "anime")
+ "aliens", "strangers", "birds", "falling", "anime"))
phobia_words = list("spiders" = strings(PHOBIA_FILE, "spiders"),
"space" = strings(PHOBIA_FILE, "space"),
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 07b6b709c47..ff7cd74152d 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -447,7 +447,7 @@
symptoms += SSdisease.list_symptoms.Copy()
do
if(user)
- var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
+ var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in sortList(symptoms, /proc/cmp_typepaths_asc)
if(isnull(symptom))
return
else if(istext(symptom))
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index a6eeca61e3e..ebfcd885340 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -451,7 +451,7 @@
A.admin_remove(usr)
if (href_list["role_edit"])
- var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in get_all_jobs()
+ var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in sortList(get_all_jobs())
if (!new_role)
return
assigned_role = new_role
@@ -491,7 +491,7 @@
if(1)
target_antag = antag_datums[1]
else
- var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
+ var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in sortList(antag_datums) + "(new custom antag)"
if (QDELETED(target))
return
else if(target == "(new custom antag)")
diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm
index 6e521d4f699..c299a0bfef0 100644
--- a/code/datums/mutations/actions.dm
+++ b/code/datums/mutations/actions.dm
@@ -60,7 +60,7 @@
if(!length(possible))
to_chat(user,"Despite your best efforts, there are no scents to be found on [sniffed]...")
return
- tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in possible
+ tracking_target = input(user, "Choose a scent to remember.", "Scent Tracking") as null|anything in sortNames(possible)
if(!tracking_target)
if(!old_target)
to_chat(user,"You decide against remembering any scents. Instead, you notice your own nose in your peripheral vision. This goes on to remind you of that one time you started breathing manually and couldn't stop. What an awful day that was.")
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index ae0f55c0d79..df44cfe1576 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (picked && is_station_level(picked.z))
GLOB.teleportlocs[AR.name] = AR
- sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
+ sortTim(GLOB.teleportlocs, /proc/cmp_text_asc)
/**
* Called when an area loads
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 0ad4be8fe7b..30d9844aed8 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -907,7 +907,7 @@
if(!valid_id)
to_chat(usr, "A reagent with that ID doesn't exist!")
if("Choose from a list")
- chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
+ chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in sortList(subtypesof(/datum/reagent), /proc/cmp_typepaths_asc)
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
if(chosen_id)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 1346e80282a..ee8b07315f6 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -35,7 +35,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
if(target && target.current)
def_value = target.current
- var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
+ var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in sortNames(possible_targets)
if (!new_target)
return
@@ -507,8 +507,8 @@ GLOBAL_LIST_EMPTY(possible_items)
return
/datum/objective/steal/admin_edit(mob/admin)
- var/list/possible_items_all = GLOB.possible_items+"custom"
- var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
+ var/list/possible_items_all = GLOB.possible_items
+ var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in sortNames(possible_items_all)+"custom"
if (!new_target)
return
@@ -812,7 +812,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/destroy/admin_edit(mob/admin)
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
- var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
+ var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in sortNames(possible_targets)
target = new_target.mind
else
to_chat(admin, "No active AIs with minds.")
@@ -1055,7 +1055,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/proc/generate_admin_objective_list()
GLOB.admin_objective_list = list()
- var/list/allowed_types = list(
+ var/list/allowed_types = sortList(list(
/datum/objective/assassinate,
/datum/objective/maroon,
/datum/objective/debrain,
@@ -1071,7 +1071,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/capture,
/datum/objective/absorb,
/datum/objective/custom
- )
+ ),/proc/cmp_typepaths_asc)
for(var/T in allowed_types)
var/datum/objective/X = T
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 42f09bc157e..c6c6631213c 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -113,7 +113,7 @@
to_chat(user, "You manage to eject the loaded PDA.")
else
var/obj/item/pda/P
- P = input(user, "Select your color!", "PDA Painting") as null|anything in colorlist
+ P = input(user, "Select your color!", "PDA Painting") as null|anything in sortNames(colorlist)
if(!P)
return
if(!in_range(src, user))
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index b711d7a2381..53784671da4 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -198,7 +198,7 @@
if(materials.materials[i] > 0)
list_to_show += i
- used_material = input("Choose [used_material]", "Custom Material") as null|anything in list_to_show
+ used_material = input("Choose [used_material]", "Custom Material") as null|anything in sortList(list_to_show, /proc/cmp_typepaths_asc)
if(!used_material)
return //Didn't pick any material, so you can't build shit either.
custom_materials[used_material] += amount_needed
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index fbd97bd2f45..a527bb4e1d3 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -201,7 +201,7 @@
droppable_parts += proxy_module
if(!droppable_parts.len)
return
- var/obj/item/choice = input(user, "Select a part to remove:", src) as null|obj in droppable_parts
+ var/obj/item/choice = input(user, "Select a part to remove:", src) as null|obj in sortNames(droppable_parts)
if(!choice || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
to_chat(user, "You remove [choice] from [src].")
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index 60819243aa3..23a65ad86e8 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -258,7 +258,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
IO |= text[1]
if(!IO.len)
to_chat(user, "No machinery detected.")
- var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO
+ var/S = input("Select the device set: ", "Selection", IO[1]) as anything in sortList(IO)
if(src)
src.input_tag = "[S]_in"
src.output_tag = "[S]_out"
diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm
index 935c162f8b7..6dffab445a3 100644
--- a/code/game/machinery/computer/dna_console.dm
+++ b/code/game/machinery/computer/dna_console.dm
@@ -883,7 +883,7 @@
if(CM.can_apply(HM))
chromosomes += CM
if(chromosomes.len)
- var/obj/item/chromosome/CM = input("Select a chromosome to apply", "Apply Chromosome") as null|anything in chromosomes
+ var/obj/item/chromosome/CM = input("Select a chromosome to apply", "Apply Chromosome") as null|anything in sortNames(chromosomes)
if(CM)
to_chat(usr, "You apply [CM] to [HM.name].")
stored_chromosomes -= CM
diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm
index 95d4e8cecb8..81e2b538e50 100644
--- a/code/game/machinery/computer/teleporter.dm
+++ b/code/game/machinery/computer/teleporter.dm
@@ -139,7 +139,7 @@
if(is_eligible(I))
L[avoid_assoc_duplicate_keys("[M.real_name] ([get_area(M)])", areaindex)] = I
- var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in L
+ var/desc = input("Please select a location to lock in.", "Locking Computer") as null|anything in sortList(L)
target = L[desc]
var/turf/T = get_turf(target)
log_game("[key_name(user)] has set the teleporter target to [target] at [AREACOORD(T)]")
@@ -153,7 +153,7 @@
if(!L.len)
to_chat(user, "No active connected stations located.")
return
- var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
+ var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in sortList(L)
var/obj/machinery/teleport/station/target_station = L[desc]
if(!target_station || !target_station.teleporter_hub)
return
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index 8446e0551cb..d6b36ee0324 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -136,7 +136,7 @@
var/list/available = list()
for(var/datum/track/S in songs)
available[S.song_name] = S
- var/selected = input(usr, "Choose your song", "Track:") as null|anything in available
+ var/selected = input(usr, "Choose your song", "Track:") as null|anything in sortList(available)
if(QDELETED(src) || !selected || !istype(available[selected], /datum/track))
return
selection = available[selected]
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 4064ef027ac..8962e38353e 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1137,7 +1137,7 @@
else
optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
- var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist
+ var/paintjob = input(user, "Please select a paintjob for this airlock.") in sortList(optionlist)
if((!in_range(src, usr) && loc != usr) || !W.use_paint(user))
return
switch(paintjob)
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index fe6f5ae15cc..92653598977 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -269,7 +269,7 @@ Possible to do for anyone motivated enough:
LAZYADD(callnames[A], I)
callnames -= get_area(src)
- var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in callnames
+ var/result = input(usr, "Choose an area to call", "Holocall") as null|anything in sortNames(callnames)
if(QDELETED(usr) || !result || outgoing_call)
return
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 2c7085f72d4..9a5e44ed23d 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -535,7 +535,7 @@ GLOBAL_LIST_EMPTY(allCasters)
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
if( (!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
- channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels
+ channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in sortList(available_channels)
updateUsrDialog()
else if(href_list["set_new_message"])
var/temp_message = trim(stripped_multiline_input(usr, "Write your Feed story", "Network Channel Handler", msg))
diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm
index 917d2fa4a86..1033eb18211 100644
--- a/code/game/machinery/scan_gate.dm
+++ b/code/game/machinery/scan_gate.dm
@@ -167,14 +167,14 @@
return
switch(action)
if("set_mode")
- var/new_mode = input("Choose the scan mode","Scan Mode") as null|anything in list(SCANGATE_NONE,
+ var/new_mode = input("Choose the scan mode","Scan Mode") as null|anything in sortList(list(SCANGATE_NONE,
SCANGATE_MINDSHIELD,
SCANGATE_NANITES,
SCANGATE_DISEASE,
SCANGATE_GUNS,
SCANGATE_WANTED,
SCANGATE_SPECIES,
- SCANGATE_NUTRITION)
+ SCANGATE_NUTRITION))
if(new_mode)
scangate_mode = new_mode
. = TRUE
@@ -182,13 +182,13 @@
reverse = !reverse
. = TRUE
if("set_disease_threshold")
- var/new_threshold = input("Set disease threshold","Scan Mode") as null|anything in list(DISEASE_SEVERITY_POSITIVE,
+ var/new_threshold = input("Set disease threshold","Scan Mode") as null|anything in sortList(list(DISEASE_SEVERITY_POSITIVE,
DISEASE_SEVERITY_NONTHREAT,
DISEASE_SEVERITY_MINOR,
DISEASE_SEVERITY_MEDIUM,
DISEASE_SEVERITY_HARMFUL,
DISEASE_SEVERITY_DANGEROUS,
- DISEASE_SEVERITY_BIOHAZARD)
+ DISEASE_SEVERITY_BIOHAZARD))
if(new_threshold)
disease_threshold = new_threshold
. = TRUE
@@ -199,7 +199,7 @@
. = TRUE
//Some species are not scannable, like abductors (too unknown), androids (too artificial) or skeletons (too magic)
if("set_target_species")
- var/new_species = input("Set target species","Scan Mode") as null|anything in list("Human",
+ var/new_species = input("Set target species","Scan Mode") as null|anything in sortList(list("Human",
"Lizardperson",
"Flyperson",
"Plasmaman",
@@ -207,7 +207,7 @@
"Jellyperson",
"Podperson",
"Golem",
- "Zombie")
+ "Zombie"))
if(new_species)
switch(new_species)
if("Human")
@@ -230,8 +230,8 @@
detect_species = /datum/species/zombie
. = TRUE
if("set_target_nutrition")
- var/new_nutrition = input("Set target nutrition level","Scan Mode") as null|anything in list("Starving",
- "Obese")
+ var/new_nutrition = input("Set target nutrition level","Scan Mode") as null|anything in sortList(list("Starving",
+ "Obese"))
if(new_nutrition)
switch(new_nutrition)
if("Starving")
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 74da0949c3d..ec843c7c33d 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -13,7 +13,7 @@
return
if(can_buckle && has_buckled_mobs())
if(buckled_mobs.len > 1)
- var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
+ var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sortNames(buckled_mobs)
if(user_unbuckle_mob(unbuckled,user))
return 1
else
diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm
index cf8fd7645d3..f3f8a4a4220 100644
--- a/code/game/objects/items/cardboard_cutouts.dm
+++ b/code/game/objects/items/cardboard_cutouts.dm
@@ -85,7 +85,7 @@
if(crayon.is_capped)
to_chat(user, "Take the cap off first!")
return
- var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
+ var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in sortList(possible_appearances)
if(!new_appearance || !crayon || !user.canUseTopic(src, BE_CLOSE))
return
if(!do_after(user, 10, FALSE, src, TRUE))
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 0ec1707f25f..61f1e8e7d1c 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -539,7 +539,7 @@
display_vending_names_paths = list()
for(var/path in vending_names_paths)
display_vending_names_paths[vending_names_paths[path]] = path
- var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in display_vending_names_paths
+ var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths)
set_type(display_vending_names_paths[choice])
else
return ..()
diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm
index 962064b03e5..1e66b0600aa 100644
--- a/code/game/objects/items/devices/instruments.dm
+++ b/code/game/objects/items/devices/instruments.dm
@@ -74,7 +74,7 @@
song.instrumentExt = insTypes[name]
/obj/item/instrument/piano_synth/proc/selectInstrument() // Moved here so it can be used by the action and PAI software panel without copypasta
- var/chosen = input("Choose the type of instrument you want to use", "Instrument Selection", song.instrumentDir) as null|anything in insTypes
+ var/chosen = input("Choose the type of instrument you want to use", "Instrument Selection", song.instrumentDir) as null|anything in sortList(insTypes)
if(!insTypes[chosen])
return
return changeInstrument(chosen)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index efb68656433..0f097c901c3 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -796,7 +796,7 @@ GENE SCANNER
for(var/A in buffer)
options += get_display_name(A)
- var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in options
+ var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
var/sequence
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 74220144364..8e974caf5eb 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -227,7 +227,7 @@
if (initial(rodtype.chaplain_spawnable))
display_names[initial(rodtype.name)] = rodtype
- var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
+ var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in sortList(display_names, /proc/cmp_typepaths_asc)
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.incapacitated() || reskinned)
return
diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm
index c369d59f98d..3932a410314 100644
--- a/code/game/objects/items/miscellaneous.dm
+++ b/code/game/objects/items/miscellaneous.dm
@@ -38,7 +38,7 @@
var/list/display_names = generate_display_names()
if(!display_names.len)
return
- var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
+ var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in sortList(display_names)
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm
index 7164fe77337..44742ad6720 100644
--- a/code/game/objects/items/paint.dm
+++ b/code/game/objects/items/paint.dm
@@ -56,7 +56,7 @@
icon_state = "paint_neutral"
/obj/item/paint/anycolor/attack_self(mob/user)
- var/t1 = input(user, "Please select a color:", "[src]", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white")
+ var/t1 = input(user, "Please select a color:", "[src]", null) in sortList(list( "red", "blue", "green", "yellow", "violet", "black", "white"))
if ((user.get_active_held_item() != src || user.stat || user.restrained()))
return
switch(t1)
diff --git a/code/game/objects/items/pinpointer.dm b/code/game/objects/items/pinpointer.dm
index ffc9e1a9c20..1c39af41fce 100644
--- a/code/game/objects/items/pinpointer.dm
+++ b/code/game/objects/items/pinpointer.dm
@@ -141,7 +141,7 @@
user.visible_message("[user]'s pinpointer fails to detect a signal.", "Your pinpointer fails to detect a signal.")
return
- var/A = input(user, "Person to track", "Pinpoint") in names
+ var/A = input(user, "Person to track", "Pinpoint") in sortNames(names)
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
return
diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm
index d8b2c6953bd..4e9ea90d2a0 100644
--- a/code/game/objects/items/storage/boxes.dm
+++ b/code/game/objects/items/storage/boxes.dm
@@ -860,7 +860,7 @@
to_chat(user, "You can't modify [src] with items still inside!")
return
var/list/designs = list(NODESIGN, NANOTRASEN, SYNDI, HEART, SMILEY, "Cancel")
- var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) in designs
+ var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) in sortList(designs)
if(get_dist(usr, src) > 1)
to_chat(usr, "You have moved too far away!")
return
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 57c00a6d3cb..0877794e8a6 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -309,7 +309,7 @@
var/output = icon2html(src, M, unique_reskin[V])
to_chat(M, "[V]: [output]")
- var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin
+ var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in sortList(unique_reskin)
if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src))
if(!unique_reskin[choice])
return
diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm
index 57a8f95730e..dd887c061ca 100644
--- a/code/game/objects/structures/barsigns.dm
+++ b/code/game/objects/structures/barsigns.dm
@@ -122,7 +122,7 @@
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
- var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in get_bar_names()
+ var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in sortList(get_bar_names())
if(!picked_name)
return
chosen_sign = set_sign_by_name(picked_name)
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 632366e2abc..984fb4b5a28 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -106,6 +106,7 @@
var/datum/species/S = speciestype
if(initial(S.changesource_flags) & MIRROR_MAGIC)
choosable_races += initial(S.id)
+ choosable_races = sortList(choosable_races)
..()
/obj/structure/mirror/magic/lesser/New()
diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm
index daed91e31c8..f35e0c40e16 100644
--- a/code/game/objects/structures/signs/_signs.dm
+++ b/code/game/objects/structures/signs/_signs.dm
@@ -43,7 +43,7 @@
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
"Hydroponics", "Xenobiology")
var/obj/structure/sign/sign_type
- switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
+ switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sortList(sign_types))
if("Blank")
sign_type = /obj/structure/sign/basic
if("Secure Area")
diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm
index 2fef88886d8..c5848a861e4 100644
--- a/code/modules/admin/admin_investigate.dm
+++ b/code/modules/admin/admin_investigate.dm
@@ -22,7 +22,7 @@
else
logs_missing += "[subject] (empty)"
- var/list/combined = logs_present + logs_missing
+ var/list/combined = sortList(logs_present) + sortList(logs_missing)
var/selected = input("Investigate what?", "Investigate") as null|anything in combined
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 0918c786f36..b82531fbe77 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -559,7 +559,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
var/type_length = length("/obj/effect/proc_holder/spell") + 2
for(var/A in GLOB.spells)
spell_list[copytext("[A]", type_length)] = A
- var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_list
+ var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
if(!S)
return
@@ -580,7 +580,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set desc = "Remove a spell from the selected mob."
if(T && T.mind)
- var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in T.mind.spell_list
+ var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
if(S)
T.mind.RemoveSpell(S)
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
@@ -594,7 +594,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(!istype(T))
to_chat(src, "You can only give a disease to a mob of type /mob/living.")
return
- var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
+ var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, /proc/cmp_typepaths_asc)
if(!D)
return
T.ForceContractDisease(new D, FALSE, TRUE)
diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm
index ff49944dc4e..83baf826638 100644
--- a/code/modules/admin/create_object.dm
+++ b/code/modules/admin/create_object.dm
@@ -19,7 +19,7 @@
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item,
/obj/item/reagent_containers, /obj/item/gun)
- var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
+ var/path = input("Select the path of the object you wish to create.", "Path", /obj) in sortList(create_object_forms, /proc/cmp_typepaths_asc)
var/html_form = create_object_forms[path]
if (!html_form)
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index d7d1cd9e17e..5f29e314289 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -446,7 +446,7 @@
if("Random")
E = new /datum/round_event/disease_outbreak()
if("Choose")
- var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in typesof(/datum/disease)
+ var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease, /proc/cmp_typepaths_asc))
E = new /datum/round_event/disease_outbreak{}()
var/datum/round_event/disease_outbreak/DO = E
DO.virus_type = virus
diff --git a/code/modules/admin/team_panel.dm b/code/modules/admin/team_panel.dm
index 33f4bec5332..6e2987486bf 100644
--- a/code/modules/admin/team_panel.dm
+++ b/code/modules/admin/team_panel.dm
@@ -111,7 +111,7 @@
for(var/mob/M in GLOB.mob_list)
if(M.mind)
minds |= M.mind
- var/datum/mind/value = input("Select new member:", "New team member", null) as null|anything in minds
+ var/datum/mind/value = input("Select new member:", "New team member", null) as null|anything in sortNames(minds)
if (!value)
return
@@ -169,7 +169,7 @@
//This is here if you want admin created teams to tell each other apart easily.
/datum/team/custom/proc/admin_force_hud(mob/user)
var/list/possible_icons = icon_states('icons/mob/hud.dmi')
- var/new_hud_state = input(user,"Choose hud icon state","Custom HUD","traitor") as null|anything in possible_icons
+ var/new_hud_state = input(user,"Choose hud icon state","Custom HUD","traitor") as null|anything in sortList(possible_icons)
if(!new_hud_state)
return
//suppose could ask for color too
@@ -180,4 +180,4 @@
for(var/datum/mind/M in members)
custom_hud.join_hud(M.current)
- set_antag_hud(M.current,custom_hud_state)
\ No newline at end of file
+ set_antag_hud(M.current,custom_hud_state)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 51e3fd3c8c7..31d8e0755e3 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -609,7 +609,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
roundstart_rules[newrule.name] = newrule
- var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in roundstart_rules
+ var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortNames(roundstart_rules)
if (added_rule)
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
@@ -644,7 +644,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
var/datum/dynamic_ruleset/latejoin/newrule = new rule()
latejoin_rules[newrule.name] = newrule
- var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in latejoin_rules
+ var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in sortNames(latejoin_rules)
if (added_rule)
var/datum/game_mode/dynamic/mode = SSticker.mode
mode.forced_latejoin_rule = latejoin_rules[added_rule]
@@ -673,7 +673,7 @@
for (var/rule in subtypesof(/datum/dynamic_ruleset/midround))
var/datum/dynamic_ruleset/midround/newrule = new rule()
midround_rules[newrule.name] = rule
- var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in midround_rules
+ var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in sortNames(midround_rules)
if (added_rule)
var/datum/game_mode/dynamic/mode = SSticker.mode
log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
@@ -1742,7 +1742,7 @@
var/list/available_channels = list()
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
available_channels += F.channel_name
- src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
+ src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in sortList(available_channels) )
src.access_news_network()
else if(href_list["ac_set_new_message"])
diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm
index 4848babb878..7fd873e126a 100644
--- a/code/modules/admin/verbs/borgpanel.dm
+++ b/code/modules/admin/verbs/borgpanel.dm
@@ -7,7 +7,7 @@
return
if (!istype(borgo, /mob/living/silicon/robot))
- borgo = input("Select a borg", "Select a borg", null, null) as null|anything in GLOB.silicon_mobs
+ borgo = input("Select a borg", "Select a borg", null, null) as null|anything in sortNames(GLOB.silicon_mobs)
if (!istype(borgo, /mob/living/silicon/robot))
to_chat(usr, "Borg is required for borgpanel")
diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm
index 7093ee23ea1..1ef35187740 100644
--- a/code/modules/admin/verbs/cinematic.dm
+++ b/code/modules/admin/verbs/cinematic.dm
@@ -6,6 +6,6 @@
if(!SSticker)
return
- var/datum/cinematic/choice = input(src,"Cinematic","Choose",null) as anything in subtypesof(/datum/cinematic)
+ var/datum/cinematic/choice = input(src,"Cinematic","Choose",null) as anything in sortList(subtypesof(/datum/cinematic), /proc/cmp_typepaths_asc)
if(choice)
Cinematic(initial(choice.id),world,null)
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 5346188a0d6..f4c91795372 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -96,7 +96,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/mob/C in GLOB.mob_list)
if(C.key)
available.Add(C)
- var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
+ var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in sortNames(available)
if(!choice)
return 0
if(!isobserver(choice))
@@ -162,7 +162,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(matches.len==0)
return
- var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in matches
+ var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in sortList(matches)
if(hsbitem)
hsbitem = matches[hsbitem]
var/counter = 0
@@ -494,14 +494,17 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
message_admins("[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(H)] to [dresscode].")
/client/proc/robust_dress_shop()
- var/list/outfits = list("Naked","Custom","As Job...", "As Plasmaman...")
+
+ var/list/baseoutfits = list("Naked","Custom","As Job...", "As Plasmaman...")
+ var/list/outfits = list()
var/list/paths = subtypesof(/datum/outfit) - typesof(/datum/outfit/job) - typesof(/datum/outfit/plasmaman)
+
for(var/path in paths)
var/datum/outfit/O = path //not much to initalize here but whatever
if(initial(O.can_be_admin_equipped))
outfits[initial(O.name)] = path
- var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in outfits
+ var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
if (isnull(dresscode))
return
@@ -516,7 +519,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(initial(O.can_be_admin_equipped))
job_outfits[initial(O.name)] = path
- dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in job_outfits
+ dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
dresscode = job_outfits[dresscode]
if(isnull(dresscode))
return
@@ -529,7 +532,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(initial(O.can_be_admin_equipped))
plasmaman_outfits[initial(O.name)] = path
- dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in plasmaman_outfits
+ dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
dresscode = plasmaman_outfits[dresscode]
if(isnull(dresscode))
return
@@ -538,7 +541,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
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 custom_names
+ var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
dresscode = custom_names[selected_name]
if(isnull(dresscode))
return
@@ -697,7 +700,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
names[name] = ruin_landmark
- var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names
+ var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in sortList(names)
var/obj/effect/landmark/ruin/landmark = names[ruinname]
@@ -728,7 +731,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/name in SSmapping.lava_ruins_templates)
names[name] = list(SSmapping.lava_ruins_templates[name], ZTRAIT_LAVA_RUINS, /area/lavaland/surface/outdoors/unexplored)
- var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in names
+ var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in sortList(names)
var/data = names[ruinname]
if (!data)
return
diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm
index c5c9a0daf4b..f4638172e76 100644
--- a/code/modules/admin/verbs/map_template_loadverb.dm
+++ b/code/modules/admin/verbs/map_template_loadverb.dm
@@ -4,7 +4,7 @@
var/datum/map_template/template
- var/map = input(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates
+ var/map = input(src, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in sortList(SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
diff --git a/code/modules/admin/verbs/maprotation.dm b/code/modules/admin/verbs/maprotation.dm
index ed9d23a84d9..f999fdfc060 100644
--- a/code/modules/admin/verbs/maprotation.dm
+++ b/code/modules/admin/verbs/maprotation.dm
@@ -33,7 +33,7 @@
mapname += "\]"
maprotatechoices[mapname] = VM
- var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in maprotatechoices
+ var/chosenmap = input("Choose a map to change to", "Change Map") as null|anything in sortList(maprotatechoices)
if (!chosenmap)
return
SSticker.maprotatechecked = 1
@@ -41,4 +41,4 @@
message_admins("[key_name_admin(usr)] is changing the map to [VM.map_name]")
log_admin("[key_name(usr)] is changing the map to [VM.map_name]")
if (SSmapping.changemap(VM) == 0)
- message_admins("[key_name_admin(usr)] has changed the map to [VM.map_name]")
\ No newline at end of file
+ message_admins("[key_name_admin(usr)] has changed the map to [VM.map_name]")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index ad80969dcdc..b4d02d7ccf1 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -296,7 +296,7 @@
continue //we have a live body we are tied to
candidates += M.ckey
if(candidates.len)
- ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
+ ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in sortKey(candidates)
else
to_chat(usr, "Error: create_xeno(): no suitable candidates.")
if(!istext(ckey))
@@ -890,7 +890,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
- var/weather_type = input("Choose a weather", "Weather") as null|anything in subtypesof(/datum/weather)
+ var/weather_type = input("Choose a weather", "Weather") as null|anything in sortList(subtypesof(/datum/weather), /proc/cmp_typepaths_asc)
if(!weather_type)
return
@@ -1042,7 +1042,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_ROD, ADMIN_PUNISHMENT_SUPPLYPOD_QUICK, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING)
- var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
+ var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in sortList(punishment_list)
if(QDELETED(target) || !punishment)
return
@@ -1205,7 +1205,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
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 = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
if(!chosen_trait)
return
chosen_trait = availible_traits[chosen_trait]
@@ -1222,7 +1222,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
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 = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
if(!source)
return
REMOVE_TRAIT(D,chosen_trait,source)
diff --git a/code/modules/admin/view_variables/topic_basic.dm b/code/modules/admin/view_variables/topic_basic.dm
index fd3e52d1abf..2a1d4c7a6ff 100644
--- a/code/modules/admin/view_variables/topic_basic.dm
+++ b/code/modules/admin/view_variables/topic_basic.dm
@@ -51,11 +51,11 @@
if(!check_rights(NONE))
return
var/list/names = list()
- var/list/componentsubtypes = subtypesof(/datum/component)
+ var/list/componentsubtypes = sortList(subtypesof(/datum/component), /proc/cmp_typepaths_asc)
names += "---Components---"
names += componentsubtypes
names += "---Elements---"
- names += subtypesof(/datum/element)
+ names += sortList(subtypesof(/datum/element), /proc/cmp_typepaths_asc)
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm
index b95b5343b89..da9e2e5b636 100644
--- a/code/modules/antagonists/blob/powers.dm
+++ b/code/modules/antagonists/blob/powers.dm
@@ -354,7 +354,7 @@
var/datum/blobstrain/bs = pick((GLOB.valid_blobstrains))
choices[initial(bs.name)] = bs
- var/choice = input(usr, "Please choose a new strain","Strain") as anything in choices
+ var/choice = input(usr, "Please choose a new strain","Strain") as anything in sortList(choices, /proc/cmp_typepaths_asc)
if (choice && choices[choice] && !QDELETED(src))
var/datum/blobstrain/bs = choices[choice]
set_strain(bs)
diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm
index d8e68de95cf..11a0ce974a9 100644
--- a/code/modules/antagonists/brother/brother.dm
+++ b/code/modules/antagonists/brother/brother.dm
@@ -71,7 +71,7 @@
continue
candidates[L.mind.name] = L.mind
- var/choice = input(admin,"Choose the blood brother.", "Brother") as null|anything in candidates
+ var/choice = input(admin,"Choose the blood brother.", "Brother") as null|anything in sortNames(candidates)
if(!choice)
return
var/datum/mind/bro = candidates[choice]
diff --git a/code/modules/antagonists/changeling/powers/hivemind.dm b/code/modules/antagonists/changeling/powers/hivemind.dm
index 35ebbb4be45..6f503755a6e 100644
--- a/code/modules/antagonists/changeling/powers/hivemind.dm
+++ b/code/modules/antagonists/changeling/powers/hivemind.dm
@@ -58,7 +58,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
to_chat(user, "The airwaves already have all of our DNA!")
return
- var/chosen_name = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names
+ var/chosen_name = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in sortList(names)
if(!chosen_name)
return
@@ -103,7 +103,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
to_chat(user, "There's no new DNA to absorb from the air!")
return
- var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
+ var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in sortList(names)
if(!S)
return
var/datum/changelingprofile/chosen_prof = names[S]
diff --git a/code/modules/antagonists/changeling/powers/humanform.dm b/code/modules/antagonists/changeling/powers/humanform.dm
index 588fdcccb22..0acc59315c7 100644
--- a/code/modules/antagonists/changeling/powers/humanform.dm
+++ b/code/modules/antagonists/changeling/powers/humanform.dm
@@ -15,7 +15,7 @@
for(var/datum/changelingprofile/prof in changeling.stored_profiles)
names += "[prof.name]"
- var/chosen_name = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
+ var/chosen_name = input("Select the target DNA: ", "Target DNA", null) as null|anything in sortList(names)
if(!chosen_name)
return
diff --git a/code/modules/antagonists/changeling/powers/transform.dm b/code/modules/antagonists/changeling/powers/transform.dm
index 5d32d353ddf..64b36c7f851 100644
--- a/code/modules/antagonists/changeling/powers/transform.dm
+++ b/code/modules/antagonists/changeling/powers/transform.dm
@@ -149,7 +149,7 @@
for(var/datum/changelingprofile/prof in stored_profiles)
names += "[prof.name]"
- var/chosen_name = input(prompt, title, null) as null|anything in names
+ var/chosen_name = input(prompt, title, null) as null|anything in sortList(names)
if(!chosen_name)
return
diff --git a/code/modules/antagonists/devil/sintouched/sintouched.dm b/code/modules/antagonists/devil/sintouched/sintouched.dm
index 9983e5f5994..92f0896bb36 100644
--- a/code/modules/antagonists/devil/sintouched/sintouched.dm
+++ b/code/modules/antagonists/devil/sintouched/sintouched.dm
@@ -49,7 +49,7 @@
/datum/antagonist/sintouched/admin_add(datum/mind/new_owner,mob/admin)
var/choices = sins + "Random"
- var/chosen_sin = input(admin,"What kind ?","Sin kind") as null|anything in choices
+ var/chosen_sin = input(admin,"What kind ?","Sin kind") as null|anything in sortList(choices)
if(!chosen_sin)
return
if(chosen_sin in sins)
@@ -80,4 +80,4 @@
#undef SIN_GREED
#undef SIN_PRIDE
#undef SIN_SLOTH
-#undef SIN_WRATH
\ No newline at end of file
+#undef SIN_WRATH
diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm
index d061db682ad..cae362e7cf5 100644
--- a/code/modules/antagonists/wizard/equipment/artefact.dm
+++ b/code/modules/antagonists/wizard/equipment/artefact.dm
@@ -319,7 +319,7 @@
/obj/item/voodoo/attack_self(mob/user)
if(!target && possible.len)
- target = input(user, "Select your victim!", "Voodoo") as null|anything in possible
+ target = input(user, "Select your victim!", "Voodoo") as null|anything in sortNames(possible)
return
if(user.zone_selected == BODY_ZONE_CHEST)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 2e98441002a..b1dd6cb9f6b 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -404,7 +404,7 @@
return
switch(action)
if("relabel")
- var/label = input("New canister label:", name) as null|anything in label2types
+ var/label = input("New canister label:", name) as null|anything in sortList(label2types)
if(label && !..())
var/newtype = label2types[label]
if(newtype)
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index 77aa1e5ba6c..1aa70547441 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -88,7 +88,7 @@
else
chargesa--
insistinga = 0
- var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","Peace")
+ var/wish = input("You want...","Wish") as null|anything in sortList(list("Power","Wealth","Immortality","Peace"))
switch(wish)
if("Power")
to_chat(user, "Your wish is granted, but at a terrible cost...")
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index feb29d1e51a..ea8821d9370 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1391,7 +1391,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
friendlyname += " (disabled)"
maplist[friendlyname] = VM.map_name
maplist[default] = null
- var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist
+ var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in sortList(maplist)
if (pickedmap)
preferred_map = maplist[pickedmap]
diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm
index 0d40d5c6fb3..89200636479 100644
--- a/code/modules/client/preferences_toggles.dm
+++ b/code/modules/client/preferences_toggles.dm
@@ -247,11 +247,11 @@ TOGGLE_CHECKBOX(/datum/verbs/menu/Settings, listen_bank_card)()
return C.prefs.chat_toggles & CHAT_BANKCARD
-GLOBAL_LIST_INIT(ghost_forms, list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
+GLOBAL_LIST_INIT(ghost_forms, sortList(list("ghost","ghostking","ghostian2","skeleghost","ghost_red","ghost_black", \
"ghost_blue","ghost_yellow","ghost_green","ghost_pink", \
"ghost_cyan","ghost_dblue","ghost_dred","ghost_dgreen", \
"ghost_dcyan","ghost_grey","ghost_dyellow","ghost_dpink", "ghost_purpleswirl","ghost_funkypurp","ghost_pinksherbert","ghost_blazeit",\
- "ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost"))
+ "ghost_mellow","ghost_rainbow","ghost_camo","ghost_fire", "catghost")))
/client/proc/pick_form()
if(!is_content_unlocked())
alert("This setting is for accounts with BYOND premium only.")
diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm
index 4e523bda1af..d754930614d 100644
--- a/code/modules/clothing/chameleon.dm
+++ b/code/modules/clothing/chameleon.dm
@@ -182,7 +182,7 @@
/datum/action/item_action/chameleon/change/proc/select_look(mob/user)
var/obj/item/picked_item
var/picked_name
- picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list
+ picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in sortList(chameleon_list, /proc/cmp_typepaths_asc)
if(!picked_name)
return
picked_item = chameleon_list[picked_name]
diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm
index 9fae14d1541..d10cf19d133 100644
--- a/code/modules/clothing/masks/gasmask.dm
+++ b/code/modules/clothing/masks/gasmask.dm
@@ -94,7 +94,7 @@
options["The Rainbow Color"] ="rainbow"
options["The Jester"] ="chaos" //Nepeta33Leijon is holding me captive and forced me to help with this please send help
- var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options
+ var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in sortList(options)
if(src && choice && !user.incapacitated() && in_range(user,src))
icon_state = options[choice]
@@ -135,7 +135,7 @@
options["Effrayé"] = "scaredmime"
options["Excité"] ="sexymime"
- var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in options
+ var/choice = input(user,"To what form do you wish to Morph this mask?","Morph Mask") in sortList(options)
if(src && choice && !user.incapacitated() && in_range(user,src))
icon_state = options[choice]
@@ -207,7 +207,7 @@
options["Confused Tiki"] = "tiki_confused"
options["Angry Tiki"] ="tiki_angry"
- var/choice = input(M,"To what form do you wish to change this mask?","Morph Mask") in options
+ var/choice = input(M,"To what form do you wish to change this mask?","Morph Mask") in sortList(options)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
diff --git a/code/modules/events/false_alarm.dm b/code/modules/events/false_alarm.dm
index 6e17c83bc34..d625d2d8060 100644
--- a/code/modules/events/false_alarm.dm
+++ b/code/modules/events/false_alarm.dm
@@ -18,7 +18,7 @@
continue
possible_types += E
- forced_type = input(usr, "Select the scare.","False event") as null|anything in possible_types
+ forced_type = input(usr, "Select the scare.","False event") as null|anything in sortNames(possible_types)
/datum/round_event_control/falsealarm/canSpawnEvent(players_amt, gamemode)
return ..() && length(gather_false_events())
diff --git a/code/modules/events/wizard/madness.dm b/code/modules/events/wizard/madness.dm
index a88e82013c2..ac86236623b 100644
--- a/code/modules/events/wizard/madness.dm
+++ b/code/modules/events/wizard/madness.dm
@@ -12,7 +12,7 @@
var/suggested = pick(strings(REDPILL_FILE, "redpill_questions"))
- forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", suggested) as text|null) || suggested
+ forced_secret = (input(usr, "What horrifying truth will you reveal?", "Curse of Madness", sortList(suggested)) as text|null) || suggested
/datum/round_event/wizard/madness/start()
var/datum/round_event_control/wizard/madness/C = control
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index ff1ae13f600..59bbb8fc171 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -120,7 +120,7 @@
if(!istype(user))
return
if(contents.len)
- var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in contents
+ var/obj/item/book/choice = input(user, "Which book would you like to remove from the shelf?") as null|obj in sortNames(contents)
if(choice)
if(!(user.mobility_flags & MOBILITY_USE) || user.stat || user.restrained() || !in_range(loc, user))
return
diff --git a/code/modules/mining/equipment/marker_beacons.dm b/code/modules/mining/equipment/marker_beacons.dm
index b9072ffd329..5bb569042bf 100644
--- a/code/modules/mining/equipment/marker_beacons.dm
+++ b/code/modules/mining/equipment/marker_beacons.dm
@@ -1,5 +1,5 @@
/*****************Marker Beacons**************************/
-GLOBAL_LIST_INIT(marker_beacon_colors, list(
+GLOBAL_LIST_INIT(marker_beacon_colors, sortList(list(
"Random" = FALSE, //not a true color, will pick a random color
"Burgundy" = LIGHT_COLOR_FLARE,
"Bronze" = LIGHT_COLOR_ORANGE,
@@ -12,7 +12,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, list(
"Indigo" = LIGHT_COLOR_DARK_BLUE,
"Purple" = LIGHT_COLOR_PURPLE,
"Violet" = LIGHT_COLOR_LAVENDER,
-"Fuchsia" = LIGHT_COLOR_PINK))
+"Fuchsia" = LIGHT_COLOR_PINK)))
/obj/item/stack/marker_beacon
name = "marker beacon"
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index 55c73116d1e..df04e4bba27 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
else
var/A
- A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in possible_beacons
+ A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in sortNames(possible_beacons)
if(!A)
return
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 44376fb01be..75b84a5fd51 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -1043,7 +1043,7 @@
var/mob/living/L = I
da_list[L.real_name] = L
- var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in da_list
+ var/choice = input(user,"Who do you want dead?","Choose Your Victim") as null|anything in sortNames(da_list)
choice = da_list[choice]
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index 4154bb2e5c4..884f34099b6 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -133,7 +133,7 @@
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit")
- var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in items
+ var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in sortList(items)
if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
return
var/drop_location = drop_location()
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 354856b8d1a..31486767c66 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -598,7 +598,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!(L in GLOB.player_list) && !L.mind)
possessible += L
- var/mob/living/target = input("Your new life begins today!", "Possess Mob", null, null) as null|anything in possessible
+ var/mob/living/target = input("Your new life begins today!", "Possess Mob", null, null) as null|anything in sortNames(possessible)
if(!target)
return 0
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 79d0aeb3cef..dde41ced10a 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -92,7 +92,7 @@ Doesn't work on other aliens/AI.*/
var/list/options = list()
for(var/mob/living/Ms in oview(user))
options += Ms
- var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as null|mob in options
+ var/mob/living/M = input("Select who to whisper to:","Whisper to?",null) as null|mob in sortNames(options)
if(!M)
return 0
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
@@ -127,7 +127,7 @@ Doesn't work on other aliens/AI.*/
for(var/mob/living/carbon/A in oview(user))
if(A.getorgan(/obj/item/organ/alien/plasmavessel))
aliens_around.Add(A)
- var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around
+ var/mob/living/carbon/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in sortNames(aliens_around)
if(!M)
return 0
var/amount = input("Amount:", "Transfer Plasma to [M]") as num|null
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7f1455fcdb0..14e29c9375f 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -925,7 +925,7 @@
limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
for(var/obj/item/bodypart/B in bodyparts)
limb_list -= B.body_zone
- var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list
+ var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in sortList(limb_list)
if(result)
var/obj/item/bodypart/BP = get_bodypart(result)
switch(edit_action)
@@ -967,7 +967,7 @@
for(var/i in artpaths)
var/datum/martial_art/M = i
artnames[initial(M.name)] = M
- var/result = input(usr, "Choose the martial art to teach","JUDO CHOP") as null|anything in artnames
+ var/result = input(usr, "Choose the martial art to teach","JUDO CHOP") as null|anything in sortNames(artnames)
if(!usr)
return
if(QDELETED(src))
@@ -983,7 +983,7 @@
if(!check_rights(NONE))
return
var/list/traumas = subtypesof(/datum/brain_trauma)
- var/result = input(usr, "Choose the brain trauma to apply","Traumatize") as null|anything in traumas
+ var/result = input(usr, "Choose the brain trauma to apply","Traumatize") as null|anything in sortList(traumas, /proc/cmp_typepaths_asc)
if(!usr)
return
if(QDELETED(src))
@@ -1005,7 +1005,7 @@
if(!check_rights(NONE))
return
var/list/hallucinations = subtypesof(/datum/hallucination)
- var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in hallucinations
+ var/result = input(usr, "Choose the hallucination to apply","Send Hallucination") as null|anything in sortList(hallucinations, /proc/cmp_typepaths_asc)
if(!usr)
return
if(QDELETED(src))
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index b094f67572a..cbed8f9f628 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -842,7 +842,7 @@
var/name = initial(mut.name)
options[dna.check_mutation(mut) ? "[name] (Remove)" : "[name] (Add)"] = mut
- var/result = input(usr, "Choose mutation to add/remove","Mutation Mod") as null|anything in options
+ var/result = input(usr, "Choose mutation to add/remove","Mutation Mod") as null|anything in sortList(options)
if(result)
if(result == "Clear")
dna.remove_all_mutations()
@@ -862,7 +862,7 @@
var/qname = initial(T.name)
options[has_quirk(T) ? "[qname] (Remove)" : "[qname] (Add)"] = T
- var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in options
+ var/result = input(usr, "Choose quirk to add/remove","Quirk Mod") as null|anything in sortList(options)
if(result)
if(result == "Clear")
for(var/datum/quirk/q in roundstart_quirks)
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index c0042fa8a59..1a741c14526 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -681,7 +681,7 @@
var/list/options = list()
for(var/mob/living/Ms in oview(H))
options += Ms
- var/mob/living/M = input("Select who to send your message to:","Send thought to?",null) as null|mob in options
+ var/mob/living/M = input("Select who to send your message to:","Send thought to?",null) as null|mob in sortNames(options)
if(!M)
return
if(M.anti_magic_check(FALSE, FALSE, TRUE, 0))
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 9163565da4d..2321012a7bc 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -608,7 +608,7 @@
for(var/i in C.network)
cameralist[i] = i
var/old_network = network
- network = input(U, "Which network would you like to view?") as null|anything in cameralist
+ network = input(U, "Which network would you like to view?") as null|anything in sortList(cameralist)
if(!U.eyeobj)
U.view_core()
@@ -640,7 +640,7 @@
if(incapacitated())
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Thinking", "Friend Computer", "Dorfy", "Blue Glow", "Red Glow")
- var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
+ var/emote = input("Please, select a status!", "AI Status", null, null) in sortList(ai_emotions)
for (var/each in GLOB.ai_status_displays) //change status of displays
var/obj/machinery/status_display/ai/M = each
M.emotion = emote
@@ -672,7 +672,7 @@
personnel_list["[t.fields["name"]]: [t.fields["rank"]]"] = t.fields["image"]//Pull names, rank, and image.
if(personnel_list.len)
- input = input("Select a crew member:") as null|anything in personnel_list
+ input = input("Select a crew member:") as null|anything in sortList(personnel_list)
var/icon/character_icon = personnel_list[input]
if(character_icon)
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
@@ -697,7 +697,7 @@
"spider" = 'icons/mob/animal.dmi'
)
- input = input("Please select a hologram:") as null|anything in icon_list
+ input = input("Please select a hologram:") as null|anything in sortList(icon_list)
if(input)
qdel(holo_icon)
switch(input)
@@ -718,7 +718,7 @@
"clock" = 'icons/mob/ai.dmi'
)
- input = input("Please select a hologram:") as null|anything in icon_list
+ input = input("Please select a hologram:") as null|anything in sortList(icon_list)
if(input)
qdel(holo_icon)
switch(input)
@@ -972,7 +972,7 @@
to_chat(src, "No usable AI shell beacons detected.")
if(!target || !(target in possible)) //If the AI is looking for a new shell, or its pre-selected shell is no longer valid
- target = input(src, "Which body to control?") as null|anything in possible
+ target = input(src, "Which body to control?") as null|anything in sortNames(possible)
if (!target || target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src)))
return
diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm
index 054d02c8aa2..a32316f9afc 100644
--- a/code/modules/mob/living/silicon/pai/pai_shell.dm
+++ b/code/modules/mob/living/silicon/pai/pai_shell.dm
@@ -70,7 +70,7 @@
if(!isturf(loc) && loc != card)
to_chat(src, "You can not change your holochassis composite while not on the ground or in your card!")
return FALSE
- var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis
+ var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in sortList(possible_chassis)
if(!choice)
return FALSE
chassis = choice
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index f8fc65e24da..cdf24ad6209 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -156,7 +156,7 @@
radio.attack_self(src)
if("image") // Set pAI card display face
- var/newImage = input("Select your new display image.", "Display Image", "Happy") in list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What", "Sunglasses")
+ var/newImage = input("Select your new display image.", "Display Image", "Happy") in sortList(list("Happy", "Cat", "Extremely Happy", "Face", "Laugh", "Off", "Sad", "Angry", "What", "Sunglasses"))
var/pID = 1
switch(newImage)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index d3109fc5302..f2e99eb5d39 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -205,7 +205,7 @@
if(!CONFIG_GET(flag/disable_secborg))
modulelist["Security"] = /obj/item/robot_module/security
- var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in modulelist
+ var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in sortList(modulelist)
if(!input_module || module.type != /obj/item/robot_module)
return
diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm
index 0b76ed5a024..556674e29ee 100644
--- a/code/modules/mob/living/silicon/robot/robot_modules.dm
+++ b/code/modules/mob/living/silicon/robot/robot_modules.dm
@@ -469,7 +469,7 @@
/obj/item/robot_module/butler/be_transformed_to(obj/item/robot_module/old_module)
var/mob/living/silicon/robot/R = loc
- var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in list("Waitress", "Butler", "Tophat", "Kent", "Bro")
+ var/borg_icon = input(R, "Select an icon!", "Robot Icon", null) as null|anything in sortList(list("Waitress", "Butler", "Tophat", "Kent", "Bro"))
if(!borg_icon)
return FALSE
switch(borg_icon)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
index e1109992995..219e5d8fd0d 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm
@@ -95,11 +95,11 @@
/mob/living/simple_animal/drone/proc/pickVisualAppearence()
picked = FALSE
- var/appearence = input("Choose your appearance!", "Appearance", "Maintenance Drone") in list("Maintenance Drone", "Repair Drone", "Scout Drone")
+ var/appearence = input("Choose your appearance!", "Appearance", "Maintenance Drone") in sortList(list("Maintenance Drone", "Repair Drone", "Scout Drone"))
switch(appearence)
if("Maintenance Drone")
visualAppearence = MAINTDRONE
- colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange")
+ colour = input("Choose your colour!", "Colour", "grey") in sortList(list("grey", "blue", "red", "green", "pink", "orange"))
icon_state = "[visualAppearence]_[colour]"
icon_living = "[visualAppearence]_[colour]"
icon_dead = "[visualAppearence]_dead"
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index e04a81be68f..682bb06e515 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -415,7 +415,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(P.reset)
guardians -= P //clear out guardians that are already reset
if(guardians.len)
- var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in guardians
+ var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in sortNames(guardians)
if(G)
to_chat(src, "You attempt to reset [G.real_name]'s personality...")
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100)
@@ -507,7 +507,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
if(random)
guardiantype = pick(possible_guardians)
else
- guardiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
+ guardiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in sortList(possible_guardians)
if(!guardiantype)
to_chat(user, "[failure_message]" )
used = FALSE
diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
index 28f22a42590..9458742270e 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm
@@ -97,7 +97,7 @@
set name = "Remove Surveillance Snare"
set category = "Guardian"
set desc = "Disarm unwanted surveillance snares."
- var/picked_snare = input(src, "Pick which snare to remove", "Remove Snare") as null|anything in src.snares
+ var/picked_snare = input(src, "Pick which snare to remove", "Remove Snare") as null|anything in sortNames(src.snares)
if(picked_snare)
src.snares -= picked_snare
qdel(picked_snare)
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index cb119be0ebc..96619bf5ca0 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -32,7 +32,7 @@
if(C!=src && Adjacent(C))
choices += C
- var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
+ var/mob/living/M = input(src,"Who do you wish to feed on?") in null|sortNames(choices)
if(!M)
return 0
if(CanFeedon(M))
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 59272c23416..e3137c79c2f 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -549,7 +549,7 @@
/mob/living/carbon/human/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
+ var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in sortList(mobtypes, /proc/cmp_typepaths_asc)
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
@@ -583,7 +583,7 @@
/mob/proc/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_animal)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
+ var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in sortList(mobtypes, /proc/cmp_typepaths_asc)
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index 0811e3945f6..36424d201cf 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -420,7 +420,7 @@
var/obj/item/computer_hardware/H = all_components[h]
component_names.Add(H.name)
- var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in component_names
+ var/choice = input(user, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in sortList(component_names)
if(!choice)
return
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
index 8c8f92e522f..333061814df 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm
@@ -2,7 +2,7 @@
//Allows the ninja to kidnap people
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet()
var/mob/living/carbon/human/H = affecting
- var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in oview(H)
+ var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in sortNames(oview(H))
if(QDELETED(C)||!(C in oview(H)))
return 0
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index f595b9bbd37..339649d7d09 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -555,11 +555,6 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list(new/datum/stack_recipe("cable restrain
custom_materials = list()
cost = 1
-/obj/item/stack/cable_coil/cyborg/attack_self(mob/user)
- var/picked = input(user,"Pick a cable color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white")
- cable_color = picked
- update_icon()
-
/obj/structure/cable_bridge
name = "cable bridge"
desc = "A bridge to connect different cable layers, or link terminals to incompatible cable layers"
diff --git a/code/modules/power/pipecleaners.dm b/code/modules/power/pipecleaners.dm
index baeb719c947..ab3d2e1a683 100644
--- a/code/modules/power/pipecleaners.dm
+++ b/code/modules/power/pipecleaners.dm
@@ -209,7 +209,7 @@ By design, d1 is the smallest direction and d2 is the highest
cost = 1
/obj/item/stack/pipe_cleaner_coil/cyborg/attack_self(mob/user)
- var/pipe_cleaner_color = input(user,"Pick a pipe cleaner color.","Cable Color") in list("red","yellow","green","blue","pink","orange","cyan","white")
+ var/pipe_cleaner_color = input(user,"Pick a pipe cleaner color.","Cable Color") in sortList(list("red","yellow","green","blue","pink","orange","cyan","white"))
pipe_cleaner_color = pipe_cleaner_color
update_icon()
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 734eee26ae4..101b4a25ad2 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -407,7 +407,7 @@
return
if((can_flashlight && gun_light) && (can_bayonet && bayonet)) //give them a choice instead of removing both
var/list/possible_items = list(gun_light, bayonet)
- var/obj/item/item_to_remove = input(user, "Select an attachment to remove", "Attachment Removal") as null|obj in possible_items
+ var/obj/item/item_to_remove = input(user, "Select an attachment to remove", "Attachment Removal") as null|obj in sortNames(possible_items)
if(!item_to_remove || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
return remove_gun_attachment(user, I, item_to_remove)
diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm
index eff12e5c4eb..ed4a472d8b9 100644
--- a/code/modules/reagents/reagent_containers/borghydro.dm
+++ b/code/modules/reagents/reagent_containers/borghydro.dm
@@ -123,7 +123,7 @@ Borg Hypospray
log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
- var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]]
+ var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in sortList(reagent_names)]]
if(!chosen_reagent)
return
mode = chosen_reagent
diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm
index 19ae4e8db0f..c36e1be0f2f 100644
--- a/code/modules/research/nanites/nanite_programs/sensor.dm
+++ b/code/modules/research/nanites/nanite_programs/sensor.dm
@@ -280,7 +280,7 @@
damage = CLAMP(round(new_damage, 1), 0, 500)
if(setting == "Damage Type")
var/list/damage_types = list("Brute","Burn","Toxin","Oxygen","Cellular")
- var/new_damage_type = input("Choose the damage type", name) as null|anything in damage_types
+ var/new_damage_type = input("Choose the damage type", name) as null|anything in sortList(damage_types)
if(!new_damage_type)
return
damage_type = new_damage_type
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index 385f23672df..52bf53c2940 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -273,7 +273,7 @@
if(setting == "Hallucination Type")
var/list/possible_hallucinations = list("Random","Message","Battle","Sound","Weird Sound","Station Message","Health","Alert","Fire","Shock","Plasma Flood")
- var/hal_type_choice = input("Choose the hallucination type", name) as null|anything in possible_hallucinations
+ var/hal_type_choice = input("Choose the hallucination type", name) as null|anything in sortList(possible_hallucinations)
if(!hal_type_choice)
return
switch(hal_type_choice)
@@ -288,7 +288,7 @@
if("Battle")
hal_type = "Battle"
var/sound_list = list("random","laser","disabler","esword","gun","stunprod","harmbaton","bomb")
- var/hal_choice = input("Choose the hallucination battle type", name) as null|anything in sound_list
+ var/hal_choice = input("Choose the hallucination battle type", name) as null|anything in sortList(sound_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
@@ -296,7 +296,7 @@
if("Sound")
hal_type = "Sound"
var/sound_list = list("random","airlock","airlock pry","console","explosion","far explosion","mech","glass","alarm","beepsky","mech","wall decon","door hack")
- var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sound_list
+ var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sortList(sound_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
@@ -304,7 +304,7 @@
if("Weird Sound")
hal_type = "Weird Sound"
var/sound_list = list("random","phone","hallelujah","highlander","laughter","hyperspace","game over","creepy","tesla")
- var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sound_list
+ var/hal_choice = input("Choose the hallucination sound", name) as null|anything in sortList(sound_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
@@ -312,7 +312,7 @@
if("Station Message")
hal_type = "Station Message"
var/msg_list = list("random","ratvar","shuttle dock","blob alert","malf ai","meteors","supermatter")
- var/hal_choice = input("Choose the hallucination station message", name) as null|anything in msg_list
+ var/hal_choice = input("Choose the hallucination station message", name) as null|anything in sortList(msg_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
@@ -320,7 +320,7 @@
if("Health")
hal_type = "Health"
var/health_list = list("random","critical","dead","healthy")
- var/hal_choice = input("Choose the health status", name) as null|anything in health_list
+ var/hal_choice = input("Choose the health status", name) as null|anything in sortList(health_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
@@ -334,7 +334,7 @@
if("Alert")
hal_type = "Alert"
var/alert_list = list("random","not_enough_oxy","not_enough_tox","not_enough_co2","too_much_oxy","too_much_co2","too_much_tox","newlaw","nutrition","charge","gravity","fire","locked","hacked","temphot","tempcold","pressure")
- var/hal_choice = input("Choose the alert", name) as null|anything in alert_list
+ var/hal_choice = input("Choose the alert", name) as null|anything in sortList(alert_list)
if(!hal_choice || hal_choice == "random")
hal_details = null
else
diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm
index d4af485d475..30a0d06bc59 100644
--- a/code/modules/research/nanites/nanite_programs/utility.dm
+++ b/code/modules/research/nanites/nanite_programs/utility.dm
@@ -108,7 +108,7 @@
/datum/nanite_program/triggered/self_scan/set_extra_setting(user, setting)
if(setting == "Scan Type")
var/list/scan_types = list("Medical","Chemical","Nanite")
- var/new_scan_type = input("Choose the scan type", name) as null|anything in scan_types
+ var/new_scan_type = input("Choose the scan type", name) as null|anything in sortList(scan_types)
if(!new_scan_type)
return
scan_type = new_scan_type
diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm
index 8a29008432e..6b699521588 100644
--- a/code/modules/research/xenobiology/crossbreeding/charged.dm
+++ b/code/modules/research/xenobiology/crossbreeding/charged.dm
@@ -168,7 +168,7 @@ Charged extracts:
if(!istype(H))
to_chat(user, "You must be a humanoid to use this!")
return
- var/racechoice = input(H, "Choose your slime subspecies.", "Slime Selection") as null|anything in subtypesof(/datum/species/jelly)
+ var/racechoice = input(H, "Choose your slime subspecies.", "Slime Selection") as null|anything in sortList(subtypesof(/datum/species/jelly), /proc/cmp_typepaths_asc)
if(!racechoice)
to_chat(user, "You decide not to become a slime for now.")
return
diff --git a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
index 419212d36d5..cdb14b68b6c 100644
--- a/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
+++ b/code/modules/research/xenobiology/crossbreeding/selfsustaining.dm
@@ -32,7 +32,7 @@ Self-sustaining extracts:
return ..()
/obj/item/autoslime/attack_self(mob/user)
- var/reagentselect = input(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction") as null|anything in extract.activate_reagents
+ var/reagentselect = input(user, "Choose the reagent the extract will produce.", "Self-sustaining Reaction") as null|anything in sortList(extract.activate_reagents, /proc/cmp_typepaths_asc)
var/amount = 5
var/secondary
diff --git a/code/modules/research/xenobiology/crossbreeding/stabilized.dm b/code/modules/research/xenobiology/crossbreeding/stabilized.dm
index e7f21a4a505..340b78b1a49 100644
--- a/code/modules/research/xenobiology/crossbreeding/stabilized.dm
+++ b/code/modules/research/xenobiology/crossbreeding/stabilized.dm
@@ -134,7 +134,7 @@ Stabilized extracts:
generate_mobtype()
/obj/item/slimecross/stabilized/gold/attack_self(mob/user)
- var/choice = input(user, "Which do you want to reset?", "Familiar Adjustment") as null|anything in list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name")
+ var/choice = input(user, "Which do you want to reset?", "Familiar Adjustment") as null|anything in sortList(list("Familiar Location", "Familiar Species", "Familiar Sentience", "Familiar Name"))
if(!user.canUseTopic(src, BE_CLOSE))
return
if(isliving(user))
diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm
index b2fd06a1a17..1ca0f4c63cd 100644
--- a/code/modules/shuttle/navigation_computer.dm
+++ b/code/modules/shuttle/navigation_computer.dm
@@ -353,7 +353,7 @@
L["([L.len]) [nav_beacon.name] locked"] = null
playsound(console, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
- var/selected = input("Choose location to jump to", "Locations", null) as null|anything in L
+ var/selected = input("Choose location to jump to", "Locations", null) as null|anything in sortList(L)
if(QDELETED(src) || QDELETED(target) || !isliving(target))
return
playsound(src, "terminal_type", 25, FALSE)
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index 206e73e2d9f..c1c47390670 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -428,7 +428,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
//Adds a safety check post-input to make sure those targets are actually in range.
var/mob/M
if(!random_target)
- M = input("Choose the target for the spell.", "Targeting") as null|mob in possible_targets
+ M = input("Choose the target for the spell.", "Targeting") as null|mob in sortNames(possible_targets)
else
switch(random_target_priority)
if(TARGET_RANDOM)
diff --git a/code/modules/spells/spell_types/devil.dm b/code/modules/spells/spell_types/devil.dm
index fdfc7d84f64..05b11dc4bf8 100644
--- a/code/modules/spells/spell_types/devil.dm
+++ b/code/modules/spells/spell_types/devil.dm
@@ -54,7 +54,7 @@
user.put_in_hands(contract)
else
var/obj/item/paper/contract/infernal/contract // = new(user.loc, C.mind, contractType, user.mind)
- var/contractTypeName = input(user, "What type of contract?") in list ("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship")
+ var/contractTypeName = input(user, "What type of contract?") in sortList(list("Power", "Wealth", "Prestige", "Magic", "Knowledge", "Friendship"))
switch(contractTypeName)
if("Power")
contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind)
diff --git a/code/modules/spells/spell_types/shapeshift.dm b/code/modules/spells/spell_types/shapeshift.dm
index c71ee52285f..c548d38fc9f 100644
--- a/code/modules/spells/spell_types/shapeshift.dm
+++ b/code/modules/spells/spell_types/shapeshift.dm
@@ -36,7 +36,7 @@
for(var/path in possible_shapes)
var/mob/living/simple_animal/A = path
animal_list[initial(A.name)] = path
- var/new_shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as null|anything in animal_list
+ var/new_shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as null|anything in sortList(animal_list)
if(shapeshift_type)
return
shapeshift_type = new_shapeshift_type
diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm
index 8e771cad915..3042a1967c0 100644
--- a/code/modules/surgery/implant_removal.dm
+++ b/code/modules/surgery/implant_removal.dm
@@ -1,5 +1,5 @@
/datum/surgery/implant_removal
- name = "implant removal"
+ name = "Implant removal"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/extract_implant, /datum/surgery_step/close)
target_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list(BODY_ZONE_CHEST)
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index 49eac16a6c4..9f85a041146 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -111,7 +111,7 @@
organs -= O
organs[O.name] = O
- I = input("Remove which organ?", "Surgery", null, null) as null|anything in organs
+ I = input("Remove which organ?", "Surgery", null, null) as null|anything in sortNames(organs)
if(I && user && target && user.Adjacent(target) && user.get_active_held_item() == tool)
I = organs[I]
if(!I)
diff --git a/code/modules/surgery/surgery_helpers.dm b/code/modules/surgery/surgery_helpers.dm
index d4bc03013c4..91adde1ca71 100644
--- a/code/modules/surgery/surgery_helpers.dm
+++ b/code/modules/surgery/surgery_helpers.dm
@@ -44,7 +44,7 @@
if(!available_surgeries.len)
return
- var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
+ var/P = input("Begin which procedure?", "Surgery", null, null) as null|anything in sortList(available_surgeries)
if(P && user && user.Adjacent(M) && (I in user))
var/datum/surgery/S = available_surgeries[P]