Adds sorting to most input() lists (#47117)

* Adds sorting to most input() lists.

* Sorted some global lists, added more input sorting

* Should now use correct sort everywhere.

* compiles

* Last fixes.
This commit is contained in:
skoglol
2019-10-22 13:28:42 +02:00
committed by Rob Bailey
parent 52be6b096a
commit 938e66f62c
108 changed files with 183 additions and 178 deletions

View File

@@ -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

View File

@@ -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 //

View File

@@ -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]")

View File

@@ -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

View File

@@ -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()

View File

@@ -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)

View File

@@ -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]

View File

@@ -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"

View File

@@ -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]]

View File

@@ -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"),

View File

@@ -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))

View File

@@ -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)")

View File

@@ -60,7 +60,7 @@
if(!length(possible))
to_chat(user,"<span class='warning'>Despite your best efforts, there are no scents to be found on [sniffed]...</span>")
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,"<span class='warning'>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.</span>")

View File

@@ -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

View File

@@ -907,7 +907,7 @@
if(!valid_id)
to_chat(usr, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
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)

View File

@@ -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, "<span class='boldwarning'>No active AIs with minds.</span>")
@@ -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

View File

@@ -113,7 +113,7 @@
to_chat(user, "<span class='info'>You manage to eject the loaded PDA.</span>")
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))

View File

@@ -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

View File

@@ -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, "<span class='notice'>You remove [choice] from [src].</span>")

View File

@@ -258,7 +258,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
IO |= text[1]
if(!IO.len)
to_chat(user, "<span class='alert'>No machinery detected.</span>")
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"

View File

@@ -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, "<span class='notice'>You apply [CM] to [HM.name].</span>")
stored_chromosomes -= CM

View File

@@ -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, "<span class='alert'>No active connected stations located.</span>")
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

View File

@@ -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]

View File

@@ -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)

View File

@@ -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

View File

@@ -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))

View File

@@ -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")

View File

@@ -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

View File

@@ -85,7 +85,7 @@
if(crayon.is_capped)
to_chat(user, "<span class='warning'>Take the cap off first!</span>")
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))

View File

@@ -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 ..()

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -141,7 +141,7 @@
user.visible_message("<span class='notice'>[user]'s pinpointer fails to detect a signal.</span>", "<span class='notice'>Your pinpointer fails to detect a signal.</span>")
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

View File

@@ -860,7 +860,7 @@
to_chat(user, "<span class='warning'>You can't modify [src] with items still inside!</span>")
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, "<span class='warning'>You have moved too far away!</span>")
return

View File

@@ -309,7 +309,7 @@
var/output = icon2html(src, M, unique_reskin[V])
to_chat(M, "[V]: <span class='reallybig'>[output]</span>")
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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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")

View File

@@ -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

View File

@@ -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, "<span class='notice'>You can only give a disease to a mob of type /mob/living.</span>")
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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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"])

View File

@@ -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, "<span class='warning'>Borg is required for borgpanel</span>")

View File

@@ -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)

View File

@@ -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("<span class='adminnotice'>[key_name_admin(usr)] changed the equipment of [ADMIN_LOOKUPFLW(H)] to [dresscode].</span>")
/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

View File

@@ -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]

View File

@@ -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

View File

@@ -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, "<span class='danger'>Error: create_xeno(): no suitable candidates.</span>")
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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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]

View File

@@ -58,7 +58,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
to_chat(user, "<span class='warning'>The airwaves already have all of our DNA!</span>")
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, "<span class='warning'>There's no new DNA to absorb from the air!</span>")
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]

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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, "<B>Your wish is granted, but at a terrible cost...</B>")

View File

@@ -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]

View File

@@ -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.")

View File

@@ -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]

View File

@@ -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]

View File

@@ -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())

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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]

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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))

View File

@@ -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)

View File

@@ -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))

View File

@@ -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

View File

@@ -70,7 +70,7 @@
if(!isturf(loc) && loc != card)
to_chat(src, "<span class='boldwarning'>You can not change your holochassis composite while not on the ground or in your card!</span>")
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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -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"

View File

@@ -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, "<span class='holoparasite'>You attempt to reset <font color=\"[G.namedatum.colour]\"><b>[G.real_name]</b></font>'s personality...</span>")
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

View File

@@ -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)

View File

@@ -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))

View File

@@ -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, "<span class='danger'>Sorry but this mob type is currently unavailable.</span>")
@@ -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, "<span class='danger'>Sorry but this mob type is currently unavailable.</span>")

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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()

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -168,7 +168,7 @@ Charged extracts:
if(!istype(H))
to_chat(user, "<span class='warning'>You must be a humanoid to use this!</span>")
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, "<span class='notice'>You decide not to become a slime for now.</span>")
return

View File

@@ -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

Some files were not shown because too many files have changed in this diff Show More