diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm
index 99368490fe6..9671691a7ce 100644
--- a/code/_onclick/hud/ai.dm
+++ b/code/_onclick/hud/ai.dm
@@ -33,7 +33,7 @@
if(..())
return
var/mob/living/silicon/ai/AI = usr
- var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
+ var/target_name = tgui_input_list(AI, "Select a target", "Tracking", AI.trackable_mobs())
AI.ai_camera_track(target_name)
/atom/movable/screen/ai/camera_light
diff --git a/code/datums/components/cult_ritual_item.dm b/code/datums/components/cult_ritual_item.dm
index 98fdb5cc4ad..eb5876fd612 100644
--- a/code/datums/components/cult_ritual_item.dm
+++ b/code/datums/components/cult_ritual_item.dm
@@ -258,7 +258,7 @@
stack_trace("[type] - [cultist] attempted to scribe a rune, but the global rune list is empty!")
return FALSE
- entered_rune_name = input(cultist, "Choose a rite to scribe.", "Sigils of Power") as null|anything in GLOB.rune_types
+ entered_rune_name = tgui_input_list(cultist, "Choose a rite to scribe", "Sigils of Power", GLOB.rune_types)
if(!entered_rune_name || !can_scribe_rune(tool, cultist))
return FALSE
diff --git a/code/datums/elements/surgery_initiator.dm b/code/datums/elements/surgery_initiator.dm
index 18e95ba8b4b..0f1d07d5129 100644
--- a/code/datums/elements/surgery_initiator.dm
+++ b/code/datums/elements/surgery_initiator.dm
@@ -65,7 +65,7 @@
if(!available_surgeries.len)
return
- var/pick_your_surgery = input("Begin which procedure?", "Surgery", null, null) as null|anything in sort_list(available_surgeries)
+ var/pick_your_surgery = tgui_input_list(user, "Which procedure?", "Surgery", sort_list(available_surgeries))
if(pick_your_surgery && user?.Adjacent(livingtarget) && (source in user))
var/datum/surgery/surgeryinstance_notonmob = available_surgeries[pick_your_surgery]
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index af2da872dd9..5458ca95ec3 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -206,7 +206,7 @@
if(materials.materials[i] > 0)
list_to_show += i
- used_material = input("Choose [used_material]", "Custom Material") as null|anything in sort_list(list_to_show, /proc/cmp_typepaths_asc)
+ used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sort_list(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/tracking.dm b/code/game/machinery/camera/tracking.dm
index cf57acbafe5..4eb93a21449 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -16,7 +16,7 @@
/mob/living/silicon/ai/proc/show_camera_list()
var/list/cameras = get_camera_list()
- var/camera = input(src, "Choose which camera you want to view", "Cameras") as null|anything in cameras
+ var/camera = tgui_input_list(src, "Choose which camera you want to view", "Cameras", cameras)
switchCamera(cameras[camera])
/datum/trackable
diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm
index ca452f28f4f..e102f5ad556 100644
--- a/code/game/machinery/computer/camera_advanced.dm
+++ b/code/game/machinery/computer/camera_advanced.dm
@@ -288,7 +288,7 @@
T["[netcam.c_tag][netcam.can_use() ? null : " (Deactivated)"]"] = netcam
playsound(origin, 'sound/machines/terminal_prompt.ogg', 25, FALSE)
- var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T
+ var/camera = tgui_input_list(usr, "Camera to view", "Cameras", T)
var/obj/machinery/camera/final = T[camera]
playsound(src, "terminal_type", 25, FALSE)
if(final)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index eeb349aa275..e079a2f63f1 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1198,7 +1198,7 @@
return
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
- var/current_paintjob = input(user, "Please select a paintjob for this airlock.") as null|anything in sort_list(painter.available_paint_jobs)
+ var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sort_list(painter.available_paint_jobs))
if(!current_paintjob) // if the user clicked cancel on the popup, return
return
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index d73239213dd..c11329674aa 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -608,7 +608,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(!silent)
playsound(src, 'sound/machines/terminal_select.ogg', 15, TRUE)
if("Drone Phone")
- var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
+ var/alert_s = tgui_input_list(U, "Alert severity level", "Ping Drones", list("Low","Medium","High","Critical"))
var/area/A = get_area(U)
if(A && alert_s && !QDELETED(U))
var/msg = span_boldnotice("NON-DRONE PING: [U.name]: [alert_s] priority alert in [A.name]!")
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 8d9ccd8a83a..d50c1b78c37 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -845,7 +845,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 sort_list(options)
+ var/answer = tgui_input_list(user, "Analyze Potential", "Sequence Analyzer", sort_list(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/wayfinding.dm b/code/game/objects/items/wayfinding.dm
index d3701336396..d35dac22a90 100644
--- a/code/game/objects/items/wayfinding.dm
+++ b/code/game/objects/items/wayfinding.dm
@@ -262,7 +262,7 @@
to_chat(user, span_notice("Your pinpointer fails to detect a signal."))
return
- var/A = input(user, "", "Pinpoint") as null|anything in sort_list(beacons)
+ var/A = tgui_input_list(user, "Select a location", "Pinpoint", sort_list(beacons))
if(!A || QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated())
return
diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm
index ef67297576c..0ad2a35a664 100644
--- a/code/game/objects/structures/barsigns.dm
+++ b/code/game/objects/structures/barsigns.dm
@@ -123,7 +123,7 @@
/obj/structure/sign/barsign/proc/pick_sign(mob/user)
- var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in sort_list(get_bar_names())
+ var/picked_name = tgui_input_list(user, "Available Signage", "Bar Sign", sort_list(get_bar_names()))
if(!picked_name)
return
chosen_sign = set_sign_by_name(picked_name)
diff --git a/code/modules/antagonists/changeling/powers/humanform.dm b/code/modules/antagonists/changeling/powers/humanform.dm
index a42277706b4..6e82cc195d8 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 sort_list(names)
+ var/chosen_name = tgui_input_list(user, "Target DNA", "Transformation", sort_list(names))
if(!chosen_name)
return
diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm
index c23f9fc6b6b..b327cab822f 100644
--- a/code/modules/antagonists/cult/blood_magic.dm
+++ b/code/modules/antagonists/cult/blood_magic.dm
@@ -45,7 +45,7 @@
to_chat(owner, span_cultitalic("You cannot store more than [MAX_BLOODCHARGE] spells. Pick a spell to remove."))
else
to_chat(owner, span_cultitalic("You cannot store more than [RUNELESS_MAX_BLOODCHARGE] spells without an empowering rune! Pick a spell to remove."))
- var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
+ var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
if(nullify_spell)
qdel(nullify_spell)
return
@@ -57,9 +57,9 @@
var/cult_name = initial(J.name)
possible_spells[cult_name] = J
possible_spells += "(REMOVE SPELL)"
- entered_spell_name = input(owner, "Pick a blood spell to prepare...", "Spell Choices") as null|anything in possible_spells
+ entered_spell_name = tgui_input_list(owner, "Blood spell to prepare", "Spell Choices", possible_spells)
if(entered_spell_name == "(REMOVE SPELL)")
- var/nullify_spell = input(owner, "Choose a spell to remove.", "Current Spells") as null|anything in spells
+ var/nullify_spell = tgui_input_list(owner, "Spell to remove", "Current Spells", spells)
if(nullify_spell)
qdel(nullify_spell)
return
@@ -487,7 +487,7 @@
to_chat(user, span_cultitalic("You are not in the right dimension!"))
return
- var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
+ var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(QDELETED(src) || !user || !user.is_holding(src) || user.incapacitated() || !actual_selected_rune || !proximity)
return
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index d4a1e0cc306..4d05dcbcda7 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -665,7 +665,7 @@ Striking a noncultist, however, will tear their flesh."}
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
if(M.current && M.current.stat != DEAD)
cultists |= M.current
- var/mob/living/cultist_to_receive = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in (cultists - user)
+ var/mob/living/cultist_to_receive = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", (cultists - user))
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
return
if(!cultist_to_receive)
diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm
index b3f2c091caa..63d74fb6b1a 100644
--- a/code/modules/antagonists/cult/runes.dm
+++ b/code/modules/antagonists/cult/runes.dm
@@ -408,7 +408,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
- var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
+ var/input_rune_key = tgui_input_list(user, "Rune to teleport to", "Teleportation Target", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated() || !actual_selected_rune)
fail_invoke()
@@ -567,7 +567,7 @@ structure_check() searches for nearby cultist structures required for the invoca
fail_invoke()
return
if(potential_revive_mobs.len > 1)
- mob_to_revive = input(user, "Choose a cultist to revive.", "Cultist to Revive") as null|anything in potential_revive_mobs
+ mob_to_revive = tgui_input_list(user, "Cultist to revive", "Revive Cultist", potential_revive_mobs)
else
mob_to_revive = potential_revive_mobs[1]
if(QDELETED(src) || !validness_checks(mob_to_revive, user))
@@ -668,7 +668,7 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/datum/mind/M as anything in get_antag_minds(/datum/antagonist/cult))
if(!(M.current in invokers) && M.current && M.current.stat != DEAD)
cultists |= M.current
- var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of the Geometer") as null|anything in cultists
+ var/mob/living/cultist_to_summon = tgui_input_list(user, "Who do you wish to call to [src]?", "Followers of the Geometer", cultists)
if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated())
return
if(!cultist_to_summon)
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_items.dm b/code/modules/antagonists/eldritch_cult/eldritch_items.dm
index 616de5d6610..d381eb353ef 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_items.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_items.dm
@@ -340,7 +340,7 @@
drawing = TRUE
- var/type = pick_list[input(user,"Choose the rune","Rune") as null|anything in pick_list ]
+ var/type = pick_list[tgui_input_list(user, "Choose the rune", "Rune", pick_list) ]
if(!type)
drawing = FALSE
return
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
index 41d426249b0..fe431738a70 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_knowledge.dm
@@ -151,7 +151,7 @@
return FALSE
return TRUE
-/datum/eldritch_knowledge/curse/on_finished_recipe(mob/living/user,list/atoms,loc)
+/datum/eldritch_knowledge/curse/on_finished_recipe(mob/living/user, list/atoms,loc)
var/list/compiled_list = list()
@@ -164,7 +164,7 @@
to_chat(user, span_warning("These items don't possess the required fingerprints or DNA."))
return FALSE
- var/chosen_mob = input("Select the person you wish to curse","Your target") as null|anything in sort_list(compiled_list, /proc/cmp_mob_realname_dsc)
+ var/chosen_mob = tgui_input_list(user, "Select the person you wish to curse","Your target", sort_list(compiled_list, /proc/cmp_mob_realname_dsc))
if(!chosen_mob)
return FALSE
curse(compiled_list[chosen_mob])
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index bdd7f4a557f..2907b974382 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -620,7 +620,7 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister())
return
switch(action)
if("relabel")
- var/label = input("New canister label:", name) as null|anything in GLOB.gas_id_to_canister
+ var/label = tgui_input_list(usr, "New canister label", name, GLOB.gas_id_to_canister)
if(label && !..())
var/newtype = GLOB.gas_id_to_canister[label]
if(newtype)
diff --git a/code/modules/cargo/centcom_podlauncher.dm b/code/modules/cargo/centcom_podlauncher.dm
index ef54a991100..b68c841c9fa 100644
--- a/code/modules/cargo/centcom_podlauncher.dm
+++ b/code/modules/cargo/centcom_podlauncher.dm
@@ -406,7 +406,7 @@
return
var/list/possible_destinations = SSpoints_of_interest.get_mob_pois()
- var/target = input("Select a mob! (Smiting does this automatically)", "Target", null, null) as null|anything in possible_destinations
+ var/target = tgui_input_list(usr, "Select a mob! (Smiting does this automatically)", "Target", possible_destinations)
if (isnull(target))
return
diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm
index cebc75d4770..02cb4c9220c 100644
--- a/code/modules/hydroponics/seeds.dm
+++ b/code/modules/hydroponics/seeds.dm
@@ -447,7 +447,7 @@
/obj/item/seeds/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/pen))
- var/choice = tgui_input_list(usr, "What would you like to change?",, list("Plant Name", "Seed Description", "Product Description", "Cancel"))
+ var/choice = tgui_input_list(usr, "What would you like to change?", "Seed Alteration", list("Plant Name", "Seed Description", "Product Description"))
if(!user.canUseTopic(src, BE_CLOSE))
return
switch(choice)
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index 1f6ad22456a..f5457aba128 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -69,7 +69,7 @@ INITIALIZE_IMMEDIATE(/mob/dead)
if(1)
pick = csa[1]
else
- pick = input(src, "Pick a server to jump to", "Server Hop") as null|anything in csa
+ pick = tgui_input_list(src, "Server to jump to", "Server Hop", csa)
if(!pick)
return
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 2eea45ea043..4279b270dab 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -439,7 +439,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/area/A = V
if(!(A.area_flags & HIDDEN_AREA))
filtered += A
- var/area/thearea = input("Area to jump to", "BOOYEA") as null|anything in filtered
+ var/area/thearea = tgui_input_list(usr, "Area to jump to", "BOOYEA", filtered)
if(!thearea)
return
@@ -509,7 +509,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/possible_destinations = SSpoints_of_interest.get_mob_pois()
var/target = null
- target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in possible_destinations
+ target = tgui_input_list(usr, "Please, select a player!", "Jump to Mob", possible_destinations)
if (!target || !isobserver(usr))
return
@@ -543,7 +543,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/views = list()
for(var/i in 7 to max_view)
views |= i
- var/new_view = input("Choose your new view", "Modify view range", 0) as null|anything in views
+ var/new_view = tgui_input_list(usr, "New view", "Modify view range", views)
if(new_view)
client.view_size.setTo(clamp(new_view, 7, max_view) - 7)
else
@@ -649,7 +649,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 sort_names(possessible)
+ var/mob/living/target = tgui_input_list(usr, "Your new life begins today!", "Possess Mob", sort_names(possessible))
if(!target)
return FALSE
@@ -878,7 +878,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/possible_destinations = SSpoints_of_interest.get_mob_pois()
var/target = null
- target = input("Please, select a player!", "Jump to Mob", null, null) as null|anything in possible_destinations
+ target = tgui_input_list(usr, "Please, select a player!", "Jump to Mob", possible_destinations)
if (!target || !isobserver(usr))
return
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 39bb7ed4fbe..096a1fd3a7f 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -562,7 +562,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 sort_list(cameralist)
+ network = tgui_input_list(U, "Which network would you like to view?", sort_list(cameralist))
if(!U.eyeobj)
U.view_core()
@@ -599,7 +599,7 @@
personnel_list["[record_datum.fields["name"]]: [record_datum.fields["rank"]]"] = record_datum.fields["image"]//Pull names, rank, and image.
if(personnel_list.len)
- input = input("Select a crew member:") as null|anything in sort_list(personnel_list)
+ input = tgui_input_list(usr, "Select a crew member", "Station Member", sort_list(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.
@@ -636,7 +636,7 @@
"spider" = 'icons/mob/animal.dmi'
)
- input = input("Please select a hologram:") as null|anything in sort_list(icon_list)
+ input = tgui_input_list(usr, "Select a hologram", "Hologram", sort_list(icon_list))
if(input)
qdel(holo_icon)
switch(input)
@@ -657,7 +657,7 @@
"clock" = 'icons/mob/ai.dmi'
)
- input = input("Please select a hologram:") as null|anything in sort_list(icon_list)
+ input = tgui_input_list(usr, "Select a hologram", "Hologram", sort_list(icon_list))
if(input)
qdel(holo_icon)
switch(input)
@@ -928,7 +928,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 sort_names(possible)
+ target = tgui_input_list(src, "Which body to control?", "Direct Control", sort_names(possible))
if (!target || target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src)))
return
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 42edfe81672..42c7f223245 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -312,7 +312,7 @@
return
//Ask the user to pick a channel from what it has available.
- var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
+ var/Autochan = tgui_input_list(usr, "Select a channel", "Channel Selection", list("Default","None") + radio.channels)
if(!Autochan)
return
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index 3a47f1b6c28..8433dc9cc2d 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -454,7 +454,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 sort_names(guardians)
+ var/mob/living/simple_animal/hostile/guardian/G = tgui_input_list(src, "Pick the guardian you wish to reset", "Guardian Reset", sort_names(guardians))
if(G)
to_chat(src, span_holoparasite("You attempt to reset [G.real_name]'s personality..."))
var/list/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, FALSE, 100)
@@ -552,7 +552,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 sort_list(possible_guardians)
+ guardiantype = tgui_input_list(user, "Pick the type of [mob_name]", "[mob_name] Creation", sort_list(possible_guardians))
if(!guardiantype || !candidate.client)
to_chat(user, "[failure_message]" )
used = FALSE
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 6dda9efe329..56529a234ec 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -147,7 +147,7 @@
. = ..()
//Changing name/description of items. Only works if they have the UNIQUE_RENAME object flag set
if(isobj(O) && proximity && (O.obj_flags & UNIQUE_RENAME))
- var/penchoice = input(user, "What would you like to edit?", "Rename, change description or reset both?") as null|anything in list("Rename","Change description","Reset")
+ var/penchoice = tgui_input_list(user, "What would you like to edit?", "Pen Setting", list("Rename","Change description","Reset"))
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
if(penchoice == "Rename")
diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm
index 100d1f9b6ef..dfb9885c400 100644
--- a/code/modules/plumbing/ducts.dm
+++ b/code/modules/plumbing/ducts.dm
@@ -340,10 +340,10 @@ All the important duct code:
. += span_notice("It's current color and layer are [duct_color] and [duct_layer]. Use in-hand to change.")
/obj/item/stack/ducts/attack_self(mob/user)
- var/new_layer = input("Select a layer", "Layer") as null|anything in layers
+ var/new_layer = tgui_input_list(user, "Select a layer", "Layer", layers)
if(new_layer)
duct_layer = new_layer
- var/new_color = input("Select a color", "Color") as null|anything in GLOB.pipe_paint_colors
+ var/new_color = tgui_input_list(user, "Select a color", "Color", GLOB.pipe_paint_colors)
if(new_color)
duct_color = new_color
add_atom_colour(GLOB.pipe_paint_colors[new_color], FIXED_COLOUR_PRIORITY)
diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm
index 77e687634f8..904e243b255 100644
--- a/code/modules/religion/rites.dm
+++ b/code/modules/religion/rites.dm
@@ -395,7 +395,7 @@
if(!honormut.guilty.len)
to_chat(user, span_warning("[GLOB.deity] is holding no grudges to forgive."))
return FALSE
- var/forgiven_choice = input(user, "Choose one of [GLOB.deity]'s guilty to forgive.", "Forgive") as null|anything in honormut.guilty
+ var/forgiven_choice = tgui_input_list(user, "Choose one of [GLOB.deity]'s guilty to forgive.", "Forgive", honormut.guilty)
if(!forgiven_choice)
return FALSE
who = forgiven_choice
diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm
index 31ce5fd95e4..02d17bb74fb 100644
--- a/code/modules/shuttle/assault_pod.dm
+++ b/code/modules/shuttle/assault_pod.dm
@@ -35,7 +35,7 @@
/obj/item/assault_pod/attack_self(mob/living/user)
var/target_area
- target_area = input("Area to land", "Select a Landing Zone", target_area) as null|anything in GLOB.teleportlocs
+ target_area = tgui_input_list(user, "Area to land", "Landing Zone", GLOB.teleportlocs)
if(!target_area)
return
var/area/picked_area = GLOB.teleportlocs[target_area]
diff --git a/code/modules/tgui/tgui_input_list.dm b/code/modules/tgui/tgui_input_list.dm
index a02dfac5f55..0754540634c 100644
--- a/code/modules/tgui/tgui_input_list.dm
+++ b/code/modules/tgui/tgui_input_list.dm
@@ -9,7 +9,7 @@
* * buttons - The options that can be chosen by the user, each string is assigned a button on the UI.
* * timeout - The timeout of the input box, after which the input box will close and qdel itself. Set to zero for no timeout.
*/
-/proc/tgui_input_list(mob/user, message, title, list/buttons, timeout = 0)
+/proc/tgui_input_list(mob/user, message, title = "Select", list/buttons, timeout = 0)
if (!user)
user = usr
if(!length(buttons))
@@ -20,6 +20,9 @@
user = client.mob
else
return
+ /// Client does NOT have tgui_input on: Returns regular input
+ if(!user.client.prefs.read_preference(/datum/preference/toggle/tgui_input))
+ return input(user, message, title) as null|anything in buttons
var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout)
input.ui_interact(user)
input.wait()