diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 00e2f9d5dc5..dae46487906 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -181,7 +181,9 @@
if("switch_filter")
if(!configuring || use_power)
return
- var/new_filter = input(usr,"Select filter mode:","Change filter",params["mode"]) in list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide")
+ var/new_filter = tgui_input_list(usr, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide"))
+ if(!new_filter)
+ return
switch_filter(dir_flag(params["dir"]), mode_return_switch(new_filter))
. = TRUE
diff --git a/code/ZAS/Diagnostic.dm b/code/ZAS/Diagnostic.dm
index 7166b42dc6f..fba24568028 100644
--- a/code/ZAS/Diagnostic.dm
+++ b/code/ZAS/Diagnostic.dm
@@ -50,7 +50,7 @@
"Down" = DOWN,\
#endif
"N/A" = null)
- var/direction = input("What direction do you wish to test?","Set direction") as null|anything in direction_list
+ var/direction = tgui_input_list(usr, "What direction do you wish to test?","Set direction", direction_list)
if(!direction)
return
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index f88e4816afa..067fc6d1d8e 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -96,7 +96,6 @@ var/global/vs_control/vsc = new
settings -= "plc"
/vs_control/proc/ChangeSettingsDialog(mob/user,list/L)
- //var/which = input(user,"Choose a setting:") in L
var/dat = ""
for(var/ch in L)
if(findtextEx(ch,"_RANDOM") || findtextEx(ch,"_DESC") || findtextEx(ch,"_METHOD") || findtextEx(ch,"_NAME")) continue
@@ -150,7 +149,7 @@ var/global/vs_control/vsc = new
if("Numeric")
newvar = input(user,"Enter a number:","Settings",newvar) as num
if("Bit Flag")
- var/flag = input(user,"Toggle which bit?","Settings") in bitflags
+ var/flag = tgui_input_list(user,"Toggle which bit?","Settings", bitflags)
flag = text2num(flag)
if(newvar & flag)
newvar &= ~flag
@@ -194,7 +193,7 @@ var/global/vs_control/vsc = new
/vs_control/proc/SetDefault(var/mob/user)
var/list/setting_choices = list("Phoron - Standard", "Phoron - Low Hazard", "Phoron - High Hazard", "Phoron - Oh Shit!",\
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish", "ZAS/Phoron - Initial")
- var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
+ var/def = tgui_input_list(user, "Which of these presets should be used?", "Setting Choice", setting_choices)
if(!def)
return
switch(def)
diff --git a/code/_helpers/files.dm b/code/_helpers/files.dm
index dd8c5dd6901..d6603e4275a 100644
--- a/code/_helpers/files.dm
+++ b/code/_helpers/files.dm
@@ -25,7 +25,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 = tgui_input_list(src, "Choose a file to access:", "Download", choices)
switch(choice)
if(null)
return
diff --git a/code/_helpers/sorts/comparators.dm b/code/_helpers/sorts/comparators.dm
index dc2419b0b06..9866d108c01 100644
--- a/code/_helpers/sorts/comparators.dm
+++ b/code/_helpers/sorts/comparators.dm
@@ -85,3 +85,6 @@
/proc/cmp_filter_data_priority(list/A, list/B)
return A["priority"] - B["priority"]
+
+/proc/cmp_trait_datums_name(datum/trait/A, datum/trait/B)
+ return A.sort == B.sort ? sorttext("[B.name]","[A.name]") : A.sort - B.sort
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index 319deaa777a..ee5899fbe88 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -394,8 +394,9 @@ Turf and target are seperate in case you want to teleport some distance from a t
borgs[name] = A
if (borgs.len)
- select = input("Unshackled borg signals detected:", "Borg selection", null, null) as null|anything in borgs
- return borgs[select]
+ select = tgui_input_list(usr, "Unshackled borg signals detected:", "Borg selection", borgs)
+ if(select)
+ return borgs[select]
//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
@@ -421,7 +422,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/select_active_ai(var/mob/user)
var/list/ais = active_ais()
if(ais.len)
- if(user) . = input(usr,"AI signals detected:", "AI selection") in ais
+ if(user) . = tgui_input_list(usr, "AI signals detected:", "AI selection", ais)
else . = pick(ais)
return .
@@ -1489,7 +1490,7 @@ var/mob/dview/dview_mob = new
/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
if (value == FALSE) //nothing should be calling us with a number, so this is safe
- value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
+ value = input(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
if (isnull(value))
return
value = trim(value)
@@ -1503,7 +1504,7 @@ var/mob/dview/dview_mob = new
if(matches.len==1)
chosen = matches[1]
else
- chosen = input("Select a type", "Pick Type", matches[1]) as null|anything in matches
+ chosen = tgui_input_list(usr, "Select a type", "Pick Type", matches)
if(!chosen)
return
chosen = matches[chosen]
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 06b51def249..0c10066e580 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -494,13 +494,13 @@
if("Show Camera List")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
- var/camera = input(AI) in AI.get_camera_list()
+ var/camera = tgui_input_list(AI, "Pick Camera:", "Camera Choice", AI.get_camera_list())
AI.ai_camera_list(camera)
if("Track With Camera")
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
- var/target_name = input(AI) in AI.trackable_mobs()
+ var/target_name = tgui_input_list(AI, "Pick Mob:", "Mob Choice", AI.trackable_mobs())
AI.ai_camera_track(target_name)
if("Toggle Camera Light")
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index ce7e8176c31..01ea0869356 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -125,7 +125,7 @@ SUBSYSTEM_DEF(game_master)
/datum/controller/subsystem/game_master/proc/choose_game_master(mob/user)
var/list/subtypes = subtypesof(/datum/game_master)
- var/new_gm_path = input(user, "What kind of Game Master do you want?", "New Game Master", /datum/game_master/default) as null|anything in subtypes
+ var/new_gm_path = tgui_input_list(user, "What kind of Game Master do you want?", "New Game Master", subtypes)
if(new_gm_path)
log_and_message_admins("has swapped the current GM ([GM.type]) for a new GM ([new_gm_path]).")
GM = new new_gm_path(src)
diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm
index e4deb85a888..3623acf26ce 100644
--- a/code/controllers/subsystems/vote.dm
+++ b/code/controllers/subsystems/vote.dm
@@ -352,7 +352,7 @@ SUBSYSTEM_DEF(vote)
if("cancel")
if(usr.client.holder)
- if("Yes" == tgui_alert(usr, "You are about to cancel this vote. Are you sure?", list("Cancel Vote", "No", "Yes")))
+ if("Yes" == tgui_alert(usr, "You are about to cancel this vote. Are you sure?", "Cancel Vote", list("No", "Yes")))
reset()
if("toggle_restart")
if(usr.client.holder)
diff --git a/code/controllers/subsystems/webhooks.dm b/code/controllers/subsystems/webhooks.dm
index 25252d30504..1e7a27924ff 100644
--- a/code/controllers/subsystems/webhooks.dm
+++ b/code/controllers/subsystems/webhooks.dm
@@ -82,7 +82,7 @@ SUBSYSTEM_DEF(webhooks)
to_chat(usr, SPAN_WARNING("Webhook list is empty; either webhooks are disabled, webhooks aren't configured, or the subsystem hasn't initialized."))
return
- var/choice = input(usr, "Select a webhook to ping.", "Ping Webhook") as null|anything in SSwebhooks.webhook_decls
+ var/choice = tgui_input_list(usr, "Select a webhook to ping.", "Ping Webhook", SSwebhooks.webhook_decls)
if(choice && SSwebhooks.webhook_decls[choice])
var/decl/webhook/webhook = SSwebhooks.webhook_decls[choice]
log_and_message_admins("has pinged webhook [choice].", usr)
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index 4a9c3b48a7c..7323d2cba2b 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -99,7 +99,7 @@
options["LEGACY: transfer_controller"] = transfer_controller
options["LEGACY: gas_data"] = gas_data
- var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options
+ var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options // Leaving as input() due to debug tool
if(!pick)
return
var/datum/D = options[pick]
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index ec17f07b9ba..75c3c64c7f2 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -68,7 +68,7 @@
names += componentsubtypes
names += "---Elements---"
names += sortTim(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
+ var/result = input(usr, "Choose a component/element to add:", "Add Component/Element", names)
if(!usr || !result || result == "---Components---" || result == "---Elements---")
return
if(QDELETED(src))
diff --git a/code/datums/locations/locations.dm b/code/datums/locations/locations.dm
index 575f123f1b8..a9cf9294fb2 100644
--- a/code/datums/locations/locations.dm
+++ b/code/datums/locations/locations.dm
@@ -32,44 +32,9 @@ var/global/datum/locations/milky_way/all_locations = new()
while(length(choice.contents) > 0) //For some reason it wouldn't let me do contents.len even when I defined it as a list.
var/specific = tgui_alert(user, "The location currently selected is [choice.name]. More specific options exist, would you like to pick a more specific location?", "Choose location", list("Yes", "No"))
if(specific == "Yes" && length(choice.contents) > 0)
- choice = input(user, "Please choose a location.", "Locations") as null|anything in choice.contents
+ choice = tgui_input_list(user, "Please choose a location.", "Locations", choice.contents)
else
break
to_chat(user,choice.name)
to_chat(user,choice.desc)
return choice
-
-// var/datum/locations/choice = input(user, "Please choose a location.","Locations") as null|anything in all_locations
-// if(choice && choice.contents.len > 0)
-
-
-/*
-/datum/locations/proc/show_contents()
-// to_world("[src]\n[desc]")
- for(var/datum/locations/a in contents)
- to_world("[a]\n[a.parent ? "Located in [a.parent]\n" : ""][a.desc]")
- a.show_contents()
- to_world("\n")
-
-/datum/locations/proc/count_locations()
- var/i = 0
- for(var/datum/locations/a in contents)
- i = i + a.count_locations()
- return i
-
-/client/verb/show_locations()
- set name = "Show Locations"
- set category = "Debug"
- locations.show_contents()
-
-/client/verb/debug_locations()
- set name = "Debug Locations"
- set category = "Debug"
- debug_variables(locations)
-
-/client/verb/count_locations()
- set name = "Count Locations"
- set category = "Debug"
- var/location_number = locations.count_locations()
- to_world(location_number)
-*/
diff --git a/code/datums/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm
index 6004fff5b22..b380018bea6 100644
--- a/code/datums/managed_browsers/feedback_form.dm
+++ b/code/datums/managed_browsers/feedback_form.dm
@@ -112,7 +112,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
return
if(href_list["feedback_choose_topic"])
- feedback_topic = input(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", feedback_topic) in config.sqlite_feedback_topics
+ feedback_topic = tgui_input_list(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", config.sqlite_feedback_topics)
display()
return
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index e1359441700..a35c23cd6b4 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -220,7 +220,8 @@
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
- var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "mercenary", "capture", "absorb", "custom")
+ var/list/choices = list("assassinate", "debrain", "protect", "prevent", "harm", "brig", "hijack", "escape", "survive", "steal", "download", "mercenary", "capture", "absorb", "custom")
+ var/new_obj_type = tgui_input_list(usr, "Select objective type:", "Objective type", choices, def_value)
if (!new_obj_type) return
var/datum/objective/new_objective = null
@@ -242,7 +243,7 @@
if (objective&&(objective.type in objective_list) && objective.target)
def_target = objective.target.current
- var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
+ var/new_target = tgui_input_list(usr, "Select target:", "Objective target", possible_targets, def_target)
if (!new_target) return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm
index e85541a55dc..f1db67a6474 100644
--- a/code/datums/uplink/announcements.dm
+++ b/code/datums/uplink/announcements.dm
@@ -16,10 +16,10 @@
item_cost = 20
/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user)
- var/title = sanitize(input("Enter your announcement title.", "Announcement Title") as null|text)
+ var/title = sanitize(input(usr, "Enter your announcement title.", "Announcement Title") as null|text)
if(!title)
return
- var/message = sanitize(input("Enter your announcement message.", "Announcement Title") as null|text)
+ var/message = sanitize(input(usr, "Enter your announcement message.", "Announcement Title") as null|text)
if(!message)
return
return list("title" = title, "message" = message)
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index ef15cfb26f7..6da9e1cabfe 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -257,7 +257,7 @@
for (var/obj/machinery/camera/C in cameras)
friendly_cameras.Add(C.c_tag)
- var/target = input("Select the camera to observe", null) as null|anything in friendly_cameras
+ var/target = tgui_input_list(usr, "Select the camera to observe", "Select Camera", friendly_cameras)
if (!target)
return
for (var/obj/machinery/camera/C in cameras)
diff --git a/code/game/base_turf.dm b/code/game/base_turf.dm
index 92bf5c9f8d2..3f78c6fba48 100644
--- a/code/game/base_turf.dm
+++ b/code/game/base_turf.dm
@@ -19,11 +19,11 @@
if(!holder) return
- var/choice = input("Which Z-level do you wish to set the base turf for?") as num|null
+ var/choice = input(usr, "Which Z-level do you wish to set the base turf for?") as num|null
if(!choice)
return
- var/new_base_path = input("Please select a turf path (cancel to reset to /turf/space).") as null|anything in typesof(/turf)
+ var/new_base_path = tgui_input_list(usr, "Please select a turf path (cancel to reset to /turf/space).", "Set Base Turf", typesof(/turf))
if(!new_base_path)
new_base_path = /turf/space
using_map.base_turf_by_z["[choice]"] = new_base_path
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index f6d6695b191..54b1b4c1e0c 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -221,7 +221,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
var/list/victims = list()
for(var/mob/living/carbon/C in oview(changeling.sting_range))
victims += C
- var/mob/living/carbon/T = input(src, "Who will we sting?") as null|anything in victims
+ var/mob/living/carbon/T = tgui_input_list(src, "Who will we sting?", "Sting!", victims)
if(!T)
return
diff --git a/code/game/gamemodes/changeling/powers/hivemind.dm b/code/game/gamemodes/changeling/powers/hivemind.dm
index 105de8f4f56..d07542875ae 100644
--- a/code/game/gamemodes/changeling/powers/hivemind.dm
+++ b/code/game/gamemodes/changeling/powers/hivemind.dm
@@ -37,7 +37,7 @@ var/list/datum/dna/hivemind_bank = list()
to_chat(src, "The airwaves already have all of our DNA.")
return
- var/S = input("Select a DNA to channel: ", "Channel DNA", null) as null|anything in names
+ var/S = tgui_input_list(src, "Select a DNA to channel:", "Channel DNA", names)
if(!S) return
var/datum/absorbed_dna/chosen_dna = changeling.GetDNA(S)
@@ -67,7 +67,7 @@ var/list/datum/dna/hivemind_bank = list()
to_chat(src, "There's no new DNA to absorb from the air.")
return
- var/S = input("Select a DNA absorb from the air: ", "Absorb DNA", null) as null|anything in names
+ var/S = tgui_input_list(src, "Select a DNA to absorb:", "Absorb DNA", names)
if(!S) return
var/datum/absorbed_dna/chosen_dna = names[S]
if(!chosen_dna)
diff --git a/code/game/gamemodes/changeling/powers/lesser_form.dm b/code/game/gamemodes/changeling/powers/lesser_form.dm
index ef82337d521..aa70756344b 100644
--- a/code/game/gamemodes/changeling/powers/lesser_form.dm
+++ b/code/game/gamemodes/changeling/powers/lesser_form.dm
@@ -46,7 +46,7 @@
for(var/datum/dna/DNA in changeling.absorbed_dna)
names += "[DNA.real_name]"
- var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
+ var/S = tgui_input_list(src, "Select the target DNA:", "Target DNA", names)
if(!S) return
var/datum/dna/chosen_dna = changeling.GetDNA(S)
diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm
index 6dd16061a12..535efbcac1e 100644
--- a/code/game/gamemodes/changeling/powers/transform.dm
+++ b/code/game/gamemodes/changeling/powers/transform.dm
@@ -21,7 +21,7 @@
for(var/datum/absorbed_dna/DNA in changeling.absorbed_dna)
names += "[DNA.name]"
- var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
+ var/S = tgui_input_list(src, "Select the target DNA:", "Target DNA", names)
if(!S) return
var/datum/absorbed_dna/chosen_dna = changeling.GetDNA(S)
diff --git a/code/game/gamemodes/changeling/powers/transform_sting.dm b/code/game/gamemodes/changeling/powers/transform_sting.dm
index 1f6bc7b93dc..f831f9eb172 100644
--- a/code/game/gamemodes/changeling/powers/transform_sting.dm
+++ b/code/game/gamemodes/changeling/powers/transform_sting.dm
@@ -16,13 +16,11 @@
if(!changeling)
return 0
-
-
var/list/names = list()
for(var/datum/dna/DNA in changeling.absorbed_dna)
names += "[DNA.real_name]"
- var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in names
+ var/S = tgui_input_list(src, "Select the target DNA:", "Target DNA", names)
if(!S)
return
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index e3aac4fb4e1..5a33a1d49a8 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -448,7 +448,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if (!istype(user.loc,/turf))
to_chat(user, "You do not have enough space to write a proper rune.")
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
- r = input("Choose a rune to scribe", "Rune Scribing") in runes //not cancellable.
+ r = input(usr, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking
var/obj/effect/rune/R = new /obj/effect/rune
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
@@ -461,7 +461,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
var/beacon
if(usr)
- beacon = input("Select the last rune", "Rune Scribing") in words
+ beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
R.word1=cultwords["travel"]
R.word2=cultwords["self"]
R.word3=beacon
@@ -471,7 +471,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
var/beacon
if(usr)
- beacon = input("Select the last rune", "Rune Scribing") in words
+ beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
R.word1=cultwords["travel"]
R.word2=cultwords["other"]
R.word3=beacon
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 05507ec6a43..fac7066de48 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -826,7 +826,7 @@ var/list/sacrificed = list()
users+=C
var/dam = round(15 / users.len)
if(users.len>=3)
- var/mob/living/carbon/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users)
+ var/mob/living/carbon/cultist = tgui_input_list(user, "Choose the one who you want to free", "Followers of Geometer", (cultists - users))
if(!cultist)
return fizzle()
if (cultist == user) //just to be sure.
@@ -872,7 +872,7 @@ var/list/sacrificed = list()
if(iscultist(C) && !C.stat)
users += C
if(users.len>=3)
- var/mob/living/carbon/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user)
+ var/mob/living/carbon/cultist = tgui_input_list(user, "Choose the one who you want to summon", "Followers of Geometer", (cultists - user))
if(!cultist)
return fizzle()
if (cultist == user) //just to be sure.
diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm
index 9c430d124c3..3fbeb13a7f2 100644
--- a/code/game/gamemodes/cult/soulstone.dm
+++ b/code/game/gamemodes/cult/soulstone.dm
@@ -183,7 +183,7 @@
if(!A)
to_chat(U, "Capture failed!: The soul stone is empty! Go kill someone!")
return;
- var/construct_class = input(U, "Please choose which type of construct you wish to create.") as null|anything in possible_constructs
+ var/construct_class = tgui_input_list(U, "Please choose which type of construct you wish to create.", "Construct Type", possible_constructs)
switch(construct_class)
if("Juggernaut")
var/mob/living/simple_mob/construct/juggernaut/Z = new /mob/living/simple_mob/construct/juggernaut (get_turf(T.loc))
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index fa3dba92bc2..88efd6154e6 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -59,23 +59,23 @@ var/global/list/additional_antag_types = list()
var/choice = ""
switch(href_list["set"])
if("shuttle_delay")
- choice = input("Enter a new shuttle delay multiplier") as num
+ choice = input(usr, "Enter a new shuttle delay multiplier") as num
if(!choice || choice < 1 || choice > 20)
return
shuttle_delay = choice
if("antag_scaling")
- choice = input("Enter a new antagonist cap scaling coefficient.") as num
+ choice = input(usr, "Enter a new antagonist cap scaling coefficient.") as num
if(isnull(choice) || choice < 0 || choice > 100)
return
antag_scaling_coeff = choice
if("event_modifier_moderate")
- choice = input("Enter a new moderate event time modifier.") as num
+ choice = input(usr, "Enter a new moderate event time modifier.") as num
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_moderate = choice
refresh_event_modifiers()
if("event_modifier_severe")
- choice = input("Enter a new moderate event time modifier.") as num
+ choice = input(usr, "Enter a new moderate event time modifier.") as num
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_major = choice
@@ -99,7 +99,7 @@ var/global/list/additional_antag_types = list()
additional_antag_types -= antag.id
message_admins("Admin [key_name_admin(usr)] removed [antag.role_text] template from game mode.")
else if(href_list["add_antag_type"])
- var/choice = input("Which type do you wish to add?") as null|anything in all_antag_types
+ var/choice = tgui_input_list(usr, "Which type do you wish to add?", "Select Antag Type", all_antag_types)
if(!choice)
return
var/datum/antagonist/antag = all_antag_types[choice]
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
index d1494500255..677801f2c19 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm
@@ -23,9 +23,8 @@
for(var/datum/malf_hardware/H in hardware_list)
possible_choices += H.name
- possible_choices += "CANCEL"
- var/choice = input("Select desired hardware. You may only choose one hardware piece!: ") in possible_choices
- if(choice == "CANCEL")
+ var/choice = tgui_input_list(user, "Select desired hardware. You may only choose one hardware piece!: ", "Hardware Choice", possible_choices)
+ if(!choice)
return
var/note = null
@@ -85,7 +84,7 @@
return
var/datum/malf_research/res = user.research
- var/datum/malf_research_ability/tar = input("Select your next research target") in res.available_abilities
+ var/datum/malf_research_ability/tar = tgui_input_list(user, "Select your next research target", "Select Research", res.available_abilities)
if(!tar)
return
res.focus = tar
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
index 24a36f93c70..e4db9a662d3 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_interdiction.dm
@@ -95,7 +95,9 @@
return
- var/targetname = input("Select unlock target: ") in robot_names
+ var/targetname = tgui_input_list(user, "Select unlock target:", "Unlock Target", robot_names)
+ if(!targetname)
+ return
for(var/mob/living/silicon/robot/R in robots)
if(targetname == R.name)
target = R
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
index 9d9bed799ac..40023f2cbee 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_manipulation.dm
@@ -71,7 +71,7 @@
if(!ability_prechecks(user, price))
return
- var/action = input("Select required action: ") in list("Reset", "Add X-Ray", "Add Motion Sensor", "Add EMP Shielding")
+ var/action = tgui_input_list(user, "Select required action:", "Hack Camera", list("Reset", "Add X-Ray", "Add Motion Sensor", "Add EMP Shielding"))
if(!action || !target)
return
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
index 049eb873251..d8229e1562a 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
@@ -93,8 +93,8 @@
if(!ability_prechecks(user, price))
return
- var/title = input("Select message title: ")
- var/text = input("Select message text: ")
+ var/title = input(usr, "Select message title: ")
+ var/text = input(usr, "Select message text: ")
if(!title || !text || !ability_pay(user, price))
to_chat(user, "Hack Aborted")
return
@@ -120,8 +120,8 @@
if(!ability_prechecks(user, price))
return
- var/alert_target = input("Select new alert level:") in list("green", "yellow", "violet", "orange", "blue", "red", "delta", "CANCEL")
- if(!alert_target || !ability_pay(user, price) || alert_target == "CANCEL")
+ var/alert_target = tgui_input_list(user, "Select new alert level:", "Alert Level", list("green", "yellow", "violet", "orange", "blue", "red", "delta"))
+ if(!alert_target || !ability_pay(user, price))
to_chat(user, "Hack Aborted")
return
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index e6a5806e17a..22cf1f7290b 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -150,7 +150,7 @@
if("Item")
var/datum/objective/steal/itemlist
itemlist = itemlist
- var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in itemlist.possible_items
+ var/targetitem = tgui_input_list(usr, "Select item to search for.", "Item Mode Select", itemlist.possible_items)
if(!targetitem)
return
target=locate(itemlist.possible_items[targetitem])
@@ -160,7 +160,7 @@
to_chat(usr, "You set the pinpointer to locate [targetitem]")
if("DNA")
- var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "")
+ var/DNAstring = input(usr, "Input DNA string to search for." , "Please Enter String." , "")
if(!DNAstring)
return
for(var/mob/living/carbon/M in mob_list)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index a241b80256b..4c4c7e0da6b 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -473,15 +473,15 @@ var/global/list/all_objectives = list()
/datum/objective/steal/proc/select_target()
var/list/possible_items_all = possible_items+possible_items_special+"custom"
- var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
+ var/new_target = tgui_input_list(usr, "Select target:", "Objective target", possible_items_all)
if (!new_target) return
if (new_target == "custom")
- var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
+ var/obj/item/custom_target = tgui_input_list(usr, "Select type:", "Type", typesof(/obj/item))
if (!custom_target) return
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
qdel(tmp_obj)
- custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
+ custom_name = sanitize(input(usr, "Enter target name:", "Objective target", custom_name) as text|null)
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 49d5901527c..74f590a8486 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -108,8 +108,8 @@ mob
to_chat(usr, "Sandbox: Created an airlock.")
if("hsbcanister")
var/list/hsbcanisters = typesof(/obj/machinery/portable_atmospherics/canister/) - /obj/machinery/portable_atmospherics/canister/
- var/hsbcanister = input(usr, "Choose a canister to spawn.", "Sandbox:") in hsbcanisters + "Cancel"
- if(!(hsbcanister == "Cancel"))
+ var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters)
+ if(hsbcanister)
new hsbcanister(usr.loc)
if("hsbfueltank")
//var/obj/hsb = new/obj/weldfueltank
@@ -146,6 +146,6 @@ mob
continue
selectable += O
- var/hsbitem = input(usr, "Choose an object to spawn.", "Sandbox:") in selectable + "Cancel"
- if(hsbitem != "Cancel")
+ var/hsbitem = tgui_input_list(usr, "Choose an object to spawn:", "Sandbox", selectable)
+ if(hsbitem)
new hsbitem(usr.loc)
diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm
index 82138988b5e..a15fcd5b350 100644
--- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm
+++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm
@@ -31,7 +31,9 @@
to_chat(user, "\The [src] has ran out of uses, and is now useless to you!")
return
else
- var/area_wanted = input(user, "Area to teleport to", "Teleportation") in teleportlocs
+ var/area_wanted = tgui_input_list(user, "Area to teleport to", "Teleportation", teleportlocs)
+ if(!area_wanted)
+ return
var/area/A = teleportlocs[area_wanted]
if(!A)
return
diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm
index fc67ba1ee3c..ebd8974305f 100644
--- a/code/game/gamemodes/technomancer/spells/audible_deception.dm
+++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm
@@ -68,7 +68,7 @@
var/list/sound_options = available_sounds
if(check_for_scepter())
sound_options["!!AIR HORN!!"] = 'sound/items/AirHorn.ogg'
- var/new_sound = input("Select the sound you want to make.","Sounds") as null|anything in sound_options
+ var/new_sound = tgui_input_list(usr, "Select the sound you want to make.", "Sounds", sound_options)
if(new_sound)
selected_sound = sound_options[new_sound]
diff --git a/code/game/gamemodes/technomancer/spells/summon/summon.dm b/code/game/gamemodes/technomancer/spells/summon/summon.dm
index c7c94c08692..3f39f7d9601 100644
--- a/code/game/gamemodes/technomancer/spells/summon/summon.dm
+++ b/code/game/gamemodes/technomancer/spells/summon/summon.dm
@@ -34,7 +34,7 @@
/obj/item/weapon/spell/summon/on_use_cast(mob/living/user)
if(summon_options.len)
- var/choice = input(user, "Choose a creature to kidnap from somewhere!", "Summon") as null|anything in summon_options
+ var/choice = tgui_input_list(user, "Choose a creature to kidnap from somewhere!", "Summon", summon_options)
if(choice)
summoned_mob_type = summon_options[choice]
diff --git a/code/game/gamemodes/technomancer/spells/track.dm b/code/game/gamemodes/technomancer/spells/track.dm
index ae342a46a12..461c4e83913 100644
--- a/code/game/gamemodes/technomancer/spells/track.dm
+++ b/code/game/gamemodes/technomancer/spells/track.dm
@@ -44,7 +44,7 @@ var/list/technomancer_belongings = list()
if(L == user)
continue
mob_choices += L
- var/choice = input(user,"Decide what or who to track.","Tracking") as null|anything in object_choices + mob_choices
+ var/choice = tgui_input_list(user, "Decide what or who to track.", "Tracking", (object_choices + mob_choices))
if(choice)
tracked = choice
tracking = 1
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 46f6710aafb..73c15fd6677 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -326,7 +326,7 @@
if("ejectify")
go_out()
if("changestasis")
- var/new_stasis = input("Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level") as null|anything in stasis_choices
+ var/new_stasis = tgui_input_list(usr, "Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level", stasis_choices)
if(new_stasis)
stasis_level = stasis_choices[new_stasis]
if("auto_eject_dead_on")
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 5d2deb079b6..9e700f9904f 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -639,7 +639,7 @@
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
- var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null
+ var/input_temperature = input(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C) as num|null
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C")
@@ -693,7 +693,7 @@
var/env = params["env"]
var/name = params["var"]
- var/value = input("New [name] for [env]:", name, TLV[env][name]) as num|null
+ var/value = input(usr, "New [name] for [env]:", name, TLV[env][name]) as num|null
if(!isnull(value) && !..())
if(value < 0)
TLV[env][name] = -1
diff --git a/code/game/machinery/airconditioner_vr.dm b/code/game/machinery/airconditioner_vr.dm
index 1aa25160858..4e9ce2d22bf 100644
--- a/code/game/machinery/airconditioner_vr.dm
+++ b/code/game/machinery/airconditioner_vr.dm
@@ -47,7 +47,7 @@
turn_off()
return
if(istype(I, /obj/item/device/multitool))
- var/new_temp = input("Input a new target temperature, in degrees C.","Target Temperature", 20) as num
+ var/new_temp = input(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20) as num
if(!Adjacent(user) || user.incapacitated())
return
new_temp = convert_c2k(new_temp)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 8895844b008..83fd5943823 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -315,7 +315,7 @@ update_flag
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
- var/label = input("Choose canister label", "Gas canister") as null|anything in colors
+ var/label = tgui_input_list(usr, "Choose canister label", "Gas canister", colors)
if(label)
canister_color = colors[label]
icon_state = colors[label]
@@ -332,7 +332,7 @@ update_flag
pressure = 10*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
- pressure = input("New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure) as num|null
+ pressure = input(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure) as num|null
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index 285268b75ee..b951a3c3964 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -149,7 +149,7 @@
if(anomalous_organs)
possible_list |= anomalous_products
- var/choice = input("What would you like to print?") as null|anything in possible_list
+ var/choice = tgui_input_list(usr, "What would you like to print?", "Print Choice", possible_list)
if(!choice || printing || (stat & (BROKEN|NOPOWER)))
return
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 7793a0ebbea..5cec5a5b42d 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -106,7 +106,7 @@
C.c_tag = input
for(var/i = 5; i >= 0; i -= 1)
- var/direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
+ var/direct = tgui_input_list(user, "Direction?", "Assembling Camera", list("NORTH", "EAST", "SOUTH", "WEST", "LEAVE IT"))
if(direct != "LEAVE IT")
C.dir = text2dir(direct)
if(i != 0)
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 72fa3cb6561..8e162b6d566 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -262,7 +262,7 @@ GLOBAL_LIST_BOILERPLATE(all_deactivated_AI_cores, /obj/structure/AIcore/deactiva
for(var/obj/structure/AIcore/deactivated/D in all_deactivated_AI_cores)
cores["[D] ([D.loc.loc])"] = D
- var/id = input("Which core?", "Toggle AI Core Latejoin", null) as null|anything in cores
+ var/id = tgui_input_list(usr, "Which core?", "Toggle AI Core Latejoin", cores)
if(!id) return
var/obj/structure/AIcore/deactivated/D = cores[id]
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 14fae598ffc..059f0582431 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -1182,7 +1182,7 @@
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/attempt_pin = input(usr, "Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 3473216a7bd..58565ead6e1 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -206,7 +206,7 @@
if(is_authenticated() && modify)
var/t1 = params["assign_target"]
if(t1 == "Custom")
- var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"), 45)
+ var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index 260633fd715..30182cbd8be 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -162,15 +162,15 @@
mode = params["mode"]
if("giv_name")
- var/nam = sanitizeName(input("Person pass is issued to", "Name", giv_name) as text|null)
+ var/nam = sanitizeName(input(usr, "Person pass is issued to", "Name", giv_name) as text|null)
if(nam)
giv_name = nam
if("reason")
- var/reas = sanitize(input("Reason why pass is issued", "Reason", reason) as text|null)
+ var/reas = sanitize(input(usr, "Reason why pass is issued", "Reason", reason) as text|null)
if(reas)
reason = reas
if("duration")
- var/dur = input("Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration") as num|null //VOREStation Edit
+ var/dur = input(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration") as num|null //VOREStation Edit
if(dur)
if(dur > 0 && dur <= 360) //VOREStation Edit
duration = dur
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 87b35e8cd03..b39e8513bfb 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -198,7 +198,7 @@
//Find a server
if("find")
if(message_servers && message_servers.len > 1)
- linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
+ linkedServer = tgui_input_list(usr,"Please select a server.", "Select a server.", message_servers)
set_temp("NOTICE: Server selected.", "alert")
else if(message_servers && message_servers.len > 0)
linkedServer = message_servers[1]
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 0a57a5e4c53..309453ee290 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -220,8 +220,8 @@
var/mob/living/silicon/robot/R = locate(params["ref"])
if(!can_hack(usr, R))
return
- var/choice = input("Really hack [R.name]? This cannot be undone.") in list("Yes", "No")
- if(choice != "Yes")
+ var/choice = tgui_alert(usr, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No"))
+ if(choice == "No")
return
log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!")
message_admins("[key_name_admin(usr)] emagged [key_name_admin(R)] using robotic console!")
diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm
index f9e43aaa7d7..d2f6074c784 100644
--- a/code/game/machinery/computer3/computers/card.dm
+++ b/code/game/machinery/computer3/computers/card.dm
@@ -305,7 +305,7 @@
if(auth)
var/t1 = href_list["assign"]
if(t1 == "Custom")
- var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"))
+ var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment"))
if(temp_t)
t1 = temp_t
set_default_access(t1)
diff --git a/code/game/machinery/deployable_vr.dm b/code/game/machinery/deployable_vr.dm
index 2f2f2f6adfb..25fdd4ed60f 100644
--- a/code/game/machinery/deployable_vr.dm
+++ b/code/game/machinery/deployable_vr.dm
@@ -71,7 +71,7 @@
/obj/structure/barricade/cutout/attackby(var/obj/I, var/mob/user)
if(is_type_in_list(I, painters))
- var/choice = input(user, "What would you like to paint the cutout as?", "Cutout Painting") as null|anything in cutout_types
+ var/choice = tgui_input_list(user, "What would you like to paint the cutout as?", "Cutout Painting", cutout_types)
if(!choice || !Adjacent(user, src) || I != user.get_active_hand())
return TRUE
if(do_after(user, 10 SECONDS, src))
diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm
index d8a2b463e2c..c77dff55ecc 100644
--- a/code/game/machinery/floorlayer.dm
+++ b/code/game/machinery/floorlayer.dm
@@ -35,7 +35,7 @@
/obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(W.is_wrench())
- var/m = input("Choose work mode", "Mode") as null|anything in mode
+ var/m = tgui_input_list(usr, "Choose work mode", "Mode", mode)
mode[m] = !mode[m]
var/O = mode[m]
user.visible_message("[usr] has set \the [src] [m] mode [!O?"off":"on"].", "You set \the [src] [m] mode [!O?"off":"on"].")
@@ -51,7 +51,7 @@
if(!length(contents))
to_chat(user, "\The [src] is empty.")
else
- var/obj/item/stack/tile/E = input("Choose remove tile type.", "Tiles") as null|anything in contents
+ var/obj/item/stack/tile/E = tgui_input_list(usr, "Choose remove tile type.", "Tiles", contents)
if(E)
to_chat(user, "You remove the [E] from \the [src].")
E.loc = src.loc
@@ -59,7 +59,7 @@
return
if(W.is_screwdriver())
- T = input("Choose tile type.", "Tiles") as null|anything in contents
+ T = tgui_input_list(usr, "Choose tile type.", "Tiles", contents)
return
..()
diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm
index 28a7e93d969..562c9906f47 100644
--- a/code/game/machinery/gear_dispenser.dm
+++ b/code/game/machinery/gear_dispenser.dm
@@ -188,7 +188,7 @@ var/list/dispenser_presets = list()
dispenser_flags &= ~GD_BUSY
return
- var/choice = input("Select equipment to dispense.", "Equipment Dispenser") as null|anything in gear_list
+ var/choice = tgui_input_list(usr, "Select equipment to dispense.", "Equipment Dispenser", gear_list)
if(!choice)
dispenser_flags &= ~GD_BUSY
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index f3f18a73091..fa9ab86e546 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -223,7 +223,7 @@ Holographic project of everything else.
var/icon/flat_icon = icon(getFlatIcon(src,0))//Need to make sure it's a new icon so the old one is not reused.
flat_icon.ColorTone(rgb(125,180,225))//Let's make it bluish.
flat_icon.ChangeOpacity(0.5)//Make it half transparent.
- var/input = input("Select what icon state to use in effect.",,"")
+ var/input = input(usr, "Select what icon state to use in effect.",,"")
if(input)
var/icon/alpha_mask = new('icons/effects/effects.dmi', "[input]")
flat_icon.AddAlphaMask(alpha_mask)//Finally, let's mix in a distortion effect.
diff --git a/code/game/machinery/holoposter.dm b/code/game/machinery/holoposter.dm
index a273cc1474e..d52e10b57a1 100644
--- a/code/game/machinery/holoposter.dm
+++ b/code/game/machinery/holoposter.dm
@@ -84,7 +84,7 @@ GLOBAL_LIST_EMPTY(holoposters)
return
if (W.is_multitool())
playsound(src, 'sound/items/penclick.ogg', 60, 1)
- icon_state = input("Available Posters", "Holographic Poster") as null|anything in postertypes + "random"
+ icon_state = tgui_input_list(usr, "Available Posters", "Holographic Poster", postertypes + "random")
if(!Adjacent(user))
return
if(icon_state == "random")
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 6d4453d1f22..6a92186ac50 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -150,7 +150,7 @@ Transponder Codes:
"}
usr.set_machine(src)
if(href_list["locedit"])
- var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
+ var/newloc = sanitize(input(usr, "Enter New Location", "Navigation Beacon", location) as text|null)
if(newloc)
location = newloc
updateDialog()
@@ -158,12 +158,12 @@ Transponder Codes:"}
else if(href_list["edit"])
var/codekey = href_list["code"]
- var/newkey = input("Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
+ var/newkey = input(usr, "Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
if(!newkey)
return
var/codeval = codes[codekey]
- var/newval = input("Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
+ var/newval = input(usr, "Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
if(!newval)
newval = codekey
return
@@ -180,11 +180,11 @@ Transponder Codes:"}
else if(href_list["add"])
- var/newkey = input("Enter New Transponder Code Key", "Navigation Beacon") as text|null
+ var/newkey = input(usr, "Enter New Transponder Code Key", "Navigation Beacon") as text|null
if(!newkey)
return
- var/newval = input("Enter New Transponder Code Value", "Navigation Beacon") as text|null
+ var/newval = input(usr, "Enter New Transponder Code Value", "Navigation Beacon") as text|null
if(!newval)
newval = "1"
return
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index d4fb9415a1f..aa477ac3aee 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -425,7 +425,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
for(var/datum/feed_channel/F in news_network.network_channels)
if((!F.locked || F.author == scanned_user) && !F.censored)
available_channels += F.channel_name
- var/new_channel_name = input(usr, "Choose receiving Feed Channel", "Network Channel Handler") as null|anything in available_channels
+ var/new_channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels)
if(new_channel_name)
channel_name = new_channel_name
return TRUE
diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm
index 897b981eeaf..a7bc69794bd 100644
--- a/code/game/machinery/pipe/pipelayer.dm
+++ b/code/game/machinery/pipe/pipelayer.dm
@@ -82,7 +82,7 @@
if(default_part_replacement(user, W))
return
if (!panel_open && W.is_wrench())
- P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
+ P_type_t = tgui_input_list(usr, "Choose pipe type", "Pipe type", Pipes)
P_type = Pipes[P_type_t]
user.visible_message("[user] has set \the [src] to manufacture [P_type_t].", "You set \the [src] to manufacture [P_type_t].")
return
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index a24bc582b92..e2994155426 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -143,7 +143,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(reject_bad_text(params["write"]))
recipient = params["write"] //write contains the string of the receiving department's name
- var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
+ var/new_message = sanitize(input(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = RCS_MESSAUTH
@@ -159,7 +159,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
. = TRUE
if("writeAnnouncement")
- var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
+ var/new_message = sanitize(input(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
else
diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm
index 4f8d9f89547..618d6043dee 100644
--- a/code/game/machinery/status_display_ai.dm
+++ b/code/game/machinery/status_display_ai.dm
@@ -41,7 +41,9 @@ var/list/ai_status_emotions = list(
/proc/set_ai_status_displays(mob/user as mob)
var/list/ai_emotions = get_ai_emotions(user.ckey)
- var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
+ var/emote = tgui_input_list(user, "Please, select a status:", "AI Status", ai_emotions)
+ if(!emote)
+ return
for (var/obj/machinery/M in machines) //change status
if(istype(M, /obj/machinery/ai_status_display))
var/obj/machinery/ai_status_display/AISD = M
@@ -80,9 +82,11 @@ var/list/ai_status_emotions = list(
attack_hand(user)
return
-/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
+/obj/machinery/ai_status_display/attack_ai(mob/user as mob)
var/list/ai_emotions = get_ai_emotions(user.ckey)
- var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
+ var/emote = tgui_input_list(user, "Please, select a status:", "AI Status", ai_emotions)
+ if(!emote)
+ return
emotion = emote
/obj/machinery/ai_status_display/process()
diff --git a/code/game/machinery/virtual_reality/vr_console.dm b/code/game/machinery/virtual_reality/vr_console.dm
index 8833942232e..c529d45da1d 100644
--- a/code/game/machinery/virtual_reality/vr_console.dm
+++ b/code/game/machinery/virtual_reality/vr_console.dm
@@ -230,7 +230,7 @@
for(var/obj/effect/landmark/virtual_reality/sloc in landmarks_list)
vr_landmarks += sloc.name
- S = input(occupant, "Please select a location to spawn your avatar at:", "Spawn location") as null|anything in vr_landmarks
+ S = tgui_input_list(occupant, "Please select a location to spawn your avatar at:", "Spawn location", vr_landmarks)
if(!S)
return 0
diff --git a/code/game/machinery/wall_frames.dm b/code/game/machinery/wall_frames.dm
index aabb65769ae..f8fdb866a44 100644
--- a/code/game/machinery/wall_frames.dm
+++ b/code/game/machinery/wall_frames.dm
@@ -28,7 +28,7 @@
update_type_list()
var/datum/frame/frame_types/frame_type
if(!build_machine_type)
- var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) as null|anything in frame_types_floor
+ var/datum/frame/frame_types/response = tgui_input_list(user, "What kind of frame would you like to make?", "Frame type request", null, frame_types_floor)
if(!response)
return
frame_type = response
@@ -82,7 +82,7 @@
var/datum/frame/frame_types/frame_type
if(!build_machine_type)
- var/datum/frame/frame_types/response = input(user, "What kind of frame would you like to make?", "Frame type request", null) as null|anything in frame_types_wall
+ var/datum/frame/frame_types/response = tgui_input_list(user, "What kind of frame would you like to make?", "Frame type request", null, frame_types_wall)
if(!response)
return
frame_type = response
diff --git a/code/game/magic/archived_book.dm b/code/game/magic/archived_book.dm
index 6f456dc9d65..ed77f3c90b6 100644
--- a/code/game/magic/archived_book.dm
+++ b/code/game/magic/archived_book.dm
@@ -40,7 +40,7 @@ var/global/datum/book_manager/book_mgr = new()
to_chat(src, "Only administrators may use this command.")
return
- var/isbn = input("ISBN number?", "Delete Book") as num | null
+ var/isbn = input(usr, "ISBN number?", "Delete Book") as num | null
if(!isbn)
return
diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm
index dcbe9f21ac3..414877a5af6 100644
--- a/code/game/mecha/combat/fighter.dm
+++ b/code/game/mecha/combat/fighter.dm
@@ -109,7 +109,7 @@
for(var/obj/effect/overmap/visitable/V in range(1, our_ship))
choices[V.name] = V
- var/choice = input("Choose an overmap destination:", "Destination", null) as null|anything in choices
+ var/choice = tgui_input_list(usr, "Choose an overmap destination:", "Destination", choices)
if(!choice)
var/backwards = turn(what_edge, 180)
forceMove(get_step(src,backwards)) //Move them back a step, then.
@@ -270,9 +270,9 @@
/obj/mecha/combat/fighter/gunpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool) && state == 1)
- var/new_paint_location = input("Please select a target zone.", "Paint Zone", null) as null|anything in list("Fore Stripe", "Aft Stripe", "CANCEL")
+ var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Fore Stripe", "Aft Stripe", "CANCEL"))
if(new_paint_location && new_paint_location != "CANCEL")
- var/new_paint_color = input("Please select a paint color.", "Paint Color", null) as color|null
+ var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null
if(new_paint_color)
switch(new_paint_location)
if("Fore Stripe")
diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm
index 72e51262e70..a97ad74717a 100644
--- a/code/game/mecha/mech_prosthetics.dm
+++ b/code/game/mecha/mech_prosthetics.dm
@@ -108,7 +108,7 @@
switch(action)
if("species")
- var/new_species = input(usr, "Select a new species", "Prosfab Species Selection", "Human") as null|anything in species_types
+ var/new_species = tgui_input_list(usr, "Select a new species", "Prosfab Species Selection", species_types)
if(new_species && tgui_status(usr, state) == STATUS_INTERACTIVE)
species = new_species
return
@@ -122,7 +122,7 @@
continue
new_manufacturers += A
- var/new_manufacturer = input(usr, "Select a new manufacturer", "Prosfab Species Selection", "Unbranded") as null|anything in new_manufacturers
+ var/new_manufacturer = tgui_input_list(usr, "Select a new manufacturer", "Prosfab Species Selection", new_manufacturers)
if(new_manufacturer && tgui_status(usr, state) == STATUS_INTERACTIVE)
manufacturer = new_manufacturer
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index a9bd41347ee..c540bcf2c05 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -1483,7 +1483,7 @@
else
to_chat(user, "\The [src] appears to be missing \the [slot].")
- var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
+ var/remove = tgui_input_list(user, "Which component do you want to pry out?", "Remove Component", removable_components)
if(!remove)
return
@@ -2596,7 +2596,7 @@
to_chat(user, "There are no passengers to remove.")
return
- var/pname = input(user, "Choose a passenger to forcibly remove.", "Forcibly Remove Passenger") as null|anything in passengers
+ var/pname = tgui_input_list(user, "Choose a passenger to forcibly remove.", "Forcibly Remove Passenger", passengers)
if (!pname)
return
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 316d39bacee..f1612e9083d 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -49,7 +49,7 @@
set name = "Set client perspective."
set category = "Exosuit Interface"
set src = usr.loc
- var/perspective = input("Select a perspective type.",
+ var/perspective = input(usr, "Select a perspective type.",
"Client perspective",
occupant.client.perspective) in list(MOB_PERSPECTIVE,EYE_PERSPECTIVE)
to_world("[perspective]")
diff --git a/code/game/mecha/space/shuttle.dm b/code/game/mecha/space/shuttle.dm
index bf9aec34761..49f29dca635 100644
--- a/code/game/mecha/space/shuttle.dm
+++ b/code/game/mecha/space/shuttle.dm
@@ -68,9 +68,9 @@
/obj/mecha/working/hoverpod/shuttlecraft/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool) && state == 1)
- var/new_paint_location = input("Please select a target zone.", "Paint Zone", null) as null|anything in list("Central", "Engine", "Base", "Front", "CANCEL")
+ var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Central", "Engine", "Base", "Front", "CANCEL"))
if(new_paint_location && new_paint_location != "CANCEL")
- var/new_paint_color = input("Please select a paint color.", "Paint Color", null) as color|null
+ var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null
if(new_paint_color)
switch(new_paint_location)
if("Central")
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 088ed16440d..7b9aacf0911 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -18,7 +18,7 @@
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 = tgui_input_list(user, "Who do you wish to unbuckle?","Unbuckle Who?", buckled_mobs)
if(user_unbuckle_mob(unbuckled, user))
return TRUE
else
diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm
index 57aaad3780c..62c8d894708 100644
--- a/code/game/objects/effects/decals/contraband.dm
+++ b/code/game/objects/effects/decals/contraband.dm
@@ -113,7 +113,7 @@
for(var/datum/poster/posteroption in poster_designs)
options[posteroption.listing_name] = posteroption
- var/choice = input(M,"Choose a poster!","Customize Poster") in options
+ var/choice = tgui_input_list(M, "Choose a poster!", "Customize Poster", options)
if(src && choice && !M.stat && in_range(M,src))
var serial = poster_designs.Find(options[choice])
serial_number = serial
diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm
index d5232edbdad..5db78d7baaf 100644
--- a/code/game/objects/effects/decals/posters/posters.dm
+++ b/code/game/objects/effects/decals/posters/posters.dm
@@ -102,7 +102,7 @@
for(var/decl/poster/posteroption in decls_repository.get_decls_of_type(/decl/poster))
options[posteroption.listing_name] = posteroption
- var/choice = input(M,"Choose a poster!","Customize Poster") in options
+ var/choice = tgui_input_list(M, "Choose a poster!", "Customize Poster", options)
if(src && choice && !M.stat && in_range(M,src))
poster_decl = options[choice]
name = "rolled-up poly-poster - No.[poster_decl.icon_state]"
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index eb025f9ba40..ef681e5aa48 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -114,13 +114,13 @@
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
- var/p = input("Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
+ var/p = input(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
if(p == null) return
- var/o = input("Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
+ var/o = input(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
if(o == null) return
- var/c = input("Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
+ var/c = input(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
if(c == null) return
new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c)
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 96318ff1c08..00183ec90cf 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -141,7 +141,7 @@
to_chat(usr, "Error! Please notify administration!")
return
var/list/turf/turfs = res
- var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
+ var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -200,7 +200,7 @@
/obj/item/blueprints/proc/edit_area()
var/area/A = get_area()
var/prevname = "[A.name]"
- var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
+ var/str = sanitizeSafe(input(usr, "New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 198288311cf..b2bd8757f39 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -68,28 +68,30 @@
/obj/item/weapon/pen/crayon/afterattack(atom/target, mob/user as mob, proximity)
if(!proximity) return
if(istype(target,/turf/simulated/floor))
- var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter","arrow")
+ var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow"))
+ if(!drawtype)
+ return
if(get_dist(target, user) > 1 || !(user.z == target.z))
return
switch(drawtype)
if("letter")
- drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
- if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
+ drawtype = tgui_input_list(user, "Choose the letter.", "Crayon scribbles", list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"))
+ if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing a letter on the [target.name].")
if("graffiti")
- drawtype = input("Choose the graffiti.", "Crayon scribbles") in list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
- if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
+ drawtype = tgui_input_list(user, "Choose the graffiti.", "Crayon scribbles", list("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa"))
+ if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing graffiti on the [target.name].")
if("rune")
- drawtype = input("Choose the rune.", "Crayon scribbles") in list("rune1", "rune2", "rune3", "rune4", "rune5", "rune6")
- if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
+ drawtype = tgui_input_list(user, "Choose the rune.", "Crayon scribbles", list("rune1", "rune2", "rune3", "rune4", "rune5", "rune6"))
+ if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing a rune on the [target.name].")
if("arrow")
- drawtype = input("Choose the arrow.", "Crayon scribbles") in list("left", "right", "up", "down")
- if(get_dist(target, user) > 1 || !(user.z == target.z) || !drawtype)
+ drawtype = tgui_input_list(user, "Choose the arrow.", "Crayon scribbles", list("left", "right", "up", "down"))
+ if(!drawtype || get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing an arrow on the [target.name].")
if(instant || do_after(user, 50))
diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm
index 68b6022ad02..bfe6d03eab3 100644
--- a/code/game/objects/items/devices/communicator/messaging.dm
+++ b/code/game/objects/items/devices/communicator/messaging.dm
@@ -130,7 +130,7 @@
to_chat(src, "There are no available communicators, sorry.")
return
- var/choice = input(src,"Send a text message to whom?") as null|anything in choices
+ var/choice = tgui_input_list(src,"Send a text message to whom?", "Recipient Choice", choices)
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
diff --git a/code/game/objects/items/devices/communicator/phone.dm b/code/game/objects/items/devices/communicator/phone.dm
index a7af8703f80..e938276bdca 100644
--- a/code/game/objects/items/devices/communicator/phone.dm
+++ b/code/game/objects/items/devices/communicator/phone.dm
@@ -315,7 +315,7 @@
to_chat(src , "There are no available communicators, sorry.")
return
- var/choice = input(src,"Send a voice request to whom?") as null|anything in choices
+ var/choice = tgui_input_list(src,"Send a voice request to whom?", "Recipient Choice", choices)
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm
index c4c64f746c4..c464182c10c 100644
--- a/code/game/objects/items/devices/floor_painter.dm
+++ b/code/game/objects/items/devices/floor_painter.dm
@@ -105,8 +105,10 @@
new painting_decal(F, painting_dir, painting_colour)
/obj/item/device/floor_painter/attack_self(var/mob/user)
- var/choice = input("Do you wish to change the decal type, paint direction, or paint colour?") as null|anything in list("Decal","Direction", "Colour")
- if(choice == "Decal")
+ var/choice = tgui_alert(usr, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel"))
+ if(choice == "Cancel")
+ return
+ else if(choice == "Decal")
choose_decal()
else if(choice == "Direction")
choose_direction()
@@ -139,7 +141,7 @@
if(usr.incapacitated())
return
- var/new_decal = input("Select a decal.") as null|anything in decals
+ var/new_decal = tgui_input_list(usr, "Select a decal:", "Decal Choice", decals)
if(new_decal && !isnull(decals[new_decal]))
decal = new_decal
to_chat(usr, "You set \the [src] decal to '[decal]'.")
@@ -153,7 +155,7 @@
if(usr.incapacitated())
return
- var/new_dir = input("Select a direction.") as null|anything in paint_dirs
+ var/new_dir = tgui_input_list(usr, "Select a direction:", "Direction Choice", paint_dirs)
if(new_dir && !isnull(paint_dirs[new_dir]))
paint_dir = new_dir
to_chat(usr, "You set \the [src] direction to '[paint_dir]'.")
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 5397359aedb..360cbebd2c7 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -315,7 +315,7 @@ var/list/GPS_list = list()
if(href_list["track_color"])
var/obj/item/device/gps/gps = locate(href_list["track_color"])
if(istype(gps) && !QDELETED(gps))
- var/new_colour = input("Enter a new tracking color.", "GPS Waypoint Color") as color|null
+ var/new_colour = input(usr, "Enter a new tracking color.", "GPS Waypoint Color") as color|null
if(new_colour && istype(gps) && !QDELETED(gps) && holder == usr && !usr.incapacitated())
to_chat(usr, SPAN_NOTICE("You adjust the colour \the [src] is using to highlight [gps.gps_tag]."))
LAZYSET(tracking_devices, href_list["track_color"], new_colour)
@@ -323,7 +323,7 @@ var/list/GPS_list = list()
. = TRUE
if(href_list["tag"])
- var/a = input("Please enter desired tag.", name, gps_tag) as text
+ var/a = input(usr, "Please enter desired tag.", name, gps_tag) as text
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm
index c5d1a2bdb97..37a5ade906d 100644
--- a/code/game/objects/items/devices/holowarrant.dm
+++ b/code/game/objects/items/devices/holowarrant.dm
@@ -30,7 +30,7 @@
to_chat(user,"There are no warrants available")
return
var/temp
- temp = input(user, "Which warrant would you like to load?") as null|anything in warrants
+ temp = tgui_input_list(user, "Which warrant would you like to load?", "Warrant Selection", warrants)
for(var/datum/data/record/warrant/W in data_core.warrants)
if(W.fields["namewarrant"] == temp)
active = W
diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm
index 3d41d9fcab5..64448558bb1 100644
--- a/code/game/objects/items/devices/locker_painter.dm
+++ b/code/game/objects/items/devices/locker_painter.dm
@@ -118,7 +118,7 @@
return
/obj/item/device/closet_painter/attack_self(var/mob/user)
- var/choice = input("Do you wish to change the regular closet colour or the secure closet colour?") as null|anything in list("Regular Closet Colour","Secure Closet Colour")
+ var/choice = tgui_alert(usr, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour"))
if(choice == "Regular Closet Colour")
choose_colour()
else if(choice == "Secure Closet Colour")
@@ -137,7 +137,7 @@
if(usr.incapacitated())
return
- var/new_colour = input("Select a colour.") as null|anything in colours
+ var/new_colour = tgui_input_list(usr, "Select a color:", "Color Selection", colours)
if(new_colour && !isnull(colours[new_colour]))
colour = new_colour
to_chat(usr, "You set \the [src] regular closet colour to '[colour]'.")
@@ -151,7 +151,7 @@
if(usr.incapacitated())
return
- var/new_colour_secure = input("Select a colour.") as null|anything in colours_secure
+ var/new_colour_secure = tgui_input_list(usr, "Select a color:", "Color Selection", colours_secure)
if(new_colour_secure && !isnull(colours_secure[new_colour_secure]))
colour_secure = new_colour_secure
to_chat(usr, "You set \the [src] secure closet colour to '[colour_secure]'.")
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index 86602094c1c..55f92f0cc87 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -98,7 +98,7 @@
adjust_volume(usr)
/obj/item/device/megaphone/super/proc/adjust_volume(var/mob/living/user)
- var/new_volume = input(user, "Set Volume") as null|anything in volume_options
+ var/new_volume = tgui_input_list(user, "Set Volume", "Set Volume", volume_options)
if(new_volume && Adjacent(user))
broadcast_size = new_volume
@@ -111,7 +111,7 @@
adjust_font(usr)
/obj/item/device/megaphone/super/proc/adjust_font(var/mob/living/user)
- var/new_font = input(user, "Set Volume") as null|anything in font_options
+ var/new_font = tgui_input_list(user, "Set Volume", "Set Volume", font_options)
if(new_font && Adjacent(user))
broadcast_font = new_font
@@ -124,7 +124,7 @@
adjust_color(usr)
/obj/item/device/megaphone/super/proc/adjust_color(var/mob/living/user)
- var/new_color = input(user, "Set Volume") as null|anything in color_options
+ var/new_color = tgui_input_list(user, "Set Volume", "Set Volume", color_options)
if(new_color && Adjacent(user))
broadcast_color = new_color
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index db88469a47f..f110251a17c 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -38,7 +38,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(pai != null) //Have a person in them already?
return ..()
- var/choice = input(user, "You sure you want to inhabit this PAI?") in list("Yes", "No")
+ var/choice = tgui_alert(user, "You sure you want to inhabit this PAI?", "Confirmation", list("Yes", "No"))
if(choice == "No")
return ..()
@@ -273,7 +273,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
src.looking_for_personality = 1
paiController.findPAI(src, usr)
if(href_list["wipe"])
- var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe", list("Yes", "No"))
if(confirm == "Yes")
for(var/mob/M in src)
to_chat(M, "You feel yourself slipping away from reality.
")
@@ -290,7 +290,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
- var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
+ var/newlaws = sanitize(input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
if(newlaws)
pai.pai_laws = newlaws
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm
index 59e386b6080..86ef63b2807 100644
--- a/code/game/objects/items/devices/pipe_painter.dm
+++ b/code/game/objects/items/devices/pipe_painter.dm
@@ -24,7 +24,10 @@
P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
- mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
+ var/new_mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe painter", modes)
+ if(!new_mode)
+ return
+ mode = new_mode
/obj/item/device/pipe_painter/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/devices/scanners_vr.dm b/code/game/objects/items/devices/scanners_vr.dm
index 81cbfb3da90..664a9d8e905 100644
--- a/code/game/objects/items/devices/scanners_vr.dm
+++ b/code/game/objects/items/devices/scanners_vr.dm
@@ -60,7 +60,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
choices += H
// Subtargets
if(choices.len > 1)
- var/mob/living/new_M = input(user, "Ambiguous target. Please validate target:", "Target Validation", M) as null|anything in choices
+ var/mob/living/new_M = tgui_input_list(user, "Ambiguous target. Please validate target:", "Target Validation", choices, M)
if(!new_M || !M.Adjacent(user))
return
M = new_M
diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm
index 60ca5cc1a29..a92bf815b84 100644
--- a/code/game/objects/items/devices/spy_bug.dm
+++ b/code/game/objects/items/devices/spy_bug.dm
@@ -191,7 +191,7 @@
operating = 1
while(selected_camera && Adjacent(user))
- selected_camera = input("Select camera to view.") as null|anything in cameras
+ selected_camera = tgui_input_list(usr, "Select camera to view.", "Camera Choice", cameras)
selected_camera = null
operating = 0
diff --git a/code/game/objects/items/devices/translator.dm b/code/game/objects/items/devices/translator.dm
index 868481d51e1..b50aeb91f80 100644
--- a/code/game/objects/items/devices/translator.dm
+++ b/code/game/objects/items/devices/translator.dm
@@ -14,7 +14,7 @@
/obj/item/device/universal_translator/attack_self(mob/user)
if(!listening) //Turning ON
- langset = input(user,"Translate to which of your languages?","Language Selection") as null|anything in user.languages
+ langset = tgui_input_list(user,"Translate to which of your languages?","Language Selection", user.languages)
if(langset)
if(langset && ((langset.flags & NONVERBAL) || (langset.flags & HIVEMIND) || (!langset.machine_understands)))
//Nonverbal means no spoken words to translate, so I didn't see the need to remove it.
diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm
index ae4e5d29e4e..e4d06975de0 100644
--- a/code/game/objects/items/devices/translocator_vr.dm
+++ b/code/game/objects/items/devices/translocator_vr.dm
@@ -162,45 +162,6 @@ This device records all warnings given and teleport events for admin review in c
destination = beacons[choice]
rebuild_radial_images()
- /* Ye olde text-based way
- var/choice = tgui_alert(user,"What do you want to do?","[src]",list("Create Beacon","Cancel","Target Beacon"))
- switch(choice)
- if("Create Beacon")
- if(beacons_left <= 0)
- tgui_alert_async(usr, "The translocator can't support any more beacons!","Error")
- return
-
- var/new_name = html_encode(input(user,"New beacon's name (2-20 char):","[src]") as text|null)
-
- if(length(new_name) > 20 || length(new_name) < 2)
- tgui_alert_async(usr, "Entered name length invalid (must be longer than 2, no more than than 20).","Error")
- return
- if(new_name in beacons)
- tgui_alert_async(usr, "No duplicate names, please. '[new_name]' exists already.","Error")
- return
-
- var/obj/item/device/perfect_tele_beacon/nb = new(get_turf(src))
- nb.tele_name = new_name
- nb.tele_hand = src
- nb.creator = user.ckey
- beacons[new_name] = nb
- beacons_left--
- if(isliving(user))
- var/mob/living/L = user
- L.put_in_any_hand_if_possible(nb)
-
- if("Target Beacon")
- if(!beacons.len)
- to_chat(user,"\The [src] doesn't have any beacons!")
- else
- var/target = input("Which beacon do you target?","[src]") in beacons|null
- if(target && (target in beacons))
- destination = beacons[target]
- to_chat(user,"Destination set to '[target]'.")
- else
- return
- */
-
/obj/item/device/perfect_tele/attackby(obj/W, mob/user)
if(istype(W,cell_type) && !power_source)
power_source = W
@@ -446,7 +407,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
var/mob/living/L = user
var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", list("Eat it!", "No, thanks."))
if(confirm == "Eat it!")
- var/obj/belly/bellychoice = input("Which belly?","Select A Belly") as null|anything in L.vore_organs
+ var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
user.visible_message("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice]!","You begin putting \the [src] into your [bellychoice]!")
if(do_after(user,5 SECONDS,src))
diff --git a/code/game/objects/items/gunbox.dm b/code/game/objects/items/gunbox.dm
index add1530ca48..6089ad76b25 100644
--- a/code/game/objects/items/gunbox.dm
+++ b/code/game/objects/items/gunbox.dm
@@ -9,7 +9,7 @@
var/list/options = list()
options[".45 Pistol"] = list(/obj/item/weapon/gun/projectile/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
options[".45 Revolver"] = list(/obj/item/weapon/gun/projectile/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber)
- var/choice = input(user,"Would you prefer a pistol or a revolver?") as null|anything in options
+ var/choice = tgui_input_list(user,"Would you prefer a pistol or a revolver?", "Gun!", options)
if(src && choice)
var/list/things_to_spawn = options[choice]
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
diff --git a/code/game/objects/items/gunbox_vr.dm b/code/game/objects/items/gunbox_vr.dm
index 1ddf43c2726..c0bfd4642fb 100644
--- a/code/game/objects/items/gunbox_vr.dm
+++ b/code/game/objects/items/gunbox_vr.dm
@@ -8,7 +8,7 @@
options["NT Mk58 (.45)"] = list(/obj/item/weapon/gun/projectile/sec, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
options["SW 625 Revolver (.45)"] = list(/obj/item/weapon/gun/projectile/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber)
options["P92X (9mm)"] = list(/obj/item/weapon/gun/projectile/p92x/sec, /obj/item/ammo_magazine/m9mm/rubber, /obj/item/ammo_magazine/m9mm/rubber)
- var/choice = input(user,"Would you prefer a pistol or a revolver?") as null|anything in options
+ var/choice = tgui_input_list(user,"Would you prefer a pistol or a revolver?", "Gun!", options)
if(src && choice)
var/list/things_to_spawn = options[choice]
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm
index f5de239b9a9..1340418249f 100644
--- a/code/game/objects/items/stacks/marker_beacons.dm
+++ b/code/game/objects/items/stacks/marker_beacons.dm
@@ -68,7 +68,7 @@ var/list/marker_beacon_colors = list(
return
if(!in_range(src, user))
return
- var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in marker_beacon_colors
+ var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", marker_beacon_colors)
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
if(input_color)
@@ -143,7 +143,7 @@ var/list/marker_beacon_colors = list(
return
if(!in_range(src, user))
return
- var/input_color = input(user, "Choose a color.", "Beacon Color") as null|anything in marker_beacon_colors
+ var/input_color = tgui_input_list(user, "Choose a color.", "Beacon Color", marker_beacon_colors)
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
if(input_color)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index d31ed74dcfc..e80afbef414 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -350,7 +350,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
- var/N = input("How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
+ var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
diff --git a/code/game/objects/items/toys/godfigures.dm b/code/game/objects/items/toys/godfigures.dm
index 195081aae56..027544a0eb8 100644
--- a/code/game/objects/items/toys/godfigures.dm
+++ b/code/game/objects/items/toys/godfigures.dm
@@ -48,7 +48,7 @@
options["Moon Gem"] = "moon"
options["Tajaran Figure"] = "catrobe"
- var/choice = input(M,"Choose your icon!","Customize Figure") in options
+ var/choice = tgui_input_list(M, "Choose your icon!", "Customize Figure", options)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
if(options[choice] == "frobe")
@@ -123,7 +123,7 @@
var/mob/M = usr
if(!M.mind) return 0
- var/input = sanitizeSafe(input("What do you want to name the icon?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the icon?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = "icon of " + input
diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm
index 0b283d0a7a6..62b884354a5 100644
--- a/code/game/objects/items/toys/toys.dm
+++ b/code/game/objects/items/toys/toys.dm
@@ -897,7 +897,7 @@
if(!M.mind)
return 0
- var/input = sanitizeSafe(input("What do you want to name the plushie?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm
index 347e7187edd..3884b0a17cd 100644
--- a/code/game/objects/items/toys/toys_vr.dm
+++ b/code/game/objects/items/toys/toys_vr.dm
@@ -294,7 +294,7 @@
/obj/item/toy/rock/attackby(obj/item/I as obj, mob/living/user as mob, proximity)
if(!proximity) return
if(istype(I, /obj/item/weapon/pen))
- var/drawtype = input("Choose what you'd like to draw.", "Faces") in list("fred","roxie","rock")
+ var/drawtype = tgui_alert(user, "Choose what you'd like to draw.", "Faces", list("fred","roxie","rock","Cancel"))
switch(drawtype)
if("fred")
src.icon_state = "fred"
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index c25ba8d307e..58c91b5b46c 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -132,7 +132,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
- var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
+ var/targName = sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
@@ -158,7 +158,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
- var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
+ var/targName = sanitize(input(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
@@ -239,7 +239,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/attack_self(var/mob/user as mob)
..()
- var/new_lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
+ var/new_lawpos = input(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
@@ -356,7 +356,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
- var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
+ var/targName = sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -380,7 +380,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
- var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
+ var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index 5d983e596a1..5eca1139a12 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -57,7 +57,7 @@ RSF
if(!Adjacent(user) || !istype(user))
to_chat(user,"You are too far away.")
return
- var/glass_choice = input(user, "Please choose which type of glass you would like to produce.") as null|anything in container_types
+ var/glass_choice = tgui_input_list(user, "Please choose which type of glass you would like to produce.", "Glass Choice", container_types)
if(glass_choice)
glasstype = container_types[glass_choice]
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index e1d2cfd398b..8de1fb7f807 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -288,7 +288,7 @@ Implant Specifics:
"}
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
- phrase = input("Choose activation phrase:") as text
+ phrase = input(usr, "Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate.", 0, 0)
@@ -618,7 +618,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
qdel(src)
/obj/item/weapon/implant/compressed/post_implant(mob/source)
- src.activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ var/choices = list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ activation_emote = tgui_input_list(usr, "Choose activation emote. If you cancel this, one will be picked at random.", "Implant Activation", choices)
+ if(!activation_emote)
+ activation_emote = pick(choices)
if (source.mind)
source.mind.store_memory("Compressed matter implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
to_chat(source, "The implanted compressed matter implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.")
diff --git a/code/game/objects/items/weapons/implants/implantaugment.dm b/code/game/objects/items/weapons/implants/implantaugment.dm
index 020976447d8..32082fef99c 100644
--- a/code/game/objects/items/weapons/implants/implantaugment.dm
+++ b/code/game/objects/items/weapons/implants/implantaugment.dm
@@ -108,7 +108,7 @@
if(Choices.len == 1)
target_choice = Choices[1]
else
- target_choice = input("Choose augment location:") in Choices
+ target_choice = tgui_input_list(usr, "Choose augment location:", "Choose Location", Choices)
else
return FALSE
diff --git a/code/game/objects/items/weapons/implants/implantuplink.dm b/code/game/objects/items/weapons/implants/implantuplink.dm
index 873a09149c5..51f9c0d696d 100644
--- a/code/game/objects/items/weapons/implants/implantuplink.dm
+++ b/code/game/objects/items/weapons/implants/implantuplink.dm
@@ -12,8 +12,10 @@
return
/obj/item/weapon/implant/uplink/post_implant(mob/source)
- listening_objects |= src
- activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ var/choices = list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ activation_emote = tgui_input_list(usr, "Choose activation emote. If you cancel this, one will be picked at random.", "Implant Activation", choices)
+ if(!activation_emote)
+ activation_emote = pick(choices)
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
to_chat(source, "The implanted uplink implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.")
diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm
index 8119de19e07..646f38ab332 100644
--- a/code/game/objects/items/weapons/scrolls.dm
+++ b/code/game/objects/items/weapons/scrolls.dm
@@ -46,10 +46,9 @@
return
/obj/item/weapon/teleportation_scroll/proc/teleportscroll(var/mob/user)
-
- var/A
-
- A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs
+ var/A = tgui_input_list(user, "Area to jump to:", "Teleportation Scroll", teleportlocs)
+ if(!A)
+ return
var/area/thearea = teleportlocs[A]
if (user.stat || user.restrained())
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 103c52295cb..610fb20f02d 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -160,7 +160,9 @@ Frequency:
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
- var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") in L
+ var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L)
+ if(!t1)
+ return
if ((user.get_active_hand() != src || user.stat || user.restrained()))
return
var/count = 0 //num of portals from this teleport in world
diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm
index e54c75eebba..7d55685e4ca 100644
--- a/code/game/objects/structures/barsign.dm
+++ b/code/game/objects/structures/barsign.dm
@@ -36,7 +36,7 @@
var/obj/item/weapon/card/id/card = I.GetID()
if(istype(card))
if(access_bar in card.GetAccess())
- var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
+ var/sign_type = tgui_input_list(user, "What would you like to change the barsign to?", "Bar Sign Choice", get_valid_states(0))
if(!sign_type)
return
icon_state = sign_type
diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm
index 8b1780f077c..6079f31022b 100644
--- a/code/game/objects/structures/bonfire.dm
+++ b/code/game/objects/structures/bonfire.dm
@@ -37,7 +37,7 @@
/obj/structure/bonfire/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/rods) && !can_buckle && !grill)
var/obj/item/stack/rods/R = W
- var/choice = input(user, "What would you like to construct?", "Bonfire") as null|anything in list("Stake","Grill")
+ var/choice = tgui_input_list(user, "What would you like to construct?", "Bonfire", list("Stake","Grill"))
switch(choice)
if("Stake")
R.use(1)
diff --git a/code/game/objects/structures/ghost_pods/event_vr.dm b/code/game/objects/structures/ghost_pods/event_vr.dm
index b1473fd1c13..6e99aa398f6 100644
--- a/code/game/objects/structures/ghost_pods/event_vr.dm
+++ b/code/game/objects/structures/ghost_pods/event_vr.dm
@@ -50,7 +50,7 @@
var/finalized = "No"
while(finalized == "No" && M.client)
- choice = input(M,"What type of predator do you want to play as?") as null|anything in possible_mobs
+ choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs)
if(!choice)
randomize = TRUE
break
diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm
index 12256e5ab33..f5b77564853 100644
--- a/code/game/objects/structures/ghost_pods/ghost_pods.dm
+++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm
@@ -87,7 +87,7 @@
to_chat(user, "Another spirit appears to have gotten to \the [src] before you. Sorry.")
return
- var/choice = input(user, "Are you certain you wish to activate this pod?", "Control Pod") as null|anything in list("Yes", "No")
+ var/choice = tgui_alert(user, "Are you certain you wish to activate this pod?", "Control Pod", list("Yes", "No"))
if(!choice || choice == "No")
return
diff --git a/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm b/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
index 08cb7c78ba6..1c88500020a 100644
--- a/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
+++ b/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
@@ -23,7 +23,7 @@
return
busy = TRUE
- var/choice = input(user, "Are you certain you wish to activate this pod?", "Control Pod") as null|anything in list("Yes", "No")
+ var/choice = tgui_alert(user, "Are you certain you wish to activate this pod?", "Control Pod", list("Yes", "No"))
if(!choice || choice == "No")
busy = FALSE
diff --git a/code/game/objects/structures/kitchen_foodcart_vr.dm b/code/game/objects/structures/kitchen_foodcart_vr.dm
index 2e9d65d9705..04c3f1de5fe 100644
--- a/code/game/objects/structures/kitchen_foodcart_vr.dm
+++ b/code/game/objects/structures/kitchen_foodcart_vr.dm
@@ -24,7 +24,7 @@
/obj/structure/foodcart/attack_hand(var/mob/user as mob)
if(contents.len)
- var/obj/item/weapon/reagent_containers/food/choice = input("What would you like to grab from the cart?") as null|obj in contents
+ var/obj/item/weapon/reagent_containers/food/choice = tgui_input_list(usr, "What would you like to grab from the cart?", "Grab Choice", contents)
if(choice)
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
return
diff --git a/code/game/objects/structures/medical_stand_vr.dm b/code/game/objects/structures/medical_stand_vr.dm
index 3ca9999f85f..2da7daba7b3 100644
--- a/code/game/objects/structures/medical_stand_vr.dm
+++ b/code/game/objects/structures/medical_stand_vr.dm
@@ -107,7 +107,7 @@
var/action_type
if(available_options.len > 1)
- action_type = input(usr, "What do you want to attach/detach?") as null|anything in available_options
+ action_type = tgui_input_list(usr, "What do you want to attach/detach?", "Attach/Detach Choice", available_options)
else if(available_options.len)
action_type = available_options[1]
if(usr.stat == DEAD || !CanMouseDrop(target))
@@ -175,7 +175,7 @@
var/action_type
if(available_options.len > 1)
- action_type = input(user, "What do you want to do?") as null|anything in available_options
+ action_type = tgui_input_list(user, "What do you want to do?", "Stand Choice", available_options)
else if(available_options.len)
action_type = available_options[1]
switch (action_type)
@@ -240,7 +240,7 @@
set name = "Set IV transfer amount"
set category = "Object"
set src in range(1)
- var/N = input("Amount per transfer from this:","[src]") as null|anything in transfer_amounts
+ var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", transfer_amounts)
if(N)
transfer_amount = N
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 2af3c3cccec..0eb4775c23b 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -125,7 +125,7 @@
/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user)
if(istype(get_area(src),/area/syndicate_mothership))
if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != SPECIES_VOX && is_alien_whitelisted(user, SPECIES_VOX))
- var/choice = input("Do you wish to become a true Vox of the Shoal? This is not reversible.") as null|anything in list("No","Yes")
+ var/choice = tgui_alert(usr, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes"))
if(choice && choice == "Yes")
var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX)
vox.gender = user.gender
diff --git a/code/game/objects/structures/props/beam_prism.dm b/code/game/objects/structures/props/beam_prism.dm
index b0122ace473..d70d72d089f 100644
--- a/code/game/objects/structures/props/beam_prism.dm
+++ b/code/game/objects/structures/props/beam_prism.dm
@@ -50,7 +50,7 @@
to_chat(user, "\The [src]'s motors resist your efforts to rotate it. You may need to find some form of controller.")
return
- var/confirm = input("Do you want to try to rotate \the [src]?", "[name]") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
visible_message(\
"[user.name] decides not to try turning \the [src].",\
@@ -59,13 +59,13 @@
var/new_bearing
if(free_rotate)
- new_bearing = input("What bearing do you want to rotate \the [src] to?", "[name]") as num
+ new_bearing = input(usr, "What bearing do you want to rotate \the [src] to?", "[name]") as num
new_bearing = round(new_bearing)
if(new_bearing <= -1 || new_bearing > 360)
to_chat(user, "Rotating \the [src] [new_bearing] degrees would be a waste of time.")
return
else
- var/choice = input("What point do you want to set \the [src] to?", "[name]") as null|anything in compass_directions
+ var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions)
new_bearing = round(compass_directions[choice])
var/rotate_degrees = new_bearing - degrees_from_north
@@ -156,7 +156,7 @@
/obj/structure/prop/prismcontrol/attack_hand(mob/living/user)
..()
- var/confirm = input("Do you want to try to rotate \the [src]?", "[name]") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
visible_message(\
"[user.name] decides not to try turning \the [src].",\
@@ -176,16 +176,16 @@
var/new_bearing
if(free_rotate)
- new_bearing = input("What bearing do you want to rotate \the [src] to?", "[name]") as num
+ new_bearing = input(usr, "What bearing do you want to rotate \the [src] to?", "[name]") as num
new_bearing = round(new_bearing)
if(new_bearing <= -1 || new_bearing > 360)
to_chat(user, "Rotating \the [src] [new_bearing] degrees would be a waste of time.")
return
else
- var/choice = input("What point do you want to set \the [src] to?", "[name]") as null|anything in compass_directions
+ var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions)
new_bearing = round(compass_directions[choice])
- confirm = input("Are you certain you want to rotate \the [src]?", "[name]") in list("Yes", "No")
+ confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No"))
if(confirm == "No")
visible_message(\
"[user.name] decides not to try turning \the [src].",\
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 78384b02851..0ea4d1db252 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -44,7 +44,7 @@
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
if(tool.is_screwdriver() && isturf(user.loc))
- var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
+ var/direction = tgui_input_list(usr, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel"))
if(direction == "Cancel") return
var/obj/structure/sign/S = new(user.loc)
switch(direction)
diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm
index c919663eaa6..7bf83c73c9b 100644
--- a/code/game/objects/structures/under_wardrobe.dm
+++ b/code/game/objects/structures/under_wardrobe.dm
@@ -66,7 +66,7 @@
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
if(!UWC)
return
- var/datum/category_item/underwear/selected_underwear = input(H, "Choose underwear:", "Choose underwear", H.all_underwear[UWC.name]) as null|anything in UWC.items
+ var/datum/category_item/underwear/selected_underwear = tgui_input_list(H, "Choose underwear:", "Choose underwear", UWC.items, H.all_underwear[UWC.name])
if(selected_underwear && CanUseTopic(H, GLOB.tgui_default_state))
H.all_underwear[UWC.name] = selected_underwear
H.hide_underwear[UWC.name] = FALSE
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 8a7c8c9d5f9..f512c3a799a 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -170,7 +170,7 @@
if(I.type == /obj/item/device/analyzer)
to_chat(user, "The water temperature seems to be [watertemp].")
if(I.is_wrench())
- var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
+ var/newtemp = tgui_input_list(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve", temperature_settings)
to_chat(user, "You begin to adjust the temperature valve with \the [I].")
playsound(src, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index c6a2728108c..f2dbfd3ce45 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -318,7 +318,7 @@
to_chat(vandal, "There's too much graffiti here to add more.")
return FALSE
- var/message = sanitize(input("Enter a message to engrave.", "Graffiti") as null|text, trim = TRUE)
+ var/message = sanitize(input(usr, "Enter a message to engrave.", "Graffiti") as null|text, trim = TRUE)
if(!message)
return FALSE
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index c143171766d..10f0c8c0a70 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/DB ban/functions.dm
@@ -182,7 +182,7 @@
switch(param)
if("reason")
if(!value)
- value = sanitize(input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
+ value = sanitize(input(usr, "Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
value = sql_sanitize_text(value)
if(!value)
to_chat(usr, "Cancelled")
@@ -193,7 +193,7 @@
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
if("duration")
if(!value)
- value = input("Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
+ value = input(usr, "Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
if(!isnum(value) || !value)
to_chat(usr, "Cancelled")
return
diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm
index aa5cc8c888f..4171ea6a377 100644
--- a/code/modules/admin/ToRban.dm
+++ b/code/modules/admin/ToRban.dm
@@ -70,7 +70,7 @@
src << browse(dat,"window=ToRban_show")
if("remove")
var/savefile/F = new(TORFILE)
- var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir
+ var/choice = tgui_input_list(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban", F.dir)
if(choice)
F.dir.Remove(choice)
to_chat(src, "Address removed")
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 495dd343fb5..a0a84ed52c3 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -688,7 +688,7 @@ var/global/floorIsLava = 0
set desc="Announce your desires to the world"
if(!check_rights(0)) return
- var/message = input("Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
+ var/message = input(usr, "Global message to send:", "Admin Announce", null, null) as message//todo: sanitize for all?
if(message)
if(!check_rights(R_SERVER,0))
message = sanitize(message, 500, extra = 0)
@@ -706,14 +706,14 @@ var/datum/announcement/minor/admin_min_announcer = new
set desc = "Send an intercom message, like an arrivals announcement."
if(!check_rights(0)) return
- var/channel = input("Channel for message:","Channel", null) as null|anything in radiochannels
+ var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(channel) //They picked a channel
- var/sender = input("Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
+ var/sender = input(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
if(sender) //They put a sender
sender = sanitize(sender, 75, extra = 0)
- var/message = input("Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
+ var/message = input(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
if(message) //They put a message
message = sanitize(message, 500, extra = 0)
@@ -729,7 +729,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set waitfor = FALSE //Why bother? We have some sleeps. You can leave tho!
if(!check_rights(0)) return
- var/channel = input("Channel for message:","Channel", null) as null|anything in radiochannels
+ var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(!channel) //They picked a channel
return
@@ -1112,7 +1112,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!seedtype || !SSplants.seeds[seedtype])
return
- var/amount = input("Amount of fruit to spawn", "Fruit Amount", 1) as null|num
+ var/amount = input(usr, "Amount of fruit to spawn", "Fruit Amount", 1) as null|num
if(!isnull(amount))
var/datum/seed/S = SSplants.seeds[seedtype]
S.harvest(usr,0,0,amount)
@@ -1125,12 +1125,12 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!check_rights(R_SPAWN)) return
- var/owner = input("Select a ckey.", "Spawn Custom Item") as null|anything in custom_items
+ var/owner = tgui_input_list(usr, "Select a ckey.", "Spawn Custom Item", custom_items)
if(!owner|| !custom_items[owner])
return
var/list/possible_items = custom_items[owner]
- var/datum/custom_item/item_to_spawn = input("Select an item to spawn.", "Spawn Custom Item") as null|anything in possible_items
+ var/datum/custom_item/item_to_spawn = tgui_input_list(usr, "Select an item to spawn.", "Spawn Custom Item", possible_items)
if(!item_to_spawn)
return
@@ -1191,7 +1191,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(matches.len==1)
chosen = matches[1]
else
- chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
+ chosen = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
if(!chosen)
return
@@ -1351,7 +1351,7 @@ var/datum/announcement/minor/admin_min_announcer = new
to_chat(usr, "Error: you are not an admin!")
return
- var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
+ var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Select mob.", human_mob_list)
if(!M) return
show_skill_window(usr, M)
@@ -1472,7 +1472,7 @@ var/datum/announcement/minor/admin_min_announcer = new
to_chat(usr, "Mode has not started.")
return
- var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
+ var/antag_type = tgui_input_list(usr, "Choose a template.","Force Latespawn", all_antag_types)
if(!antag_type || !all_antag_types[antag_type])
to_chat(usr, "Aborting.")
return
@@ -1525,7 +1525,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
- crystals = input("Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
+ crystals = input(usr, "Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
if (!isnull(crystals))
H.mind.tcrystals = crystals
var/msg = "[key_name(usr)] has modified [H.ckey]'s telecrystals to [crystals]."
@@ -1541,7 +1541,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
- crystals = input("Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
+ crystals = input(usr, "Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
if (!isnull(crystals))
H.mind.tcrystals += crystals
var/msg = "[key_name(usr)] has added [crystals] to [H.ckey]'s telecrystals."
@@ -1554,7 +1554,7 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Special Verbs"
set name = "Send Fax"
set desc = "Sends a fax to this machine"
- var/department = input("Choose a fax", "Fax") as null|anything in alldepartments
+ var/department = tgui_input_list(usr, "Choose a fax", "Fax", alldepartments)
for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes)
if(sendto.department == department)
diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm
index 56306ef3e75..57f3fe31973 100644
--- a/code/modules/admin/admin_memo.dm
+++ b/code/modules/admin/admin_memo.dm
@@ -47,7 +47,7 @@
if(F)
var/ckey
if(check_rights(R_SERVER,0)) //high ranking admins can delete other admin's memos
- ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir
+ ckey = tgui_input_list(src,"Whose memo shall we remove?","Remove Memo", F.dir)
else
ckey = src.ckey
if(ckey)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 83facc08ac4..fd11766653d 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -179,7 +179,7 @@
if(istype(src.mob, /mob/new_player))
mob.name = capitalize(ckey)
else
- var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
+ var/new_key = ckeyEx(input(usr, "Enter your desired display name.", "Fake Key", key) as text|null)
if(!new_key)
return
if(length(new_key) >= 26)
@@ -240,7 +240,7 @@
var/turf/epicenter = mob.loc
var/list/choices = list("Small Bomb", "Medium Bomb", "Big Bomb", "Custom Bomb", "Cancel")
- var/choice = input("What size explosion would you like to produce?") in choices
+ var/choice = tgui_input_list(usr, "What size explosion would you like to produce?", "Explosion Choice", choices)
switch(choice)
if(null)
return 0
@@ -253,10 +253,10 @@
if("Big Bomb")
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
- var/devastation_range = input("Devastation range (in tiles):") as num
- var/heavy_impact_range = input("Heavy impact range (in tiles):") as num
- var/light_impact_range = input("Light impact range (in tiles):") as num
- var/flash_range = input("Flash range (in tiles):") as num
+ var/devastation_range = input(usr, "Devastation range (in tiles):") as num
+ var/heavy_impact_range = input(usr, "Heavy impact range (in tiles):") as num
+ var/light_impact_range = input(usr, "Light impact range (in tiles):") as num
+ var/flash_range = input(usr, "Flash range (in tiles):") as num
explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
message_admins("[ckey] creating an admin explosion at [epicenter.loc].")
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -269,14 +269,14 @@
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/severity = 1
- var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
+ var/greater = tgui_input_list(usr, "Is this a lesser, greater, or badmin disease?", "Give Disease", list("Lesser", "Greater", "Badmin"))
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
- D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
+ D.infectionchance = input(usr, "How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
@@ -304,10 +304,10 @@
var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier
- var/new_modifier_type = input("What modifier should we add to [L]?", "Modifier Type") as null|anything in possible_modifiers
+ var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers)
if(!new_modifier_type)
return
- var/duration = input("How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
+ var/duration = input(usr, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
if(duration == 0)
duration = null
else
@@ -321,7 +321,7 @@
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
- var/message = sanitize(input("What do you want the message to be?", "Make Sound") as text|null)
+ var/message = sanitize(input(usr, "What do you want the message to be?", "Make Sound") as text|null)
if(!message)
return
O.audible_message(message)
@@ -402,7 +402,7 @@
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
- var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in silicon_mob_list
+ var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Rename Silicon.", silicon_mob_list)
if(!S) return
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
@@ -417,7 +417,7 @@
if(!check_rights(R_ADMIN|R_EVENT)) return
- var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
+ var/mob/living/silicon/S = tgui_input_list(usr, "Select silicon.", "Manage Silicon Laws", silicon_mob_list)
if(!S) return
var/datum/tgui_module/law_manager/admin/L = new(S)
@@ -431,7 +431,9 @@
set category = "Admin"
if(!check_rights(R_ADMIN|R_EVENT)) return
- var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","yellow","violet","orange","blue","red","delta")-get_security_level())
+ var/sec_level = tgui_input_list(usr, "It's currently code [get_security_level()].", "Select Security Level", (list("green","yellow","violet","orange","blue","red","delta")-get_security_level()))
+ if(!sec_level)
+ return
if(tgui_alert(usr, "Switch from code [get_security_level()] to code [sec_level]?","Change security level?",list("Yes","No")) == "Yes")
set_security_level(sec_level)
log_admin("[key_name(usr)] changed the security level to code [sec_level].")
@@ -476,7 +478,7 @@
if (!jobs.len)
to_chat(usr, "There are no fully staffed jobs.")
return
- var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
+ var/job = tgui_input_list(usr, "Please select job slot to free", "Free job slot", jobs)
if (job)
job_master.FreeRole(job)
message_admins("A job slot for [job] has been opened by [key_name_admin(usr)]")
@@ -530,7 +532,7 @@
set category = "Fun"
set name = "Give Spell"
set desc = "Gives a spell to a mob."
- var/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells
+ var/spell/S = tgui_input_list(usr, "Choose the spell to give to that guy", "ABRAKADABRA", spells)
if(!S) return
T.spell_list += new S
feedback_add_details("admin_verb","GS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index 6e4a2c277d7..4a0d3c496f4 100644
--- a/code/modules/admin/callproc/callproc.dm
+++ b/code/modules/admin/callproc/callproc.dm
@@ -21,7 +21,7 @@
target = null
targetselected = 0
- var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
+ var/procname = input(usr, "Proc path, eg: /proc/fake_blood","Path:", null) as text|null
if(!procname)
return
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_DEBUG))
return
- var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
+ var/procname = input(usr, "Proc name, eg: fake_blood","Proc:", null) as text|null
if(!procname)
return
if(!hascall(A,procname))
@@ -161,7 +161,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
to_chat(usr, .)
/client/proc/get_callproc_args()
- var/argnum = input("Number of arguments","Number:",0) as num|null
+ var/argnum = input(usr, "Number of arguments","Number:",0) as num|null
if(isnull(argnum))
return null //Cancel
@@ -169,7 +169,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
//var/list/named_args = list() //Named arguments are removed, due to them making proccalling take too long.
while(argnum--)
/* //Named arguments are removed, due to them making proccalling take too long.
- var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null
+ var/named_arg = input(usr,"Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null
if(isnull(named_arg))
return null //Cancel
*/
diff --git a/code/modules/admin/ckey_vr.dm b/code/modules/admin/ckey_vr.dm
index a46a4cdc072..1ae417a1c18 100644
--- a/code/modules/admin/ckey_vr.dm
+++ b/code/modules/admin/ckey_vr.dm
@@ -10,7 +10,7 @@
var/list/keys = list()
for(var/mob/playerMob in player_list)
keys += playerMob.client
- var/client/selection = input("Please, select a player!", "Set CKey", null, null) as null|anything in sortKey(keys)
+ var/client/selection = tgui_input_list(usr, "Please, select a player!", "Set CKey", sortKey(keys))
if(!selection || !istype(selection))
return
diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm
index 0bebbc80f9e..9bb11727278 100644
--- a/code/modules/admin/create_object.dm
+++ b/code/modules/admin/create_object.dm
@@ -14,7 +14,7 @@
var/quick_create_object_html = null
var/pathtext = null
- pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") as null|anything in list("/obj",
+ var/list/choices = list("/obj",
"/obj/structure",
"/obj/item",
"/obj/item/device",
@@ -28,6 +28,8 @@
"/obj/mecha",
"/obj/item/mecha_parts",
"/obj/item/mecha_parts/mecha_equipment")
+
+ pathtext = tgui_input_list(usr, "Select the path of the object you wish to create.", "Path", choices, "/obj")
if(!pathtext)
return
diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm
index a6b3d8c6edd..f25e6024b92 100644
--- a/code/modules/admin/player_notes.dm
+++ b/code/modules/admin/player_notes.dm
@@ -1,70 +1,4 @@
-//This stuff was originally intended to be integrated into the ban-system I was working on
-//but it's safe to say that'll never be finished. So I've merged it into the current player panel.
-//enjoy ~Carn
-/*
-#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
-
-/datum/admins/proc/notes_show(var/ckey)
- usr << browse("Player Notes[notes_gethtml(ckey)]","window=player_notes;size=700x400")
-
-
-/datum/admins/proc/notes_gethtml(var/ckey)
- var/savefile/notesfile = new(NOTESFILE)
- if(!notesfile) return "Error: Cannot access [NOTESFILE]"
- if(ckey)
- . = "Notes for [ckey]: \[+\] \[-\]
"
- notesfile.cd = "/[ckey]"
- var/index = 1
- while( !notesfile.eof )
- var/note
- notesfile >> note
- . += "[note] \[-\]
"
- index++
- else
- . = "All Notes: \[+\] \[-\]
"
- notesfile.cd = "/"
- for(var/dir in notesfile.dir)
- . += "[dir]
"
- return
-
-//handles removing entries from the buffer, or removing the entire directory if no start_index is given
-/proc/notes_remove(var/ckey, var/start_index, var/end_index)
- var/savefile/notesfile = new(NOTESFILE)
- if(!notesfile) return
-
- if(!ckey)
- notesfile.cd = "/"
- ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir)
- if(!ckey) return
-
- if(start_index)
- notesfile.cd = "/[ckey]"
- var/list/noteslist = list()
- if(!end_index) end_index = start_index
- var/index = 0
- while( !notesfile.eof )
- index++
- var/temp
- notesfile >> temp
- if( (start_index <= index) && (index <= end_index) )
- continue
- noteslist += temp
-
- notesfile.eof = -2 //Move to the start of the buffer and then erase.
-
- for( var/note in noteslist )
- notesfile << note
- else
- notesfile.cd = "/"
- if(tgui_alert(usr,"Are you sure you want to remove all their notes?","Confirmation",list("No","Yes - Remove all notes")) == "Yes - Remove all notes")
- notesfile.dir.Remove(ckey)
- return
-
-#undef NOTESFILE
-*/
-
//Hijacking this file for BS12 playernotes functions. I like this ^ one systemm alright, but converting sounds too bothersome~ Chinsky.
-
/proc/notes_add(var/key, var/note, var/mob/user)
if (!key || !note)
return
diff --git a/code/modules/admin/secrets/admin_secrets/alter_narsie.dm b/code/modules/admin/secrets/admin_secrets/alter_narsie.dm
index 75281adca8f..e764d1bb95a 100644
--- a/code/modules/admin/secrets/admin_secrets/alter_narsie.dm
+++ b/code/modules/admin/secrets/admin_secrets/alter_narsie.dm
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
- var/choice = input(user, "How do you wish for Nar-Sie to interact with its surroundings?") as null|anything in list("CultStation13", "Nar-Singulo")
+ var/choice = tgui_alert(user, "How do you wish for Nar-Sie to interact with its surroundings?","NarChoice",list("CultStation13", "Nar-Singulo"))
if(choice == "CultStation13")
log_and_message_admins("has set narsie's behaviour to \"CultStation13\".", user)
narsie_behaviour = choice
diff --git a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
index e7255459bd8..8b7d4b02343 100644
--- a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
+++ b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
@@ -9,20 +9,20 @@
. = ..()
if(!.)
return
- var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
+ var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to jump?", "Shuttle Choice", SSshuttles.shuttles)
if (!shuttle_tag) return
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
- var/origin_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
+ var/origin_area = tgui_input_list(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!origin_area) return
- var/destination_area = input(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
+ var/destination_area = tgui_input_list(user, "Which area is the shuttle at now? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!destination_area) return
var/long_jump = tgui_alert(user, "Is there a transition area for this jump?","Transition?", list("Yes","No"))
if (long_jump == "Yes")
- var/transition_area = input(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)") as null|area in world
+ var/transition_area = tgui_input_list(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", return_areas())
if (!transition_area) return
var/move_duration = input(user, "How many seconds will this jump take?") as num
diff --git a/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm b/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm
index fd47ffa81d5..c4fcc3ac200 100644
--- a/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm
+++ b/code/modules/admin/secrets/admin_secrets/launch_shuttle.dm
@@ -14,7 +14,7 @@
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
valid_shuttles += shuttle_tag
- var/shuttle_tag = input(user, "Which shuttle do you want to launch?") as null|anything in valid_shuttles
+ var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to launch?", "Shuttle Choice", valid_shuttles)
if (!shuttle_tag)
return
diff --git a/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm b/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm
index b32bf4fc580..3c62428c099 100644
--- a/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm
+++ b/code/modules/admin/secrets/admin_secrets/launch_shuttle_forced.dm
@@ -14,7 +14,7 @@
if (istype(SSshuttles.shuttles[shuttle_tag], /datum/shuttle/autodock))
valid_shuttles += shuttle_tag
- var/shuttle_tag = input(user, "Which shuttle's launch do you want to force?") as null|anything in valid_shuttles
+ var/shuttle_tag = tgui_input_list(user, "Which shuttle's launch do you want to force?", "Shuttle Choice", valid_shuttles)
if (!shuttle_tag)
return
diff --git a/code/modules/admin/secrets/admin_secrets/move_shuttle.dm b/code/modules/admin/secrets/admin_secrets/move_shuttle.dm
index 3375185fad5..7cad935ca3c 100644
--- a/code/modules/admin/secrets/admin_secrets/move_shuttle.dm
+++ b/code/modules/admin/secrets/admin_secrets/move_shuttle.dm
@@ -13,12 +13,12 @@
if (confirm == "Cancel")
return
- var/shuttle_tag = input(user, "Which shuttle do you want to jump?") as null|anything in SSshuttles.shuttles
+ var/shuttle_tag = tgui_input_list(user, "Which shuttle do you want to jump?", "Shuttle Choice", SSshuttles.shuttles)
if (!shuttle_tag) return
var/datum/shuttle/S = SSshuttles.shuttles[shuttle_tag]
- var/destination_tag = input(user, "Which landmark do you want to jump to? (IF YOU GET THIS WRONG THINGS WILL BREAK)") as null|anything in SSshuttles.registered_shuttle_landmarks
+ var/destination_tag = tgui_input_list(user, "Which landmark do you want to jump to? (IF YOU GET THIS WRONG THINGS WILL BREAK)", "Landmark Choice", SSshuttles.registered_shuttle_landmarks)
if (!destination_tag) return
var/destination_location = SSshuttles.get_landmark(destination_tag)
if (!destination_location) return
diff --git a/code/modules/admin/secrets/final_solutions/summon_narsie.dm b/code/modules/admin/secrets/final_solutions/summon_narsie.dm
index 8062f767526..0a382d71d7c 100644
--- a/code/modules/admin/secrets/final_solutions/summon_narsie.dm
+++ b/code/modules/admin/secrets/final_solutions/summon_narsie.dm
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
- var/choice = input(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.") in list("PRAISE SATAN", "Cancel")
+ var/choice = tgui_alert(user, "You sure you want to end the round and summon Nar-Sie at your location? Misuse of this could result in removal of flags or hilarity.","WARNING!",list("PRAISE SATAN", "Cancel"))
if(choice == "PRAISE SATAN")
new /obj/singularity/narsie/large(get_turf(user))
log_and_message_admins("has summoned Nar-Sie and brought about a new realm of suffering.", user)
diff --git a/code/modules/admin/secrets/final_solutions/supermatter_cascade.dm b/code/modules/admin/secrets/final_solutions/supermatter_cascade.dm
index a50596985c1..ca7f0598d59 100644
--- a/code/modules/admin/secrets/final_solutions/supermatter_cascade.dm
+++ b/code/modules/admin/secrets/final_solutions/supermatter_cascade.dm
@@ -5,7 +5,7 @@
. = ..()
if(!.)
return
- var/choice = input(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.") in list("NO TIME TO EXPLAIN", "Cancel")
+ var/choice = tgui_alert(user, "You sure you want to destroy the universe and create a large explosion at your location? Misuse of this could result in removal of flags or hilarity.","WARNING!", list("NO TIME TO EXPLAIN", "Cancel"))
if(choice == "NO TIME TO EXPLAIN")
explosion(get_turf(user), 8, 16, 24, 32, 1)
new /turf/unsimulated/wall/supermatter(get_turf(user))
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 7537a73bec7..85a6dc05def 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -141,9 +141,9 @@
else if(task == "rank")
var/new_rank
if(admin_ranks.len)
- new_rank = input("Please select a rank", "New rank", null, null) as null|anything in (admin_ranks|"*New Rank*")
+ new_rank = tgui_input_list(usr, "Please select a rank", "New rank", (admin_ranks|"*New Rank*"))
else
- new_rank = input("Please select a rank", "New rank", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*")
+ new_rank = tgui_input_list(usr, "Please select a rank", "New rank", list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*"))
var/rights = 0
if(D)
@@ -151,7 +151,7 @@
switch(new_rank)
if(null,"") return
if("*New Rank*")
- new_rank = input("Please input a new rank", "New custom rank", null, null) as null|text
+ new_rank = input(usr, "Please input a new rank", "New custom rank", null, null) as null|text
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
@@ -187,7 +187,7 @@
var/list/permissionlist = list()
for(var/i=1, i<=R_MAXPERMISSION, i<<=1) //that <<= is shorthand for i = i << 1. Which is a left bitshift
permissionlist[rights2text(i)] = i
- var/new_permission = input("Select a permission to turn on/off", "Permission toggle", null, null) as null|anything in permissionlist
+ var/new_permission = tgui_input_list(usr, "Select a permission to turn on/off", "Permission toggle", permissionlist)
if(!new_permission) return
D.rights ^= permissionlist[new_permission]
@@ -232,7 +232,7 @@
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
- var/new_time_left = input("Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
+ var/new_time_left = input(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
emergency_shuttle.launch_time = world.time + new_time_left*10
@@ -240,7 +240,7 @@
message_admins("[key_name_admin(usr)] edited the Emergency Shuttle's launch time to [new_time_left*10]", 1)
else if (emergency_shuttle.shuttle.has_arrive_time())
- var/new_time_left = input("Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
+ var/new_time_left = input(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
emergency_shuttle.shuttle.arrive_time = world.time + new_time_left*10
log_admin("[key_name(usr)] edited the Emergency Shuttle's arrival time to [new_time_left]")
@@ -819,7 +819,7 @@
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
- var/reason = sanitize(input("Please enter reason.") as null|message)
+ var/reason = sanitize(input(usr, "Please enter reason.") as null|message)
if(!reason)
return
@@ -1018,7 +1018,7 @@
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob")
- var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
+ var/speech = input(usr, "What will [key_name(M)] say?.", "Force speech", "") // Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
M.say(speech)
speech = sanitize(speech) // Nah, we don't trust them
@@ -1739,7 +1739,7 @@
var/list/available_channels = list()
for(var/datum/feed_channel/F in news_network.network_channels)
available_channels += F.channel_name
- src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
+ src.admincaster_feed_channel.channel_name = sanitizeSafe(tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels ))
src.access_news_network()
else if(href_list["ac_set_new_title"])
@@ -1947,7 +1947,7 @@
if(href_list["add_player_info"])
var/key = href_list["add_player_info"]
- var/add = sanitize(input("Add Player Info") as null|text)
+ var/add = sanitize(input(usr, "Add Player Info") as null|text)
if(!add) return
notes_add(key,add,usr)
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index e03bf8496b1..8b62db269fa 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -567,7 +567,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
var/browse_to
- switch(input("Display which ticket list?") as null|anything in list("Active Tickets", "Closed Tickets", "Resolved Tickets"))
+ switch(tgui_input_list(usr, "Display which ticket list?", "List Choice", list("Active Tickets", "Closed Tickets", "Resolved Tickets")))
if("Active Tickets")
browse_to = AHELP_ACTIVE
if("Closed Tickets")
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 89505776b20..88317c337c7 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -193,13 +193,13 @@
if(config.allow_admin_jump)
if(isnull(tx))
- tx = input("Select X coordinate", "Move Atom", null, null) as null|num
+ tx = input(usr, "Select X coordinate", "Move Atom", null, null) as null|num
if(!tx) return
if(isnull(ty))
- ty = input("Select Y coordinate", "Move Atom", null, null) as null|num
+ ty = input(usr, "Select Y coordinate", "Move Atom", null, null) as null|num
if(!ty) return
if(isnull(tz))
- tz = input("Select Z coordinate", "Move Atom", null, null) as null|num
+ tz = input(usr, "Select Z coordinate", "Move Atom", null, null) as null|num
if(!tz) return
var/turf/T = locate(tx, ty, tz)
if(!T)
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 0e86bec3cdb..a25fac29e92 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -31,7 +31,7 @@
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
else
targets["(No Mob) - [T]"] = T
- var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
+ var/target = tgui_input_list(src,"To whom shall we send a message?","Admin PM", sortList(targets))
if(!target) //Admin canceled
return
cmd_admin_pm(targets[target],null)
diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
index 5c40b847c9c..5e9c63949b6 100644
--- a/code/modules/admin/verbs/buildmode.dm
+++ b/code/modules/admin/verbs/buildmode.dm
@@ -260,7 +260,7 @@
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return 1
- var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
+ var/thetype = tgui_input_list(usr,"Select variable type:", "Type", list("text","number","mob-reference","obj-reference","turf-reference"))
if(!thetype) return 1
switch(thetype)
if("text")
@@ -268,11 +268,11 @@
if("number")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
if("mob-reference")
- master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list
+ master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", mob_list)
if("obj-reference")
- master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
+ master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
if("turf-reference")
- master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
+ master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", world)
if(BUILDMODE_ROOM)
var/choice = tgui_alert(usr, "Would you like to change the floor or wall holders?","Room Builder", list("Floor", "Wall"))
@@ -286,15 +286,15 @@
var/choice = tgui_alert(usr, "Change the new light range, power, or color?", "Light Maker", list("Range", "Power", "Color"))
switch(choice)
if("Range")
- var/input = input("New light range.","Light Maker",3) as null|num
+ var/input = input(usr, "New light range.","Light Maker",3) as null|num
if(input)
new_light_range = input
if("Power")
- var/input = input("New light power.","Light Maker",3) as null|num
+ var/input = input(usr, "New light power.","Light Maker",3) as null|num
if(input)
new_light_intensity = input
if("Color")
- var/input = input("New light color.","Light Maker",3) as null|color
+ var/input = input(usr, "New light color.","Light Maker",3) as null|color
if(input)
new_light_color = input
return 1
@@ -625,7 +625,7 @@
return
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
- var/desired_path = input("Enter full or partial typepath.","Typepath","[default_path]")
+ var/desired_path = input(usr, "Enter full or partial typepath.","Typepath","[default_path]")
var/list/types = typesof(/atom)
var/list/matches = list()
@@ -643,7 +643,7 @@
if(matches.len==1)
result = matches[1]
else
- result = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
+ result = tgui_input_list(usr, "Select an atom type", "Spawn Atom", matches)
if(!objholder)
result = default_path
return result
diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm
index 80f02645a6e..717a8ce5bd7 100644
--- a/code/modules/admin/verbs/change_appearance.dm
+++ b/code/modules/admin/verbs/change_appearance.dm
@@ -5,7 +5,7 @@
if(!check_rights(R_FUN)) return
- var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list
+ var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Admin", human_mob_list)
if(!H) return
log_and_message_admins("is altering the appearance of [H].")
@@ -19,7 +19,7 @@
if(!check_rights(R_FUN)) return
- var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Self") as null|anything in human_mob_list
+ var/mob/living/carbon/human/H = tgui_input_list(usr, "Select mob.", "Change Mob Appearance - Self", human_mob_list)
if(!H) return
if(!H.client)
@@ -41,7 +41,7 @@
if(!check_rights(R_FUN)) return
- var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
+ var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list)
if(!istype(M, /mob/living/carbon/human))
to_chat(usr, "You can only do this to humans!")
@@ -49,44 +49,44 @@
switch(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")))
if("No")
return
- var/new_facial = input("Please select facial hair color.", "Character Generation") as color
+ var/new_facial = input(usr, "Please select facial hair color.", "Character Generation") as color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
M.g_facial = hex2num(copytext(new_facial, 4, 6))
M.b_facial = hex2num(copytext(new_facial, 6, 8))
- var/new_hair = input("Please select hair color.", "Character Generation") as color
+ var/new_hair = input(usr, "Please select hair color.", "Character Generation") as color
if(new_facial)
M.r_hair = hex2num(copytext(new_hair, 2, 4))
M.g_hair = hex2num(copytext(new_hair, 4, 6))
M.b_hair = hex2num(copytext(new_hair, 6, 8))
- var/new_eyes = input("Please select eye color.", "Character Generation") as color
+ var/new_eyes = input(usr, "Please select eye color.", "Character Generation") as color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
M.update_eyes()
- var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
+ var/new_skin = input(usr, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color
if(new_skin)
M.r_skin = hex2num(copytext(new_skin, 2, 4))
M.g_skin = hex2num(copytext(new_skin, 4, 6))
M.b_skin = hex2num(copytext(new_skin, 6, 8))
- var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
+ var/new_tone = input(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
// hair
- var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
+ var/new_hstyle = tgui_input_list(usr, "Select a hair style", "Grooming", hair_styles_list)
if(new_hstyle)
M.h_style = new_hstyle
// facial hair
- var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
+ var/new_fstyle = tgui_input_list(usr, "Select a facial hair style", "Grooming", facial_hair_styles_list)
if(new_fstyle)
M.f_style = new_fstyle
diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm
index 3b1d6691cfa..51f0364843a 100644
--- a/code/modules/admin/verbs/cinematic.dm
+++ b/code/modules/admin/verbs/cinematic.dm
@@ -16,9 +16,9 @@
var/override
switch(parameter)
if(1)
- override = input(src,"mode = ?","Enter Parameter",null) as anything in list("mercenary","no override")
+ override = tgui_input_list(src,"mode = ?","Enter Parameter", list("mercenary","no override"))
if(0)
- override = input(src,"mode = ?","Enter Parameter",null) as anything in list("blob","mercenary","AI malfunction","no override")
+ override = tgui_input_list(src,"mode = ?","Enter Parameter", list("blob","mercenary","AI malfunction","no override"))
ticker.station_explosion_cinematic(parameter,override)
log_admin("[key_name(src)] launched cinematic \"[cinematic]\"")
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 84ee56c7f22..8b7aa490875 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -138,11 +138,11 @@
for(var/mob/C in 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 = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", available)
if(!choice)
return 0
if(!istype(choice, /mob/observer/dead))
- var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
+ var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("No", "Yes"))
if(confirm != "Yes")
return 0
var/obj/item/device/paicard/card = new(T)
@@ -181,7 +181,7 @@
// to prevent REALLY stupid deletions
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
- var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
+ var/hsbitem = tgui_input_list(usr, "Choose an object to delete.", "Delete:", typesof(/obj) + typesof(/mob) - blocked)
if(hsbitem)
for(var/atom/O in world)
if(istype(O, hsbitem))
@@ -432,7 +432,7 @@
var/mob/living/carbon/human/H = target
- var/decl/hierarchy/outfit/outfit = input("Select outfit.", "Select equipment.") as null|anything in outfits()
+ var/decl/hierarchy/outfit/outfit = tgui_input_list(usr, "Select outfit.", "Select equipment.", outfits())
if(!outfit)
return
@@ -580,7 +580,7 @@
set name = "Debug Mob Lists"
set desc = "For when you just gotta know"
- switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
+ switch(tgui_input_list(usr, "Which list?", "List Choice", list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")))
if("Players")
to_chat(usr, span("filter_debuglogs", jointext(player_list,",")))
if("Admins")
@@ -637,9 +637,9 @@
if(!check_rights(R_DEBUG))
return
- var/datum/planet/planet = input(usr, "Which planet do you want to modify the weather on?", "Change Weather") in SSplanets.planets
+ var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)
if(istype(planet))
- var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types
+ var/datum/weather/new_weather = tgui_input_list(usr, "What weather do you want to change to?", "Change Weather", planet.weather_holder.allowed_weather_types)
if(new_weather)
planet.weather_holder.change_weather(new_weather)
planet.weather_holder.rebuild_forecast()
@@ -655,7 +655,7 @@
if(!check_rights(R_DEBUG))
return
- var/datum/planet/planet = input(usr, "Which planet do you want to modify time on?", "Change Time") in SSplanets.planets
+ var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets)
if(istype(planet))
var/datum/time/current_time_datum = planet.current_time
var/new_hour = input(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh"))) as null|num
diff --git a/code/modules/admin/verbs/debug_vr.dm b/code/modules/admin/verbs/debug_vr.dm
index 30e48dd81e0..d1f6e8fbd73 100644
--- a/code/modules/admin/verbs/debug_vr.dm
+++ b/code/modules/admin/verbs/debug_vr.dm
@@ -8,7 +8,7 @@
if(!check_rights(R_ADMIN))
return
- var/mob/living/carbon/human/H = input("Pick a mob with a player","Quick NIF") as null|anything in player_list
+ var/mob/living/carbon/human/H = tgui_input_list(usr, "Pick a mob with a player","Quick NIF", player_list)
if(!H)
return
@@ -39,7 +39,7 @@
var/list/show_NIFs = sortList(NIFs) // the list that will be shown to the user to pick from
- input_NIF = input("Pick the NIF type","Quick NIF") in show_NIFs
+ input_NIF = tgui_input_list(usr, "Pick the NIF type","Quick NIF", show_NIFs)
var/chosen_NIF = NIFs[capitalize(input_NIF)]
if(chosen_NIF)
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index ca4261525dc..b70a0919804 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -177,7 +177,7 @@
set desc = "This searches all the active jobban entries for the current round and outputs the results to standard output."
set category = "Debug"
- var/job_filter = input("Contains what?","Job Filter") as text|null
+ var/job_filter = input(usr, "Contains what?","Job Filter") as text|null
if(!job_filter)
return
diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm
index 6a773388c0d..2aa6f91a667 100644
--- a/code/modules/admin/verbs/dice.dm
+++ b/code/modules/admin/verbs/dice.dm
@@ -4,8 +4,8 @@
if(!check_rights(R_FUN))
return
- var/sum = input("How many times should we throw?") as num
- var/side = input("Select the number of sides.") as num
+ var/sum = input(usr, "How many times should we throw?") as num
+ var/side = input(usr, "Select the number of sides.") as num
if(!side)
side = 6
if(!sum)
diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm
index d577cf94464..4b357a704d9 100644
--- a/code/modules/admin/verbs/fps.dm
+++ b/code/modules/admin/verbs/fps.dm
@@ -8,7 +8,7 @@
if(!check_rights(R_DEBUG))
return
- var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
+ var/new_fps = round(input(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
if(new_fps <= 0)
to_chat(src, "Error: set_server_fps(): Invalid world.fps value. No changes made.")
return
diff --git a/code/modules/admin/verbs/getlogs.dm b/code/modules/admin/verbs/getlogs.dm
index 2dcbc6e4a7c..723d59b5772 100644
--- a/code/modules/admin/verbs/getlogs.dm
+++ b/code/modules/admin/verbs/getlogs.dm
@@ -27,7 +27,7 @@
to_chat(src, "Only Admins may use this command.")
return
- var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
+ var/client/target = tgui_input_list(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions", GLOB.clients)
if(!istype(target,/client))
to_chat(src, "Error: giveruntimelog(): Client not found.")
return
diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm
index 650b0ff9707..17e612f30e3 100644
--- a/code/modules/admin/verbs/map_template_loadverb.dm
+++ b/code/modules/admin/verbs/map_template_loadverb.dm
@@ -5,12 +5,12 @@
var/datum/map_template/template
- var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates
+ var/map = tgui_input_list(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template", SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
- var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
+ var/orientation = text2dir(tgui_input_list(usr, "Choose an orientation for this Map Template.", "Orientation", list("North", "South", "East", "West")))
if(!orientation)
return
@@ -43,12 +43,12 @@
var/datum/map_template/template
- var/map = input(usr, "Choose a Map Template to place on a new Z-level.","Place Map Template") as null|anything in SSmapping.map_templates
+ var/map = tgui_input_list(usr, "Choose a Map Template to place on a new Z-level.","Place Map Template", SSmapping.map_templates)
if(!map)
return
template = SSmapping.map_templates[map]
- var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
+ var/orientation = text2dir(tgui_input_list(usr, "Choose an orientation for this Map Template.", "Orientation", list("North", "South", "East", "West")))
if(!orientation)
return
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 79fa64d5930..66d1e6c74e6 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -279,13 +279,13 @@ var/list/debug_verbs = list (
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
- var/level = input("Which z-level?","Level?") as text
+ var/level = input(usr, "Which z-level?","Level?") as text
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
- var/type_text = input("Which type path?","Path?") as text
+ var/type_text = input(usr, "Which type path?","Path?") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
@@ -323,7 +323,7 @@ var/list/debug_verbs = list (
set category = "Mapping"
set name = "Count Objects All"
- var/type_text = input("Which type path?","") as text
+ var/type_text = input(usr, "Which type path?","") as text
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 93e66bbbbce..51893afa452 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -41,7 +41,7 @@ var/list/sounds_cache = list()
sounds += "--CANCEL--"
sounds += sounds_cache
- var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
+ var/melody = tgui_input_list(usr, "Select a sound from the server to play", "Server sound list", sounds, "--CANCEL--")
if(melody == "--CANCEL--") return
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 8ddad6025b9..79391fc29df 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -84,7 +84,7 @@
if (!holder)
return
- var/msg = sanitize(input("Message:", text("Subtle PM to [M.key]")) as text)
+ var/msg = sanitize(input(usr, "Message:", text("Subtle PM to [M.key]")) as text)
if (!msg)
return
@@ -106,7 +106,7 @@
if (!holder)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
+ var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
@@ -125,12 +125,12 @@
return
if(!M)
- M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
+ M = tgui_input_list(usr, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
if(!M)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
+ var/msg = input(usr, "Message:", text("Enter the text you wish to appear to your target:")) as text
if(msg && !(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
@@ -270,7 +270,7 @@ Ccomp's first proc.
if(!holder)
return
- var/target = input("Select a ckey to allow to rejoin", "Allow Respawn Selector") as null|anything in GLOB.respawn_timers
+ var/target = tgui_input_list(usr, "Select a ckey to allow to rejoin", "Allow Respawn Selector", GLOB.respawn_timers)
if(!target)
return
@@ -376,7 +376,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
- var/client/picked_client = input(src, "Please specify which client's character to spawn.", "Client", "") as null|anything in GLOB.clients
+ var/client/picked_client = tgui_input_list(src, "Please specify which client's character to spawn.", "Client", GLOB.clients)
if(!picked_client)
return
@@ -431,7 +431,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Well you're not reloading their job or they never had one.
if(!charjob)
- var/pickjob = input(src,"Pick a job to assign them (or none).","Job Select","-No Job-") as null|anything in joblist + "-No Job-"
+ var/pickjob = tgui_input_list(src,"Pick a job to assign them (or none).","Job Select", joblist + "-No Job-", "-No Job-")
if(!pickjob)
return
if(pickjob != "-No Job-")
@@ -658,13 +658,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
- var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
+ var/devastation = input(usr, "Range of total devastation. -1 to none", text("Input")) as num|null
if(devastation == null) return
- var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
+ var/heavy = input(usr, "Range of heavy impact. -1 to none", text("Input")) as num|null
if(heavy == null) return
- var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
+ var/light = input(usr, "Range of light impact. -1 to none", text("Input")) as num|null
if(light == null) return
- var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
+ var/flash = input(usr, "Range of flash. -1 to none", text("Input")) as num|null
if(flash == null) return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
@@ -686,13 +686,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_DEBUG|R_FUN)) return //VOREStation Edit
- var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
+ var/heavy = input(usr, "Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
- var/med = input("Range of medium pulse.", text("Input")) as num|null
+ var/med = input(usr, "Range of medium pulse.", text("Input")) as num|null
if(med == null) return
- var/light = input("Range of light pulse.", text("Input")) as num|null
+ var/light = input(usr, "Range of light pulse.", text("Input")) as num|null
if(light == null) return
- var/long = input("Range of long pulse.", text("Input")) as num|null
+ var/long = input(usr, "Range of long pulse.", text("Input")) as num|null
if(long == null) return
if (heavy || med || light || long)
@@ -757,7 +757,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/list/keys = list()
for(var/mob/M in player_list)
keys += M.client
- var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
+ var/selection = tgui_input_list(usr, "Please, select a player!", "Admin Jumping", keys)
if(!selection)
return
M = selection:mob
@@ -860,7 +860,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/view = src.view
if(view == world.view)
- view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
+ view = tgui_input_list(usr, "Select view range:", "FUCK YE", 7, list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
else
view = world.view
mob.set_viewsize(view)
@@ -884,13 +884,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/choice
if(ticker.mode.auto_recall_shuttle)
- choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
+ choice = tgui_input_list(usr, "The shuttle will just return if you call it. Call anyway?", list("Confirm", "Cancel"))
if(choice == "Confirm")
emergency_shuttle.auto_recall = 1 //enable auto-recall
else
return
- choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
+ choice = tgui_input_list(usr, "Is this an emergency evacuation or a crew transfer?", list("Emergency", "Crew Transfer"))
if (choice == "Emergency")
emergency_shuttle.call_evac()
else
@@ -1029,7 +1029,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
feedback_add_details("admin_verb","ACRYO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(ishuman(M))
- var/obj/machinery/cryopod/CP = human_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in human_cryopods]
+ var/choice = tgui_input_list(usr,"Select a cryopod to use","Cryopod Choice", human_cryopods)
+ var/obj/machinery/cryopod/CP = human_cryopods[choice]
if(!CP)
return
M.ghostize()
@@ -1044,7 +1045,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
ai.clear_client()
return
else
- var/obj/machinery/cryopod/robot/CP = robot_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in robot_cryopods]
+ var/choice = tgui_input_list(usr,"Select a cryopod to use","Cryopod Choice", robot_cryopods)
+ var/obj/machinery/cryopod/robot/CP = robot_cryopods[choice]
if(!CP)
return
M.ghostize()
diff --git a/code/modules/admin/verbs/randomverbs_vr.dm b/code/modules/admin/verbs/randomverbs_vr.dm
index 63200f12fb8..e60c5182486 100644
--- a/code/modules/admin/verbs/randomverbs_vr.dm
+++ b/code/modules/admin/verbs/randomverbs_vr.dm
@@ -6,7 +6,7 @@
if(!holder)
return
- var/client/picked_client = input(src, "Who are we spawning as a mob?", "Client", "Cancel") as null|anything in GLOB.clients
+ var/client/picked_client = tgui_input_list(src, "Who are we spawning as a mob?", "Client", GLOB.clients)
if(!picked_client)
return
var/list/types = typesof(/mob/living)
@@ -23,7 +23,7 @@
if(matches.len==1)
chosen = matches[1]
else
- chosen = input("Select a mob type", "Select Mob", matches[1]) as null|anything in matches
+ chosen = tgui_input_list(usr, "Select a mob type", "Select Mob", matches)
if(!chosen)
return
@@ -81,7 +81,7 @@
if (!holder)
return
- var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
+ var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
if(!(msg[1] == "<" && msg[length(msg)] == ">")) //You can use HTML but only if the whole thing is HTML. Tries to prevent admin 'accidents'.
msg = sanitize(msg)
diff --git a/code/modules/admin/verbs/smite.dm b/code/modules/admin/verbs/smite.dm
index 1fd5120f55f..78fd832f112 100644
--- a/code/modules/admin/verbs/smite.dm
+++ b/code/modules/admin/verbs/smite.dm
@@ -10,7 +10,7 @@
var/list/smite_types = list(SMITE_BREAKLEGS,SMITE_BLUESPACEARTILLERY,SMITE_SPONTANEOUSCOMBUSTION,SMITE_LIGHTNINGBOLT)
- var/smite_choice = input("Select the type of SMITE for [target]","SMITE Type Choice") as null|anything in smite_types
+ var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types)
if(!smite_choice)
return
diff --git a/code/modules/admin/verbs/smite_vr.dm b/code/modules/admin/verbs/smite_vr.dm
index db56f532d26..51e44119064 100644
--- a/code/modules/admin/verbs/smite_vr.dm
+++ b/code/modules/admin/verbs/smite_vr.dm
@@ -10,7 +10,7 @@
var/list/smite_types = list(SMITE_SHADEKIN_ATTACK,SMITE_SHADEKIN_NOMF,SMITE_REDSPACE_ABDUCT,SMITE_AUTOSAVE,SMITE_AUTOSAVE_WIDE)
- var/smite_choice = input("Select the type of SMITE for [target]","SMITE Type Choice") as null|anything in smite_types
+ var/smite_choice = tgui_input_list(usr, "Select the type of SMITE for [target]","SMITE Type Choice", smite_types)
if(!smite_choice)
return
@@ -70,7 +70,7 @@
"Orange Eyes (Light)" = /mob/living/simple_mob/shadekin/orange/white,
"Orange Eyes (Brown)" = /mob/living/simple_mob/shadekin/orange/brown,
"Rivyr (Unique)" = /mob/living/simple_mob/shadekin/blue/rivyr)
- var/kin_type = input("Select the type of shadekin for [target] nomf","Shadekin Type Choice") as null|anything in kin_types
+ var/kin_type = tgui_input_list(usr, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types)
if(!kin_type || !target)
return
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 1b63c998d89..1a27de10c4f 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -20,7 +20,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
var/datum/antagonist/deathsquad/team
- var/choice = input(usr, "Select type of strike team:") as null|anything in list("Heavy Asset Protection", "Mercenaries")
+ var/choice = tgui_input_list(usr, "Select type of strike team:", list("Heavy Asset Protection", "Mercenaries"))
if(!choice)
return
diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm
index eb2d1bf4db5..64920cdc9e9 100644
--- a/code/modules/admin/view_variables/get_variables.dm
+++ b/code/modules/admin/view_variables/get_variables.dm
@@ -78,26 +78,26 @@
if (extra_classes)
classes += extra_classes
- .["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes
+ .["class"] = tgui_input_list(src, "What kind of data?", "Variable Type", classes, default_class)
if (holder && holder.marked_datum && .["class"] == "[VV_MARKED_DATUM] ([holder.marked_datum.type])")
.["class"] = VV_MARKED_DATUM
switch(.["class"])
if (VV_TEXT)
- .["value"] = input("Enter new text:", "Text", current_value) as null|text
+ .["value"] = input(usr, "Enter new text:", "Text", current_value) as null|text
if (.["value"] == null)
.["class"] = null
return
if (VV_MESSAGE)
- .["value"] = input("Enter new text:", "Text", current_value) as null|message
+ .["value"] = input(usr, "Enter new text:", "Text", current_value) as null|message
if (.["value"] == null)
.["class"] = null
return
if (VV_NUM)
- .["value"] = input("Enter new number:", "Num", current_value) as null|num
+ .["value"] = input(usr, "Enter new number:", "Num", current_value) as null|num
if (.["value"] == null)
.["class"] = null
return
@@ -124,7 +124,7 @@
var/type = current_value
var/error = ""
do
- type = input("Enter type:[error]", "Type", type) as null|text
+ type = input(usr, "Enter type:[error]", "Type", type) as null|text
if (!type)
break
type = text2path(type)
@@ -143,7 +143,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -156,7 +156,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -169,7 +169,7 @@
.["class"] = null
return
var/list/things = vv_reference_list(type, subtypes)
- var/value = input("Select reference:", "Reference", current_value) as null|anything in things
+ var/value = tgui_input_list(usr, "Select reference:", "Reference", things, current_value)
if (!value)
.["class"] = null
return
@@ -178,21 +178,21 @@
if (VV_CLIENT)
- .["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
+ .["value"] = tgui_input_list(usr, "Select reference:", "Reference", GLOB.clients, current_value)
if (.["value"] == null)
.["class"] = null
return
if (VV_FILE)
- .["value"] = input("Pick file:", "File") as null|file
+ .["value"] = input(usr, "Pick file:", "File") as null|file
if (.["value"] == null)
.["class"] = null
return
if (VV_ICON)
- .["value"] = input("Pick icon:", "Icon") as null|icon
+ .["value"] = input(usr, "Pick icon:", "Icon") as null|icon
if (.["value"] == null)
.["class"] = null
return
@@ -229,7 +229,7 @@
var/type = current_value
var/error = ""
do
- type = input("Enter type:[error]", "Type", type) as null|text
+ type = input(usr, "Enter type:[error]", "Type", type) as null|text
if (!type)
break
type = text2path(type)
diff --git a/code/modules/admin/view_variables/mass_edit_variables.dm b/code/modules/admin/view_variables/mass_edit_variables.dm
index a20eccf994c..adec98ef661 100644
--- a/code/modules/admin/view_variables/mass_edit_variables.dm
+++ b/code/modules/admin/view_variables/mass_edit_variables.dm
@@ -28,7 +28,7 @@
names = sortList(names)
- variable = input("Which var?", "Var") as null|anything in names
+ variable = tgui_input_list(usr, "Which var?", "Var", names)
else
variable = var_name
diff --git a/code/modules/admin/view_variables/modify_variables.dm b/code/modules/admin/view_variables/modify_variables.dm
index 6500c45b006..b270fc1bc8f 100644
--- a/code/modules/admin/view_variables/modify_variables.dm
+++ b/code/modules/admin/view_variables/modify_variables.dm
@@ -133,7 +133,7 @@ GLOBAL_PROTECT(VVpixelmovement)
value = "null"
names["#[i] [key] = [value]"] = i
if (!index)
- var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)"
+ var/variable = tgui_input_list(usr, "Which var?","Var", names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)")
if(variable == null)
return
@@ -309,7 +309,7 @@ GLOBAL_PROTECT(VVpixelmovement)
names = sortList(names)
- variable = input("Which var?","Var") as null|anything in names
+ variable = tgui_input_list(usr, "Which var?","Var", names)
if(!variable)
return
diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm
index 28f7fde397a..ddab5464e64 100644
--- a/code/modules/admin/view_variables/topic.dm
+++ b/code/modules/admin/view_variables/topic.dm
@@ -291,7 +291,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
- var/new_species = input("Please choose a new species.","Species",null) as null|anything in GLOB.all_species
+ var/new_species = tgui_input_list(usr, "Please choose a new species.","Species", GLOB.all_species)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
@@ -310,7 +310,7 @@
to_chat(usr, "This can only be done to instances of type /mob")
return
- var/new_language = input("Please choose a language to add.","Language",null) as null|anything in GLOB.all_languages
+ var/new_language = tgui_input_list(usr, "Please choose a language to add.","Language", GLOB.all_languages)
if(!new_language)
return
@@ -336,7 +336,7 @@
to_chat(usr, "This mob knows no languages.")
return
- var/datum/language/rem_language = input("Please choose a language to remove.","Language",null) as null|anything in H.languages
+ var/datum/language/rem_language = tgui_input_list(usr, "Please choose a language to remove.","Language", H.languages)
if(!rem_language)
return
@@ -372,7 +372,7 @@
possibleverbs -= H.verbs
possibleverbs += "Cancel" // ...And one for the bottom
- var/verb = input("Select a verb!", "Verbs",null) as anything in possibleverbs
+ var/verb = tgui_input_list(usr, "Select a verb!", "Verbs", possibleverbs)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -389,7 +389,7 @@
if(!istype(H))
to_chat(usr, "This can only be done to instances of type /mob")
return
- var/verb = input("Please choose a verb to remove.","Verbs",null) as null|anything in H.verbs
+ var/verb = tgui_input_list(usr, "Please choose a verb to remove.","Verbs", H.verbs)
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
@@ -406,7 +406,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
- var/new_organ = input("Please choose an organ to add.","Organ",null) as null|anything in typesof(/obj/item/organ)-/obj/item/organ
+ var/new_organ = tgui_input_list(usr, "Please choose an organ to add.","Organ", subtypesof(/obj/item/organ))
if(!new_organ) return
if(!M)
@@ -428,7 +428,7 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon")
return
- var/obj/item/organ/rem_organ = input("Please choose an organ to remove.","Organ",null) as null|anything in M.internal_organs
+ var/obj/item/organ/rem_organ = tgui_input_list(usr, "Please choose an organ to remove.","Organ", M.internal_organs)
if(!M)
to_chat(usr, "Mob doesn't exist anymore")
@@ -475,7 +475,7 @@
var/Text = href_list["adjustDamage"]
- var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
+ var/amount = input(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
to_chat(usr, "Mob doesn't exist anymore")
diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm
index 7358a7790fc..edd55a4c040 100644
--- a/code/modules/ai/ai_holder.dm
+++ b/code/modules/ai/ai_holder.dm
@@ -185,7 +185,7 @@
choices["[typechoice] ([found.len])"] = found // Prettified name for the user input below)
searching = found // Now we only search the list we just made, because of the order of our types list, each subsequent list will be a subset of the one we just finished
- var/choice = input(usr,"Based on your AI holder's mob location, we'll edit mobs on Z [levels_working.Join(",")]. What types do you want to alter?") as null|anything in choices
+ var/choice = tgui_input_list(usr,"Based on your AI holder's mob location, we'll edit mobs on Z [levels_working.Join(",")]. What types do you want to alter?", "Types", choices)
if(!choice)
href_list["datumrefresh"] = "\ref[src]"
return
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 4ae19fab51d..437da934673 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -214,7 +214,7 @@
if(tmr.timing)
to_chat(usr, "Clock is ticking already.")
else
- var/ntime = input("Enter desired time in seconds", "Time", "5") as num
+ var/ntime = input(usr, "Enter desired time in seconds", "Time", "5") as num
if (ntime>0 && ntime<1000)
tmr.time = ntime
name = initial(name) + "([tmr.time] secs)"
diff --git a/code/modules/awaymissions/bluespaceartillery.dm b/code/modules/awaymissions/bluespaceartillery.dm
index 505f4ceb4c8..331e96efa43 100644
--- a/code/modules/awaymissions/bluespaceartillery.dm
+++ b/code/modules/awaymissions/bluespaceartillery.dm
@@ -36,8 +36,7 @@
if (usr.stat || usr.restrained())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- var/A
- A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
+ var/A = tgui_input_list(usr, "Area to jump bombard", "Open Fire", teleportlocs)
var/area/thearea = teleportlocs[A]
if (usr.stat || usr.restrained()) return
if(src.reload < 180) return
@@ -50,16 +49,3 @@
var/loc = pick(L)
explosion(loc,2,5,11)
reload = 0
-
-/*mob/proc/openfire()
- var/A
- A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
- var/area/thearea = teleportlocs[A]
- command_alert("Bluespace artillery fire detected. Brace for impact.")
- spawn(30)
- var/list/L = list()
-
- for(var/turf/T in get_area_turfs(thearea.type))
- L+=T
- var/loc = pick(L)
- explosion(loc,2,5,11)*/
\ No newline at end of file
diff --git a/code/modules/client/preference_setup/antagonism/01_basic.dm b/code/modules/client/preference_setup/antagonism/01_basic.dm
index e0a60b63135..100595aaba7 100644
--- a/code/modules/client/preference_setup/antagonism/01_basic.dm
+++ b/code/modules/client/preference_setup/antagonism/01_basic.dm
@@ -50,7 +50,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None")
return TOPIC_REFRESH
if(href_list["antagfaction"])
- var/choice = input(user, "Please choose an antagonistic faction to work for.", "Character Preference", pref.antag_faction) as null|anything in antag_faction_choices + list("None","Other")
+ var/choice = tgui_input_list(user, "Please choose an antagonistic faction to work for.", "Character Preference", antag_faction_choices + list("None","Other"), pref.antag_faction)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
if(choice == "Other")
@@ -62,7 +62,7 @@ var/global/list/uplink_locations = list("PDA", "Headset", "None")
return TOPIC_REFRESH
if(href_list["antagvis"])
- var/choice = input(user, "Please choose an antagonistic visibility level.", "Character Preference", pref.antag_vis) as null|anything in antag_visiblity_choices
+ var/choice = tgui_input_list(user, "Please choose an antagonistic visibility level.", "Character Preference", antag_visiblity_choices, pref.antag_vis)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
else
diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm
index ace9c8d6a9b..8219b073003 100644
--- a/code/modules/client/preference_setup/general/01_basic.dm
+++ b/code/modules/client/preference_setup/general/01_basic.dm
@@ -111,13 +111,13 @@
return TOPIC_NOACTION
else if(href_list["bio_gender"])
- var/new_gender = input(user, "Choose your character's biological sex:", "Character Preference", pref.biological_gender) as null|anything in get_genders()
+ var/new_gender = tgui_input_list(user, "Choose your character's biological sex:", "Character Preference", get_genders(), pref.biological_gender)
if(new_gender && CanUseTopic(user))
pref.set_biological_gender(new_gender)
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["id_gender"])
- var/new_gender = input(user, "Choose your character's pronouns:", "Character Preference", pref.identifying_gender) as null|anything in all_genders_define_list
+ var/new_gender = tgui_input_list(user, "Choose your character's pronouns:", "Character Preference", all_genders_define_list, pref.identifying_gender)
if(new_gender && CanUseTopic(user))
pref.identifying_gender = new_gender
return TOPIC_REFRESH
@@ -134,7 +134,7 @@
var/list/spawnkeys = list()
for(var/spawntype in spawntypes)
spawnkeys += spawntype
- var/choice = input(user, "Where would you like to spawn when late-joining?") as null|anything in spawnkeys
+ var/choice = tgui_input_list(user, "Where would you like to spawn when late-joining?", "Late-Join Choice", spawnkeys)
if(!choice || !spawntypes[choice] || !CanUseTopic(user)) return TOPIC_NOACTION
pref.spawnpoint = choice
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/general/02_language.dm b/code/modules/client/preference_setup/general/02_language.dm
index cea16c01f0d..0f1f8e9bacd 100644
--- a/code/modules/client/preference_setup/general/02_language.dm
+++ b/code/modules/client/preference_setup/general/02_language.dm
@@ -78,7 +78,7 @@
if(!available_languages.len)
tgui_alert_async(user, "There are no additional languages available to select.")
else
- var/new_lang = input(user, "Select an additional language", "Character Generation", null) as null|anything in available_languages
+ var/new_lang = tgui_input_list(user, "Select an additional language", "Character Generation", available_languages)
if(new_lang && pref.alternate_languages.len < S.num_alternate_languages)
pref.alternate_languages |= new_lang
return TOPIC_REFRESH
@@ -87,7 +87,7 @@
var/char
var/keys[0]
do
- char = input("Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text
+ char = input(usr, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text
if(char)
if(length(char) > 1)
tgui_alert_async(user, "Only single characters allowed.", "Error")
diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm
index fef6ae0bb4b..13128f55c75 100644
--- a/code/modules/client/preference_setup/general/03_body.dm
+++ b/code/modules/client/preference_setup/general/03_body.dm
@@ -620,20 +620,20 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/desc_id = href_list["change_descriptor"]
if(pref.body_descriptors[desc_id])
var/datum/mob_descriptor/descriptor = mob_species.descriptors[desc_id]
- var/choice = input("Please select a descriptor.", "Descriptor") as null|anything in descriptor.chargen_value_descriptors
+ var/choice = tgui_input_list(usr, "Please select a descriptor.", "Descriptor", descriptor.chargen_value_descriptors)
if(choice && mob_species.descriptors[desc_id]) // Check in case they sneakily changed species.
pref.body_descriptors[desc_id] = descriptor.chargen_value_descriptors[choice]
return TOPIC_REFRESH
else if(href_list["blood_type"])
- var/new_b_type = input(user, "Choose your character's blood-type:", "Character Preference") as null|anything in valid_bloodtypes
+ var/new_b_type = tgui_input_list(user, "Choose your character's blood-type:", "Character Preference", valid_bloodtypes)
if(new_b_type && CanUseTopic(user))
pref.b_type = new_b_type
return TOPIC_REFRESH
else if(href_list["show_species"])
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
- var/choice = input("Which species would you like to look at?") as null|anything in GLOB.playable_species
+ var/choice = tgui_input_list(usr, "Which species would you like to look at?", "Species Choice", GLOB.playable_species)
if(!choice) return
pref.species_preview = choice
SetSpecies(preference_mob())
@@ -719,7 +719,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["hair_style"])
var/list/valid_hairstyles = pref.get_valid_hairstyles()
- var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference", pref.h_style) as null|anything in valid_hairstyles
+ var/new_h_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", valid_hairstyles, pref.h_style)
if(new_h_style && CanUseTopic(user))
pref.h_style = new_h_style
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -727,7 +727,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["grad_style"])
var/list/valid_gradients = GLOB.hair_gradients
- var/new_grad_style = input(user, "Choose a color pattern for your hair:", "Character Preference", pref.grad_style) as null|anything in valid_gradients
+ var/new_grad_style = tgui_input_list(user, "Choose a color pattern for your hair:", "Character Preference", valid_gradients, pref.grad_style)
if(new_grad_style && CanUseTopic(user))
pref.grad_style = new_grad_style
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -795,7 +795,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["facial_style"])
var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
- var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference", pref.f_style) as null|anything in valid_facialhairstyles
+ var/new_f_style = tgui_input_list(user, "Choose your character's facial-hair style:", "Character Preference", valid_facialhairstyles, pref.f_style)
if(new_f_style && has_flag(mob_species, HAS_HAIR_COLOR) && CanUseTopic(user))
pref.f_style = new_f_style
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -832,7 +832,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(!(pref.species in S.species_allowed))
usable_markings -= M
*/ //VOREStation Removal End
- var/new_marking = input(user, "Choose a body marking:", "Character Preference") as null|anything in usable_markings
+ var/new_marking = tgui_input_list(user, "Choose a body marking:", "Character Preference", usable_markings)
if(new_marking && CanUseTopic(user))
pref.body_markings[new_marking] = "#000000" //New markings start black
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -862,7 +862,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
if(start != 1)
move_locs -= pref.body_markings[start-1]
- var/inject_after = input(user, "Move [M] ahead of...", "Character Preference") as null|anything in move_locs //Move ahead of any marking that isn't the current or previous one.
+ var/inject_after = tgui_input_list(user, "Move [M] ahead of...", "Character Preference", move_locs) //Move ahead of any marking that isn't the current or previous one.
var/newpos = pref.body_markings.Find(inject_after)
if(newpos)
moveElement(pref.body_markings, start, newpos+1)
@@ -895,7 +895,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(pref.organ_data[BP_TORSO] == "cyborg")
limb_selection_list |= "Head"
- var/organ_tag = input(user, "Which limb do you want to change?") as null|anything in limb_selection_list
+ var/organ_tag = tgui_input_list(user, "Which limb do you want to change?", "Limb Choice", limb_selection_list)
if(!organ_tag || !CanUseTopic(user)) return TOPIC_NOACTION
@@ -939,7 +939,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
third_limb = BP_GROIN
choice_options = list("Normal","Prosthesis")
- var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in choice_options
+ var/new_state = tgui_input_list(user, "What state do you wish the limb to be in?", "State Choice", choice_options)
if(!new_state || !CanUseTopic(user)) return TOPIC_NOACTION
switch(new_state)
@@ -982,7 +982,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
usable_manufacturers[company] = M
if(!usable_manufacturers.len)
return
- var/choice = input(user, "Which manufacturer do you wish to use for this limb?") as null|anything in usable_manufacturers
+ var/choice = tgui_input_list(user, "Which manufacturer do you wish to use for this limb?", "Manufacturer Choice", usable_manufacturers)
if(!choice)
return
@@ -1010,7 +1010,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["organs"])
- var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes","Larynx", "Lungs", "Liver", "Kidneys", "Spleen", "Intestines", "Stomach", "Brain")
+ var/organ_name = tgui_input_list(user, "Which internal function do you want to change?", "Internal Organ", list("Heart", "Eyes", "Larynx", "Lungs", "Liver", "Kidneys", "Spleen", "Intestines", "Stomach", "Brain"))
if(!organ_name) return
var/organ = null
@@ -1056,7 +1056,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
organ_choices += "Assisted"
organ_choices += "Mechanical"
- var/new_state = input(user, "What state do you wish the organ to be in?") as null|anything in organ_choices
+ var/new_state = tgui_input_list(user, "What state do you wish the organ to be in?", "State Choice", organ_choices)
if(!new_state) return
switch(new_state)
@@ -1105,7 +1105,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["ear_style"])
- var/new_ear_style = input(user, "Select an ear style for this character:", "Character Preference", pref.ear_style) as null|anything in pref.get_available_styles(global.ear_styles_list)
+ var/new_ear_style = tgui_input_list(user, "Select an ear style for this character:", "Character Preference", pref.get_available_styles(global.ear_styles_list), pref.ear_style)
if(new_ear_style)
pref.ear_style = new_ear_style
@@ -1139,7 +1139,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["tail_style"])
- var/new_tail_style = input(user, "Select a tail style for this character:", "Character Preference", pref.tail_style) as null|anything in pref.get_available_styles(global.tail_styles_list)
+ var/new_tail_style = tgui_input_list(user, "Select a tail style for this character:", "Character Preference", pref.get_available_styles(global.tail_styles_list), pref.tail_style)
if(new_tail_style)
pref.tail_style = new_tail_style
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -1172,7 +1172,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["wing_style"])
- var/new_wing_style = input(user, "Select a wing style for this character:", "Character Preference", pref.wing_style) as null|anything in pref.get_available_styles(global.wing_styles_list)
+ var/new_wing_style = tgui_input_list(user, "Select a wing style for this character:", "Character Preference", pref.get_available_styles(global.wing_styles_list), pref.wing_style)
if(new_wing_style)
pref.wing_style = new_wing_style
diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm
index c5a940e8689..f1bf1c8c3f6 100644
--- a/code/modules/client/preference_setup/general/04_equipment.dm
+++ b/code/modules/client/preference_setup/general/04_equipment.dm
@@ -111,13 +111,13 @@
/datum/category_item/player_setup_item/general/equipment/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["change_backpack"])
- var/new_backbag = input(user, "Choose your character's style of bag:", "Character Preference", backbaglist[pref.backbag]) as null|anything in backbaglist
+ var/new_backbag = tgui_input_list(user, "Choose your character's style of bag:", "Character Preference", backbaglist, backbaglist[pref.backbag])
if(!isnull(new_backbag) && CanUseTopic(user))
pref.backbag = backbaglist.Find(new_backbag)
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["change_pda"])
- var/new_pdachoice = input(user, "Choose your character's style of PDA:", "Character Preference", pdachoicelist[pref.pdachoice]) as null|anything in pdachoicelist
+ var/new_pdachoice = tgui_input_list(user, "Choose your character's style of PDA:", "Character Preference", pdachoicelist, pdachoicelist[pref.pdachoice])
if(!isnull(new_pdachoice) && CanUseTopic(user))
pref.pdachoice = pdachoicelist.Find(new_pdachoice)
return TOPIC_REFRESH
@@ -126,7 +126,7 @@
var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
if(!UWC)
return
- var/datum/category_item/underwear/selected_underwear = input(user, "Choose underwear:", "Character Preference", pref.all_underwear[UWC.name]) as null|anything in UWC.items
+ var/datum/category_item/underwear/selected_underwear = tgui_input_list(user, "Choose underwear:", "Character Preference", UWC.items, pref.all_underwear[UWC.name])
if(selected_underwear && CanUseTopic(user))
pref.all_underwear[UWC.name] = selected_underwear.name
return TOPIC_REFRESH_UPDATE_PREVIEW
diff --git a/code/modules/client/preference_setup/general/05_background.dm b/code/modules/client/preference_setup/general/05_background.dm
index 079cedca93a..50d1b362df6 100644
--- a/code/modules/client/preference_setup/general/05_background.dm
+++ b/code/modules/client/preference_setup/general/05_background.dm
@@ -61,13 +61,13 @@
/datum/category_item/player_setup_item/general/background/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["econ_status"])
- var/new_class = input(user, "Choose your economic status. This will affect the amount of money you will start with.", "Character Preference", pref.economic_status) as null|anything in ECONOMIC_CLASS
+ var/new_class = tgui_input_list(user, "Choose your economic status. This will affect the amount of money you will start with.", "Character Preference", ECONOMIC_CLASS, pref.economic_status)
if(new_class && CanUseTopic(user))
pref.economic_status = new_class
return TOPIC_REFRESH
else if(href_list["home_system"])
- var/choice = input(user, "Please choose a home system.", "Character Preference", pref.home_system) as null|anything in home_system_choices + list("Unset","Other")
+ var/choice = tgui_input_list(user, "Please choose a home system.", "Character Preference", home_system_choices + list("Unset","Other"), pref.home_system)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
if(choice == "Other")
@@ -79,7 +79,7 @@
return TOPIC_REFRESH
else if(href_list["citizenship"])
- var/choice = input(user, "Please choose your current citizenship.", "Character Preference", pref.citizenship) as null|anything in citizenship_choices + list("None","Other")
+ var/choice = tgui_input_list(user, "Please choose your current citizenship.", "Character Preference", citizenship_choices + list("None","Other"), pref.citizenship)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
if(choice == "Other")
@@ -91,7 +91,7 @@
return TOPIC_REFRESH
else if(href_list["faction"])
- var/choice = input(user, "Please choose a faction to work for.", "Character Preference", pref.faction) as null|anything in faction_choices + list("None","Other")
+ var/choice = tgui_input_list(user, "Please choose a faction to work for.", "Character Preference", faction_choices + list("None","Other"), pref.faction)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
if(choice == "Other")
@@ -103,7 +103,7 @@
return TOPIC_REFRESH
else if(href_list["religion"])
- var/choice = input(user, "Please choose a religion.", "Character Preference", pref.religion) as null|anything in religion_choices + list("None","Other")
+ var/choice = tgui_input_list(user, "Please choose a religion.", "Character Preference", religion_choices + list("None","Other"), pref.religion)
if(!choice || !CanUseTopic(user))
return TOPIC_NOACTION
if(choice == "Other")
diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm
index 3f5e0b3344b..6bdcdccf5c5 100644
--- a/code/modules/client/preference_setup/global/01_ui.dm
+++ b/code/modules/client/preference_setup/global/01_ui.dm
@@ -58,7 +58,7 @@
/datum/category_item/player_setup_item/player_global/ui/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["select_style"])
- var/UI_style_new = input(user, "Choose UI style.", "Character Preference", pref.UI_style) as null|anything in all_ui_styles
+ var/UI_style_new = tgui_input_list(user, "Choose UI style.", "Character Preference", all_ui_styles, pref.UI_style)
if(!UI_style_new || !CanUseTopic(user)) return TOPIC_NOACTION
pref.UI_style = UI_style_new
return TOPIC_REFRESH
@@ -82,7 +82,7 @@
return TOPIC_REFRESH
else if(href_list["select_tooltip_style"])
- var/tooltip_style_new = input(user, "Choose tooltip style.", "Global Preference", pref.tooltipstyle) as null|anything in all_tooltip_styles
+ var/tooltip_style_new = tgui_input_list(user, "Choose tooltip style.", "Global Preference", all_tooltip_styles, pref.tooltipstyle)
if(!tooltip_style_new || !CanUseTopic(user)) return TOPIC_NOACTION
pref.tooltipstyle = tooltip_style_new
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm
index 0c26ba6ae5e..90e378fbb03 100644
--- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm
+++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm
@@ -34,7 +34,7 @@
/datum/gear_tweak/color/get_metadata(var/user, var/metadata, var/title = "Character Preference")
if(valid_colors)
- return input(user, "Choose a color.", title, metadata) as null|anything in valid_colors
+ return tgui_input_list(user, "Choose a color.", title, valid_colors, metadata)
return input(user, "Choose a color.", title, metadata) as color|null
/datum/gear_tweak/color/tweak_item(var/obj/item/I, var/metadata)
@@ -60,7 +60,7 @@
return valid_paths[1]
/datum/gear_tweak/path/get_metadata(var/user, var/metadata)
- return input(user, "Choose a type.", "Character Preference", metadata) as null|anything in valid_paths
+ return tgui_input_list(user, "Choose a type.", "Character Preference", valid_paths, metadata)
/datum/gear_tweak/path/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
if(!(metadata in valid_paths))
@@ -91,7 +91,7 @@
for(var/i = metadata.len to valid_contents.len)
metadata += "Random"
for(var/i = 1 to valid_contents.len)
- var/entry = input(user, "Choose an entry.", "Character Preference", metadata[i]) as null|anything in (valid_contents[i] + list("Random", "None"))
+ var/entry = tgui_input_list(user, "Choose an entry.", "Character Preference", valid_contents[i] + list("Random", "None"), metadata[i])
if(entry)
. += entry
else
@@ -130,7 +130,7 @@
return "Random"
/datum/gear_tweak/reagents/get_metadata(var/user, var/list/metadata)
- . = input(user, "Choose an entry.", "Character Preference", metadata) as null|anything in (valid_reagents + list("Random", "None"))
+ . = tgui_input_list(user, "Choose an entry.", "Character Preference", valid_reagents + list("Random", "None"), metadata)
if(!.)
return metadata
@@ -171,7 +171,7 @@ var/datum/gear_tweak/custom_name/gear_tweak_free_name = new()
to_chat(user, SPAN_WARNING("You are banned from using custom loadout names/descriptions."))
return
if(valid_custom_names)
- return input(user, "Choose an item name.", "Character Preference", metadata) as null|anything in valid_custom_names
+ return tgui_input_list(user, "Choose an item name.", "Character Preference", valid_custom_names, metadata)
return sanitize(input(user, "Choose the item's name. Leave it blank to use the default name.", "Item Name", metadata) as text|null, MAX_LNAME_LEN, extra = 0)
/datum/gear_tweak/custom_name/tweak_item(var/obj/item/I, var/metadata)
@@ -202,7 +202,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
to_chat(user, SPAN_WARNING("You are banned from using custom loadout names/descriptions."))
return
if(valid_custom_desc)
- return input(user, "Choose an item description.", "Character Preference", metadata) as null|anything in valid_custom_desc
+ return tgui_input_list(user, "Choose an item description.", "Character Preference",valid_custom_desc, metadata)
return sanitize(input(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata) as message|null, extra = 0)
/datum/gear_tweak/custom_desc/tweak_item(var/obj/item/I, var/metadata)
@@ -258,7 +258,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- var/entry = input(user, "Choose a processor.", "Character Preference") in names
+ var/entry = tgui_input_list(user, "Choose a processor:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -270,7 +270,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a battery.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a battery:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -282,7 +282,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a hard drive.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a hard drive:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -294,7 +294,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a network card.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a network card:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -306,7 +306,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a nanoprinter.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a nanoprinter:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -318,7 +318,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a card slot.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a card slot:", "Tablet Gear", names)
. += names[entry]
names = list()
@@ -330,7 +330,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a tesla link.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a tesla link:", "Tablet Gear", names)
. += names[entry]
/datum/gear_tweak/tablet/get_default()
@@ -407,7 +407,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- var/entry = input(user, "Choose a processor.", "Character Preference") in names
+ var/entry = tgui_input_list(user, "Choose a processor:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -419,7 +419,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a battery.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a battery:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -431,7 +431,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a hard drive.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a hard drive:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -443,7 +443,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a network card.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a network card:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -455,7 +455,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a nanoprinter.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a nanoprinter:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -467,7 +467,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a card slot.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a card slot:", "Laptop Gear", names)
. += names[entry]
names = list()
@@ -479,7 +479,7 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
else
names["None"] = counter++
- entry = input(user, "Choose a tesla link.", "Character Preference") in names
+ entry = tgui_input_list(user, "Choose a tesla link:", "Laptop Gear", names)
. += names[entry]
/datum/gear_tweak/laptop/get_default()
@@ -549,6 +549,6 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
return "Location: [metadata]"
/datum/gear_tweak/implant_location/get_metadata(var/user, var/metadata)
- return (input(user, "Select a bodypart for the implant to be implanted inside.", "Implant Location", metadata || "upper body") as null|anything in bodypart_names_to_tokens) || bodypart_tokens_to_names[BP_TORSO]
+ return (tgui_input_list(user, "Select a bodypart for the implant to be implanted inside.", "Implant Location", bodypart_names_to_tokens || bodypart_tokens_to_names[BP_TORSO]))
#undef LOADOUT_BAN_STRING
\ No newline at end of file
diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm
index f18b4f649ab..116bd1a9ad8 100644
--- a/code/modules/client/preference_setup/occupation/occupation.dm
+++ b/code/modules/client/preference_setup/occupation/occupation.dm
@@ -233,7 +233,7 @@
var/datum/job/job = locate(href_list["select_alt_title"])
if (job)
var/choices = list(job.title) + job.alt_titles
- var/choice = input("Choose a title for [job.title].", "Choose Title", pref.GetPlayerAltTitle(job)) as anything in choices|null
+ var/choice = tgui_input_list(usr, "Choose a title for [job.title].", "Choose Title", choices, pref.GetPlayerAltTitle(job))
if(choice && CanUseTopic(user))
SetPlayerAltTitle(job, choice)
return (pref.equip_preview_mob ? TOPIC_REFRESH_UPDATE_PREVIEW : TOPIC_REFRESH)
diff --git a/code/modules/client/preference_setup/skills/skills.dm b/code/modules/client/preference_setup/skills/skills.dm
index ab5a6c17e10..00fb15ec902 100644
--- a/code/modules/client/preference_setup/skills/skills.dm
+++ b/code/modules/client/preference_setup/skills/skills.dm
@@ -68,7 +68,7 @@
return TOPIC_REFRESH
else if(href_list["preconfigured"])
- var/selected = input(user, "Select a skillset", "Skillset") as null|anything in SKILL_PRE
+ var/selected = tgui_input_list(user, "Select a skillset", "Skillset", SKILL_PRE)
if(!selected || !CanUseTopic(user)) return
pref.ZeroSkills(1)
diff --git a/code/modules/client/preference_setup/volume_sliders/01_volume.dm b/code/modules/client/preference_setup/volume_sliders/01_volume.dm
index 349d88318a1..90c0b227c08 100644
--- a/code/modules/client/preference_setup/volume_sliders/01_volume.dm
+++ b/code/modules/client/preference_setup/volume_sliders/01_volume.dm
@@ -40,7 +40,7 @@
var/channel = href_list["change_volume"]
if(!(channel in pref.volume_channels))
pref.volume_channels["[channel]"] = 1
- var/value = input("Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100))
+ var/value = input(usr, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100))
if(isnum(value))
value = CLAMP(value, 0, 200)
pref.volume_channels["[channel]"] = (value / 100)
diff --git a/code/modules/client/preference_setup/volume_sliders/02_media.dm b/code/modules/client/preference_setup/volume_sliders/02_media.dm
index 97e42324a01..3fbb972ad2c 100644
--- a/code/modules/client/preference_setup/volume_sliders/02_media.dm
+++ b/code/modules/client/preference_setup/volume_sliders/02_media.dm
@@ -33,7 +33,7 @@
/datum/category_item/player_setup_item/volume_sliders/media/OnTopic(var/href, var/list/href_list, var/mob/user)
if(href_list["change_media_volume"])
if(CanUseTopic(user))
- var/value = input("Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100))
+ var/value = input(usr, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100))
if(isnum(value))
value = CLAMP(value, 0, 100)
pref.media_volume = value/100.0
diff --git a/code/modules/client/preference_setup/vore/03_egg.dm b/code/modules/client/preference_setup/vore/03_egg.dm
index 6c090478d5e..49efcdf798d 100644
--- a/code/modules/client/preference_setup/vore/03_egg.dm
+++ b/code/modules/client/preference_setup/vore/03_egg.dm
@@ -29,7 +29,7 @@
else if(href_list["vore_egg_type"])
var/list/vore_egg_types = global_vore_egg_types
- var/selection = input(user, "Choose your character's egg type:", "Character Preference", pref.vore_egg_type) as null|anything in vore_egg_types
+ var/selection = tgui_input_list(user, "Choose your character's egg type:", "Character Preference", vore_egg_types, pref.vore_egg_type)
if(selection)
pref.vore_egg_type = selection
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/vore/06_vantag.dm b/code/modules/client/preference_setup/vore/06_vantag.dm
index c65c379bf23..c402f1f2771 100644
--- a/code/modules/client/preference_setup/vore/06_vantag.dm
+++ b/code/modules/client/preference_setup/vore/06_vantag.dm
@@ -40,7 +40,7 @@
for(var/C in vantag_choices_list)
names_list[vantag_choices_list[C]] = C
- var/selection = input(user, "How do you want to be involved with VS Event Characters, ERP-wise? They will see this choice on you in a HUD. Event characters are admin-selected and spawned players, possibly with assigned objectives, who are obligated to respect ERP prefs and RP their actions like any other player, though it may be a slightly shorter RP if they are pressed for time or being caught.", "Event Preference") as null|anything in names_list
+ var/selection = tgui_input_list(user, "How do you want to be involved with VS Event Characters, ERP-wise? They will see this choice on you in a HUD. Event characters are admin-selected and spawned players, possibly with assigned objectives, who are obligated to respect ERP prefs and RP their actions like any other player, though it may be a slightly shorter RP if they are pressed for time or being caught.", "Event Preference", names_list)
if(selection && selection != "Normal")
pref.vantag_preference = names_list[selection]
diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm
index 1a6f22ddbf2..5027b82afee 100644
--- a/code/modules/client/preference_setup/vore/07_traits.dm
+++ b/code/modules/client/preference_setup/vore/07_traits.dm
@@ -196,13 +196,13 @@
var/list/choices = GLOB.custom_species_bases
if(pref.species != SPECIES_CUSTOM)
choices = (choices | pref.species)
- var/text_choice = input("Pick an icon set for your species:","Icon Base") in choices
+ var/text_choice = tgui_input_list(usr, "Pick an icon set for your species:","Icon Base", choices)
if(text_choice in choices)
pref.custom_base = text_choice
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["blood_color"])
- var/color_choice = input("Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color
+ var/color_choice = input(usr, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color
if(color_choice)
pref.blood_color = sanitize_hexcolor(color_choice, default="#A10808")
return TOPIC_REFRESH
@@ -295,18 +295,27 @@
var/traits_left = pref.max_traits - (pref.pos_traits.len + pref.neg_traits.len)
+ var/message = "Select a trait to learn more."
+ if(mode != NEUTRAL_MODE)
+ message = "\[Remaining: [points_left] points, [traits_left] traits\]\n" + message
+ var/title = "Traits"
+ switch(mode)
+ if(POSITIVE_MODE)
+ title = "Positive Traits"
+ if(NEUTRAL_MODE)
+ title = "Neutral Traits"
+ if(NEGATIVE_MODE)
+ title = "Negative Traits"
+
var/trait_choice
var/done = FALSE
while(!done)
- var/message = "\[Remaining: [points_left] points, [traits_left] traits\] Select a trait to read the description and see the cost."
- trait_choice = input(message,"Trait List") as null|anything in nicelist
+ trait_choice = tgui_input_list(usr, message, title, nicelist)
if(!trait_choice)
done = TRUE
if(trait_choice in nicelist)
var/datum/trait/path = nicelist[trait_choice]
- var/choice = tgui_alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name),"Take Trait",list("Cancel","Go Back"))
- if(choice == "Cancel")
- trait_choice = null
+ var/choice = tgui_alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name), list("Take Trait","Go Back"))
if(choice != "Go Back")
done = TRUE
@@ -319,21 +328,21 @@
var/conflict = FALSE
if(pref.dirty_synth && !(instance.can_take & SYNTHETICS))
- tgui_alert_async(usr, "The trait you've selected can only be taken by organic characters!","Error")
+ tgui_alert_async(usr, "The trait you've selected can only be taken by organic characters!", "Error")
pref.dirty_synth = 0 //Just to be sure
return TOPIC_REFRESH
if(pref.gross_meatbag && !(instance.can_take & ORGANICS))
- tgui_alert_async(usr, "The trait you've selected can only be taken by synthetic characters!","Error")
+ tgui_alert_async(usr, "The trait you've selected can only be taken by synthetic characters!", "Error")
pref.gross_meatbag = 0 //Just to be sure
return TOPIC_REFRESH
if(pref.species in instance.banned_species)
- tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error")
+ tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
return TOPIC_REFRESH
- if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species)) //Adding white list handling -shark
- tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!","Error")
+ if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species))
+ tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
return TOPIC_REFRESH
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
diff --git a/code/modules/client/preference_setup/vore/09_misc.dm b/code/modules/client/preference_setup/vore/09_misc.dm
index 7018d9342d2..60a207bcc83 100644
--- a/code/modules/client/preference_setup/vore/09_misc.dm
+++ b/code/modules/client/preference_setup/vore/09_misc.dm
@@ -40,13 +40,13 @@
pref.show_in_directory = pref.show_in_directory ? 0 : 1;
return TOPIC_REFRESH
else if(href_list["directory_tag"])
- var/new_tag = input(user, "Pick a new Vore tag for the character directory", "Character Vore Tag", pref.directory_tag) as null|anything in GLOB.char_directory_tags
+ var/new_tag = tgui_input_list(user, "Pick a new Vore tag for the character directory", "Character Vore Tag", GLOB.char_directory_tags, pref.directory_tag)
if(!new_tag)
return
pref.directory_tag = new_tag
return TOPIC_REFRESH
else if(href_list["directory_erptag"])
- var/new_erptag = input(user, "Pick a new ERP tag for the character directory", "Character ERP Tag", pref.directory_erptag) as null|anything in GLOB.char_directory_erptags
+ var/new_erptag = tgui_input_list(user, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags, pref.directory_erptag)
if(!new_erptag)
return
pref.directory_erptag = new_erptag
@@ -56,7 +56,7 @@
pref.directory_ad = msg
return TOPIC_REFRESH
else if(href_list["toggle_sensor_setting"])
- var/new_sensorpref = input(user, "Choose your character's sensor preferences:", "Character Preferences", sensorpreflist[pref.sensorpref]) as null|anything in sensorpreflist
+ var/new_sensorpref = tgui_input_list(user, "Choose your character's sensor preferences:", "Character Preferences", sensorpreflist, sensorpreflist[pref.sensorpref])
if (!isnull(new_sensorpref) && CanUseTopic(user))
pref.sensorpref = sensorpreflist.Find(new_sensorpref)
return TOPIC_REFRESH
diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm
index 0d636e85143..4b321f2f534 100644
--- a/code/modules/client/ui_style.dm
+++ b/code/modules/client/ui_style.dm
@@ -45,7 +45,7 @@ var/global/list/all_tooltip_styles = list(
to_chat(usr, "You must be a human or a robot to use this verb.")
return
- var/UI_style_new = input(usr, "Select a style. White is recommended for customization") as null|anything in all_ui_styles
+ var/UI_style_new = tgui_input_list(usr, "Select a style. White is recommended for customization", "UI Style Choice", all_ui_styles)
if(!UI_style_new) return
var/UI_style_alpha_new = input(usr, "Select a new alpha (transparency) parameter for your UI, between 50 and 255") as null|num
diff --git a/code/modules/client/verbs/character_directory.dm b/code/modules/client/verbs/character_directory.dm
index e6e1bc39110..a649657375d 100644
--- a/code/modules/client/verbs/character_directory.dm
+++ b/code/modules/client/verbs/character_directory.dm
@@ -112,13 +112,13 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
update_tgui_static_data(usr, ui)
return TRUE
if("setTag")
- var/list/new_tag = input(usr, "Pick a new Vore tag for the character directory", "Character Tag", usr?.client?.prefs?.directory_tag) as null|anything in GLOB.char_directory_tags
+ var/list/new_tag = tgui_input_list(usr, "Pick a new Vore tag for the character directory", "Character Tag", GLOB.char_directory_tags)
if(!new_tag)
return
usr?.client?.prefs?.directory_tag = new_tag
return TRUE
if("setErpTag")
- var/list/new_erptag = input(usr, "Pick a new ERP tag for the character directory", "Character ERP Tag", usr?.client?.prefs?.directory_erptag) as null|anything in GLOB.char_directory_erptags
+ var/list/new_erptag = tgui_input_list(usr, "Pick a new ERP tag for the character directory", "Character ERP Tag", GLOB.char_directory_erptags)
if(!new_erptag)
return
usr?.client?.prefs?.directory_erptag = new_erptag
diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm
index a13d0bbb9fe..7c96267fafb 100644
--- a/code/modules/client/verbs/suicide.dm
+++ b/code/modules/client/verbs/suicide.dm
@@ -156,7 +156,7 @@
set category = "pAI Commands"
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
set name = "pAI Suicide"
- var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list (list("Yes", "No"))
+ var/answer = tgui_alert(usr, "REALLY kill yourself? This action can't be undone.", "Suicide", list("Yes","No"))
if(answer == "Yes")
var/obj/item/device/paicard/card = loc
card.removePersonality()
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 8c272cac22e..37b2c3598b0 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -998,7 +998,7 @@
return 0
var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon")
- var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
+ var/switchMode = tgui_input_list(usr, "Select a sensor mode:", "Suit Sensor Mode", modes)
if(get_dist(usr, src) > 1)
to_chat(usr, "You have moved too far away.")
return
diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm
index 3cc1b9408f6..d7415c4a758 100644
--- a/code/modules/clothing/clothing_accessories.dm
+++ b/code/modules/clothing/clothing_accessories.dm
@@ -133,7 +133,7 @@
if(accessory_amount == 1)
A = accessories[1] // If there's only one accessory, just remove it without any additional prompts.
else
- A = input("Select an accessory to remove from \the [src]") as null|anything in accessories
+ A = tgui_input_list(usr, "Select an accessory to remove from \the [src]", "Accessory Choice", accessories)
if(A)
remove_accessory(usr,A)
diff --git a/code/modules/clothing/masks/monitor.dm b/code/modules/clothing/masks/monitor.dm
index be337c90677..320ea7a90e8 100644
--- a/code/modules/clothing/masks/monitor.dm
+++ b/code/modules/clothing/masks/monitor.dm
@@ -56,7 +56,7 @@
if(H.wear_mask != src)
to_chat(usr, "You have not installed \the [src] yet.")
return
- var/choice = input("Select a screen icon.") as null|anything in monitor_states
+ var/choice = tgui_input_list(usr, "Select a screen icon:", "Head Monitor Choice", monitor_states)
if(choice)
monitor_state_index = choice
update_icon()
diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm b/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm
index 0df94d756b4..fe04d123f5c 100644
--- a/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm
@@ -29,9 +29,9 @@
if(!..())
return 0
- var/choice= input("Would you like to toggle the synthesiser or set the name?") as null|anything in list("Enable","Disable","Set Name")
+ var/choice = tgui_alert(usr, "Would you like to toggle the synthesiser or set the name?","",list("Enable","Disable","Set Name","Cancel"))
- if(!choice)
+ if(!choice || choice == "Cancel")
return 0
switch(choice)
diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm
index 2362cb79904..43bcd583d23 100644
--- a/code/modules/clothing/spacesuits/rig/modules/utility.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm
@@ -322,9 +322,9 @@
if(!..())
return 0
- var/choice= input("Would you like to toggle the synthesiser or set the name?") as null|anything in list("Enable","Disable","Set Name")
+ var/choice = tgui_alert(usr, "Would you like to toggle the synthesiser or set the name?","",list("Enable","Disable","Set Name","Cancel"))
- if(!choice)
+ if(!choice || choice == "Cancel")
return 0
switch(choice)
diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
index 395484d53a1..9ce406fccf8 100644
--- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm
@@ -122,7 +122,7 @@
if(cell) current_mounts += "cell"
if(installed_modules && installed_modules.len) current_mounts += "system module"
- var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
+ var/to_remove = tgui_input_list(usr, "Which would you like to modify?", "Removal Choice", current_mounts)
if(!to_remove)
return
@@ -160,7 +160,7 @@
to_chat(user, "There are no installed modules to remove.")
return
- var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
+ var/removal_choice = tgui_input_list(usr, "Which module would you like to remove?", "Removal Choice", possible_removals)
if(!removal_choice)
return
diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm
index ea56adb1e63..c1d2fe2c5be 100644
--- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm
@@ -214,7 +214,7 @@
if(module.selectable)
selectable |= module
- var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable
+ var/obj/item/rig_module/module = tgui_input_list(usr, "Which module do you wish to select?", "Select Module", selectable)
if(!istype(module))
selected_module = null
@@ -250,7 +250,7 @@
if(module.toggleable)
selectable |= module
- var/obj/item/rig_module/module = input("Which module do you wish to toggle?") as null|anything in selectable
+ var/obj/item/rig_module/module = tgui_input_list(usr, "Which module do you wish to toggle?", "Toggle Module", selectable)
if(!istype(module))
return
@@ -288,7 +288,7 @@
if(module.usable)
selectable |= module
- var/obj/item/rig_module/module = input("Which module do you wish to engage?") as null|anything in selectable
+ var/obj/item/rig_module/module = tgui_input_list(usr, "Which module do you wish to engage?", "Engage Module", selectable)
if(!istype(module))
return
diff --git a/code/modules/clothing/spacesuits/void/ert_vr.dm b/code/modules/clothing/spacesuits/void/ert_vr.dm
index 96243290294..c771132f181 100644
--- a/code/modules/clothing/spacesuits/void/ert_vr.dm
+++ b/code/modules/clothing/spacesuits/void/ert_vr.dm
@@ -77,7 +77,7 @@
if(W.is_screwdriver())
if(boots || tank || cooler)
- var/choice = input("What component would you like to remove?") as null|anything in list(boots,tank,cooler)
+ var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(boots,tank,cooler))
if(!choice) return
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm
index 223c502a2ca..72d500579a2 100644
--- a/code/modules/clothing/spacesuits/void/void.dm
+++ b/code/modules/clothing/spacesuits/void/void.dm
@@ -245,7 +245,7 @@
if(W.is_screwdriver())
if(helmet || boots || tank)
- var/choice = input("What component would you like to remove?") as null|anything in list(helmet,boots,tank,cooler)
+ var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(helmet,boots,tank,cooler))
if(!choice) return
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
diff --git a/code/modules/clothing/spacesuits/void/void_vr.dm b/code/modules/clothing/spacesuits/void/void_vr.dm
index 4c21007a8b2..1ee289ae069 100644
--- a/code/modules/clothing/spacesuits/void/void_vr.dm
+++ b/code/modules/clothing/spacesuits/void/void_vr.dm
@@ -197,7 +197,7 @@
if(W.is_screwdriver())
if(boots || tank || cooler)
- var/choice = input("What component would you like to remove?") as null|anything in list(boots,tank,cooler)
+ var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(boots,tank,cooler))
if(!choice) return
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
diff --git a/code/modules/clothing/spacesuits/void/zaddat.dm b/code/modules/clothing/spacesuits/void/zaddat.dm
index 3162265e540..6b096aca229 100644
--- a/code/modules/clothing/spacesuits/void/zaddat.dm
+++ b/code/modules/clothing/spacesuits/void/zaddat.dm
@@ -38,7 +38,7 @@
to_chat(M, "This Shroud has already been customized!")
return 0
- suit_style = input(M, "Which suit style would you like?") in list("Engineer", "Spacer", "Knight", "Fashion", "Bishop", "Hegemony", "Rugged", "Soft")
+ suit_style = tgui_input_list(M, "Which suit style would you like?", "Suit Style", list("Engineer", "Spacer", "Knight", "Fashion", "Bishop", "Hegemony", "Rugged", "Soft"))
switch(suit_style)
if("Engineer")
name = "\improper Engineer's Guild Shroud"
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index 7dd36c06b62..b01ea3813c7 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -364,7 +364,7 @@
if(!M.mind)
return 0
- var/input = sanitizeSafe(input("Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
desc = "A beautiful friendship bracelet in all the colors of the rainbow. It's dedicated to [input]."
diff --git a/code/modules/clothing/under/accessories/accessory_vr.dm b/code/modules/clothing/under/accessories/accessory_vr.dm
index 85cce94e5fb..ed83f6284b2 100644
--- a/code/modules/clothing/under/accessories/accessory_vr.dm
+++ b/code/modules/clothing/under/accessories/accessory_vr.dm
@@ -46,9 +46,9 @@
/obj/item/clothing/accessory/choker/attack_self(mob/user as mob)
if(!customized)
- var/design = input(user,"Descriptor?","Pick descriptor","") in list("plain","simple","ornate","elegant","opulent")
- var/material = input(user,"Material?","Pick material","") in list("leather","velvet","lace","fabric","latex","plastic","metal","chain","silver","gold","platinum","steel","bead","ruby","sapphire","emerald","diamond")
- var/type = input(user,"Type?","Pick type","") in list("choker","collar","necklace")
+ var/design = tgui_input_list(user,"Descriptor?","Pick descriptor","Descriptor", list("plain","simple","ornate","elegant","opulent"))
+ var/material = tgui_input_list(user,"Material?","Pick material","Material", list("leather","velvet","lace","fabric","latex","plastic","metal","chain","silver","gold","platinum","steel","bead","ruby","sapphire","emerald","diamond"))
+ var/type = tgui_input_list(user,"Type?","Pick type","Type", list("choker","collar","necklace"))
name = "[design] [material] [type]"
desc = "A [type], made of [material]. It's rather [design]."
customized = 1
diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm
index 403993c61fa..a8edae23dee 100644
--- a/code/modules/clothing/under/miscellaneous_vr.dm
+++ b/code/modules/clothing/under/miscellaneous_vr.dm
@@ -76,7 +76,7 @@
to_chat(H,"You must be WEARING the uniform to change your size.")
return
- var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
+ var/new_size = input(usr, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
if(!new_size)
return //cancelled
diff --git a/code/modules/detectivework/tools/swabs.dm b/code/modules/detectivework/tools/swabs.dm
index f74154756b9..e9377a4d7b0 100644
--- a/code/modules/detectivework/tools/swabs.dm
+++ b/code/modules/detectivework/tools/swabs.dm
@@ -92,7 +92,7 @@
else if(choices.len == 1)
choice = choices[1]
else
- choice = input("What kind of evidence are you looking for?","Evidence Collection") as null|anything in choices
+ choice = tgui_input_list(usr, "What kind of evidence are you looking for?","Evidence Collection", choices)
if(!choice)
return
diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm
index 2b3133c2c10..f220f29e142 100644
--- a/code/modules/economy/Accounts_DB.dm
+++ b/code/modules/economy/Accounts_DB.dm
@@ -127,12 +127,12 @@
creating_new_account = 1
if("add_funds")
- var/amount = input("Enter the amount you wish to add", "Silently add funds") as num
+ var/amount = input(usr, "Enter the amount you wish to add", "Silently add funds") as num
if(detailed_account_view)
detailed_account_view.money = min(detailed_account_view.money + amount, fund_cap)
if("remove_funds")
- var/amount = input("Enter the amount you wish to remove", "Silently remove funds") as num
+ var/amount = input(usr, "Enter the amount you wish to remove", "Silently remove funds") as num
if(detailed_account_view)
detailed_account_view.money = max(detailed_account_view.money - amount, -fund_cap)
diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm
index 965b51c4ed9..1517af0cc0b 100644
--- a/code/modules/economy/EFTPOS.dm
+++ b/code/modules/economy/EFTPOS.dm
@@ -145,9 +145,9 @@
if(href_list["choice"])
switch(href_list["choice"])
if("change_code")
- var/attempt_code = input("Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
+ var/attempt_code = input(usr, "Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
if(attempt_code == access_code)
- var/trycode = input("Enter a new access code for this device (4-6 digits, numbers only)", "Enter new EFTPOS code") as num
+ var/trycode = input(usr, "Enter a new access code for this device (4-6 digits, numbers only)", "Enter new EFTPOS code") as num
if(trycode >= 1000 && trycode <= 999999)
access_code = trycode
else
@@ -156,15 +156,15 @@
else
to_chat(usr, "[bicon(src)]Incorrect code entered.")
if("change_id")
- var/attempt_code = text2num(input("Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
+ var/attempt_code = text2num(input(usr, "Re-enter the current EFTPOS access code", "Confirm EFTPOS code"))
if(attempt_code == access_code)
- eftpos_name = sanitize(input("Enter a new terminal ID for this device", "Enter new EFTPOS ID"), MAX_NAME_LEN) + " EFTPOS scanner"
+ eftpos_name = sanitize(input(usr, "Enter a new terminal ID for this device", "Enter new EFTPOS ID"), MAX_NAME_LEN) + " EFTPOS scanner"
print_reference()
else
to_chat(usr, "[bicon(src)]Incorrect code entered.")
if("link_account")
- var/attempt_account_num = input("Enter account number to pay EFTPOS charges into", "New account number") as num
- var/attempt_pin = input("Enter pin code", "Account pin") as num
+ var/attempt_account_num = input(usr, "Enter account number to pay EFTPOS charges into", "New account number") as num
+ var/attempt_pin = input(usr, "Enter pin code", "Account pin") as num
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -173,10 +173,10 @@
else
to_chat(usr, "[bicon(src)]Account not found.")
if("trans_purpose")
- var/choice = sanitize(input("Enter reason for EFTPOS transaction", "Transaction purpose"))
+ var/choice = sanitize(input(usr, "Enter reason for EFTPOS transaction", "Transaction purpose"))
if(choice) transaction_purpose = choice
if("trans_value")
- var/try_num = input("Enter amount for EFTPOS transaction", "Transaction amount") as num
+ var/try_num = input(usr, "Enter amount for EFTPOS transaction", "Transaction amount") as num
if(try_num < 0)
tgui_alert_async(usr, "That is not a valid amount!")
else
@@ -187,7 +187,7 @@
transaction_locked = 0
transaction_paid = 0
else
- var/attempt_code = input("Enter EFTPOS access code", "Reset Transaction") as num
+ var/attempt_code = input(usr, "Enter EFTPOS access code", "Reset Transaction") as num
if(attempt_code == access_code)
transaction_locked = 0
transaction_paid = 0
@@ -229,7 +229,7 @@
var/attempt_pin = ""
var/datum/money_account/D = get_account(C.associated_account_number)
if(D.security_level)
- attempt_pin = input("Enter pin code", "EFTPOS transaction") as num
+ attempt_pin = input(usr, "Enter pin code", "EFTPOS transaction") as num
D = null
D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm
index 29ccd38ebb9..ddf19d895c5 100644
--- a/code/modules/economy/cash_register.dm
+++ b/code/modules/economy/cash_register.dm
@@ -107,8 +107,8 @@
if("toggle_cash_lock")
cash_locked = !cash_locked
if("link_account")
- var/attempt_account_num = input("Enter account number", "New account number") as num
- var/attempt_pin = input("Enter PIN", "Account PIN") as num
+ var/attempt_account_num = input(usr, "Enter account number", "New account number") as num
+ var/attempt_pin = input(usr, "Enter PIN", "Account PIN") as num
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -117,11 +117,11 @@
else
to_chat(usr, "[bicon(src)]Account not found.")
if("custom_order")
- var/t_purpose = sanitize(input("Enter purpose", "New purpose") as text)
+ var/t_purpose = sanitize(input(usr, "Enter purpose", "New purpose") as text)
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
- var/t_amount = round(input("Enter price", "New price") as num)
+ var/t_amount = round(input(usr, "Enter price", "New price") as num)
if (!t_amount || !Adjacent(usr) || t_amount < 0) return
transaction_amount += t_amount
price_list += t_amount
@@ -129,7 +129,7 @@
src.visible_message("[bicon(src)][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
- var/n_amount = round(input("Enter amount", "New amount") as num)
+ var/n_amount = round(input(usr, "Enter amount", "New amount") as num)
n_amount = CLAMP(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
@@ -234,7 +234,7 @@
var/datum/money_account/D = get_account(I.associated_account_number)
var/attempt_pin = ""
if(D && D.security_level)
- attempt_pin = input("Enter PIN", "Transaction") as num
+ attempt_pin = input(usr, "Enter PIN", "Transaction") as num
D = null
D = attempt_account_access(I.associated_account_number, attempt_pin, 2)
diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm
index 8d1057ae43c..6e68b644aa7 100644
--- a/code/modules/economy/retail_scanner.dm
+++ b/code/modules/economy/retail_scanner.dm
@@ -101,8 +101,8 @@
else
to_chat(usr, "[bicon(src)]Insufficient access.")
if("link_account")
- var/attempt_account_num = input("Enter account number", "New account number") as num
- var/attempt_pin = input("Enter PIN", "Account PIN") as num
+ var/attempt_account_num = input(usr, "Enter account number", "New account number") as num
+ var/attempt_pin = input(usr, "Enter PIN", "Account PIN") as num
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -111,11 +111,11 @@
else
to_chat(usr, "[bicon(src)]Account not found.")
if("custom_order")
- var/t_purpose = sanitize(input("Enter purpose", "New purpose") as text)
+ var/t_purpose = sanitize(input(usr, "Enter purpose", "New purpose") as text)
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
- var/t_amount = round(input("Enter price", "New price") as num)
+ var/t_amount = round(input(usr, "Enter price", "New price") as num)
if (!t_amount || !Adjacent(usr)) return
transaction_amount += t_amount
price_list += t_amount
@@ -123,7 +123,7 @@
src.visible_message("[bicon(src)][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
- var/n_amount = round(input("Enter amount", "New amount") as num)
+ var/n_amount = round(input(usr, "Enter amount", "New amount") as num)
n_amount = CLAMP(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
@@ -211,7 +211,7 @@
var/datum/money_account/D = get_account(I.associated_account_number)
var/attempt_pin = ""
if(D && D.security_level)
- attempt_pin = input("Enter PIN", "Transaction") as num
+ attempt_pin = input(usr, "Enter PIN", "Transaction") as num
D = null
D = attempt_account_access(I.associated_account_number, attempt_pin, 2)
diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm
index 36adfb63921..cd9e1f4783f 100644
--- a/code/modules/economy/vending.dm
+++ b/code/modules/economy/vending.dm
@@ -266,7 +266,7 @@ GLOBAL_LIST_EMPTY(vending_products)
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/attempt_pin = input(usr, "Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm
index 5df114c8f4e..09b624058ca 100644
--- a/code/modules/events/event_container.dm
+++ b/code/modules/events/event_container.dm
@@ -116,7 +116,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
log_debug("Next event of severity [severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.")
/datum/event_container/proc/SelectEvent()
- var/datum/event_meta/EM = input("Select an event to queue up.", "Event Selection", null) as null|anything in available_events
+ var/datum/event_meta/EM = tgui_input_list(usr, "Select an event to queue up.", "Event Selection", available_events)
if(!EM)
return
if(next_event)
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index 360c6f1b7fd..ea4f8d59cde 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -156,7 +156,7 @@
config.allow_random_events = text2num(href_list["pause_all"])
log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
else if(href_list["interval"])
- var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
+ var/delay = input(usr, "Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
if(delay && delay > 0)
var/datum/event_container/EC = locate(href_list["interval"])
EC.delay_modifier = delay
@@ -173,17 +173,17 @@
else if(href_list["back"])
selected_event_container = null
else if(href_list["set_name"])
- var/name = sanitize(input("Enter event name.", "Set Name") as text|null)
+ var/name = sanitize(input(usr, "Enter event name.", "Set Name") as text|null)
if(name)
var/datum/event_meta/EM = locate(href_list["set_name"])
EM.name = name
else if(href_list["set_type"])
- var/type = input("Select event type.", "Select") as null|anything in allEvents
+ var/type = tgui_input_list(usr, "Select event type.", "Select", allEvents)
if(type)
var/datum/event_meta/EM = locate(href_list["set_type"])
EM.event_type = type
else if(href_list["set_weight"])
- var/weight = input("Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
+ var/weight = input(usr, "Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
if(weight && weight > 0)
var/datum/event_meta/EM = locate(href_list["set_weight"])
EM.weight = weight
diff --git a/code/modules/food/drinkingglass/extras.dm b/code/modules/food/drinkingglass/extras.dm
index f8bfeccdabc..eb139a92b79 100644
--- a/code/modules/food/drinkingglass/extras.dm
+++ b/code/modules/food/drinkingglass/extras.dm
@@ -34,7 +34,7 @@
to_chat(user, "There's nothing on the glass to remove!")
return
- var/choice = input(user, "What would you like to remove from the glass?") as null|anything in extras
+ var/choice = tgui_input_list(user, "What would you like to remove from the glass?", "Removal Choice", extras)
if(!choice || !(choice in extras))
return
diff --git a/code/modules/food/food/drinks/bottle.dm b/code/modules/food/food/drinks/bottle.dm
index 124240d906a..90979df1e65 100644
--- a/code/modules/food/food/drinks/bottle.dm
+++ b/code/modules/food/food/drinks/bottle.dm
@@ -87,7 +87,7 @@
if(A.density && usr.Adjacent(A) && !istype(A, /mob))
things_to_smash_on += A
- var/atom/choice = input("Select what you want to smash the bottle on.") as null|anything in things_to_smash_on
+ var/atom/choice = tgui_input_list(usr, "Select what you want to smash the bottle on.", "SMASH!", things_to_smash_on)
if(!choice)
return
if(!(choice.density && usr.Adjacent(choice)))
diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm
index d6779781b55..0e88aeb62cf 100644
--- a/code/modules/food/food/snacks.dm
+++ b/code/modules/food/food/snacks.dm
@@ -3175,7 +3175,7 @@
if( src.open )
return
- var/t = sanitize(input("Enter what you want to add to the tag:", "Write", null, null) as text, 30)
+ var/t = sanitize(input(usr, "Enter what you want to add to the tag:", "Write", null, null) as text, 30)
var/obj/item/pizzabox/boxtotagto = src
if( boxes.len > 0 )
diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm
index b2f51eacd7e..d87fbfc902b 100644
--- a/code/modules/food/kitchen/cooking_machines/_appliance.dm
+++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm
@@ -194,7 +194,7 @@
return
if(output_options.len)
- var/choice = input("What specific food do you wish to make with \the [src]?") as null|anything in output_options+"Default"
+ var/choice = tgui_input_list(usr, "What specific food do you wish to make with \the [src]?", "Food Output Choice", output_options+"Default")
if(!choice)
return
if(choice == "Default")
@@ -613,7 +613,7 @@
if (CI.container)
menuoptions[CI.container.label(menuoptions.len)] = CI
- var/selection = input(user, "Which item would you like to remove?", "Remove ingredients") as null|anything in menuoptions
+ var/selection = tgui_input_list(user, "Which item would you like to remove?", "Remove ingredients", menuoptions)
if (selection)
var/datum/cooking_item/CI = menuoptions[selection]
eject(CI, user)
diff --git a/code/modules/food/kitchen/cooking_machines/_mixer.dm b/code/modules/food/kitchen/cooking_machines/_mixer.dm
index 079b0c686c2..24b0371cfd5 100644
--- a/code/modules/food/kitchen/cooking_machines/_mixer.dm
+++ b/code/modules/food/kitchen/cooking_machines/_mixer.dm
@@ -47,7 +47,7 @@ fundamental differences
return
if(output_options.len)
- var/choice = input("What specific food do you wish to make with \the [src]?") as null|anything in output_options
+ var/choice = tgui_input_list(usr, "What specific food do you wish to make with \the [src]?", "Food Output Choice", output_options)
if(!choice)
return
else
@@ -90,7 +90,7 @@ fundamental differences
for (var/obj/item/I in CI.container)
menuoptions[I.name] = I
- var/selection = input(user, "Which item would you like to remove? If you want to remove chemicals, use an empty beaker.", "Remove ingredients") as null|anything in menuoptions
+ var/selection = tgui_input_list(user, "Which item would you like to remove? If you want to remove chemicals, use an empty beaker.", "Remove ingredients", menuoptions)
if (selection)
var/obj/item/I = menuoptions[selection]
if (!user || !user.put_in_hands(I))
diff --git a/code/modules/food/kitchen/cooking_machines/grill.dm b/code/modules/food/kitchen/cooking_machines/grill.dm
index d43598449d6..a00397619f9 100644
--- a/code/modules/food/kitchen/cooking_machines/grill.dm
+++ b/code/modules/food/kitchen/cooking_machines/grill.dm
@@ -47,73 +47,3 @@
icon_state = off_icon
if(grill_loop)
grill_loop.stop(src)
-
-/* // Test Comment this out too, /cooker does this for us, and this path '/obj/machinery/appliance/grill' is invalid anyways, meaning it does jack shit. - Updated the paths, but I'm basically commenting all this shit out and if the grill works as-normal, none of this stuff is needed.
-/obj/machinery/appliance/grill/toggle_power()
- set src in view()
- set name = "Toggle Power"
- set category = "Object"
-
- var/datum/cooking_item/CI = cooking_objs[1]
-
- if (stat & POWEROFF)//Its turned off
- stat &= ~POWEROFF
- if (usr)
- usr.visible_message("[usr] turns \the [src] on", "You turn on \the [src].")
- get_cooking_work(CI)
- use_power = 2
- else //It's on, turn it off
- stat |= POWEROFF
- use_power = 0
- if (usr)
- usr.visible_message("[usr] turns \the [src] off", "You turn off \the [src].")
- playsound(src, 'sound/machines/click.ogg', 40, 1)
- update_icon()
-
-
-/obj/machinery/appliance/cooker/grill/Initialize()
- . = ..()
- // cooking_objs += new /datum/cooking_item(new /obj/item/weapon/reagent_containers/cooking_container(src))
- cooking = FALSE
-
-/obj/machinery/appliance/cooker/grill/has_space(var/obj/item/I)
- var/datum/cooking_item/CI = cooking_objs[1]
- if (!CI || !CI.container)
- return 0
-
- if (CI.container.can_fit(I))
- return CI
-
- return 0
-*/
-/* // Test comment this out, I don't think this is doing shit anyways.
-//Container is not removable
-/obj/machinery/appliance/grill/removal_menu(var/mob/user)
- if (can_remove_items(user))
- var/list/menuoptions = list()
- for (var/a in cooking_objs)
- var/datum/cooking_item/CI = a
- if (CI.container)
- if (!CI.container.check_contents())
- to_chat(user, "There's nothing in the [src] you can remove!")
- return
-
- for (var/obj/item/I in CI.container)
- menuoptions[I.name] = I
-
- var/selection = input(user, "Which item would you like to remove? If you want to remove chemicals, use an empty beaker.", "Remove ingredients") as null|anything in menuoptions
- if (selection)
- var/obj/item/I = menuoptions[selection]
- if (!user || !user.put_in_hands(I))
- I.forceMove(get_turf(src))
- update_icon()
- return 1
- return 0
-*/
-
-/* // Test remove this too.
-/obj/machinery/appliance/grill/process()
- if (!stat)
- for (var/i in cooking_objs)
- do_cooking_tick(i)
-*/
\ No newline at end of file
diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm
index 4df4070cd63..a7b61628edd 100644
--- a/code/modules/food/kitchen/smartfridge/smartfridge.dm
+++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm
@@ -233,7 +233,7 @@
if(params["amount"])
amount = params["amount"]
else
- amount = input("How many items?", "How many items would you like to take out?", 1) as num|null
+ amount = input(usr, "How many items?", "How many items would you like to take out?", 1) as num|null
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src))
return FALSE
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index 0165c9315fb..4d4ab53dcad 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -133,7 +133,7 @@
players += player
//players -= usr
- var/mob/living/M = input("Who do you wish to deal a card?") as null|anything in players
+ var/mob/living/M = tgui_input_list(usr, "Who do you wish to deal a card?", "Deal to whom?", players)
if(!usr || !src || !M) return
deal_at(usr, M, 1)
@@ -157,10 +157,10 @@
players += player
//players -= usr
var/maxcards = max(min(cards.len,10),1)
- var/dcard = input("How many card(s) do you wish to deal? You may deal up to [maxcards] cards.") as num
+ var/dcard = input(usr, "How many card(s) do you wish to deal? You may deal up to [maxcards] cards.") as num
if(dcard > maxcards)
return
- var/mob/living/M = input("Who do you wish to deal [dcard] card(s)?") as null|anything in players
+ var/mob/living/M = tgui_input_list(usr, "Who do you wish to deal [dcard] card(s)?", "Deal to whom?", players)
if(!usr || !src || !M) return
deal_at(usr, M, dcard)
@@ -321,14 +321,14 @@
var/i
var/maxcards = min(cards.len,5) // Maximum of 5 cards at once
- var/discards = input("How many cards do you want to discard? You may discard up to [maxcards] card(s)") as num
+ var/discards = input(usr, "How many cards do you want to discard? You may discard up to [maxcards] card(s)") as num
if(discards > maxcards)
return
for (i = 0;i < discards;i++)
var/list/to_discard = list()
for(var/datum/playingcard/P in cards)
to_discard[P.name] = P
- var/discarding = input("Which card do you wish to put down?") as null|anything in to_discard
+ var/discarding = tgui_input_list(usr, "Which card do you wish to put down?", "Card Selection", to_discard)
if(!discarding || !to_discard[discarding] || !usr || !src) return
@@ -379,7 +379,7 @@
var/pickablecards = list()
for(var/datum/playingcard/P in cards)
pickablecards[P.name] += P
- var/pickedcard = input("Which card do you want to remove from the hand?") as null|anything in pickablecards
+ var/pickedcard = tgui_input_list(usr, "Which card do you want to remove from the hand?", "Card Selection", pickablecards)
if(!pickedcard || !pickablecards[pickedcard] || !usr || !src) return
diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm
index 5cc881e987b..527580784f4 100644
--- a/code/modules/hydroponics/trays/tray.dm
+++ b/code/modules/hydroponics/trays/tray.dm
@@ -429,7 +429,7 @@
if(usr.incapacitated())
return
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot))
- var/new_light = input("Specify a light level.") as null|anything in list(0,1,2,3,4,5,6,7,8,9,10)
+ var/new_light = tgui_input_list(usr, "Specify a light level.", "Light Level", list(0,1,2,3,4,5,6,7,8,9,10))
if(new_light)
tray_light = new_light
to_chat(usr, "You set the tray to a light level of [tray_light] lumens.")
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index 9435ed8163a..f88e06bce11 100644
--- a/code/modules/instruments/songs/editor.dm
+++ b/code/modules/instruments/songs/editor.dm
@@ -135,8 +135,8 @@
return
if(length_char(t) >= MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
- var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
- if(cont == "no")
+ var/cont = tgui_alert(usr, "Your message is too long! Would you like to continue editing it?", "Too long!", list("Yes", "No"))
+ if(cont == "No")
break
while(length_char(t) > MUSIC_MAXLINES * MUSIC_MAXLINECHARS)
ParseSong(t)
@@ -163,7 +163,7 @@
INVOKE_ASYNC(src, .proc/start_playing, usr)
else if(href_list["newline"])
- var/newline = html_encode(input("Enter your line: ", parent.name) as text|null)
+ var/newline = html_encode(input(usr, "Enter your line: ", parent.name) as text|null)
if(!newline || !in_range(parent, usr))
return
if(lines.len > MUSIC_MAXLINES)
@@ -221,11 +221,11 @@
var/datum/instrument/I = SSinstruments.get_instrument(i)
if(I)
LAZYSET(categories[I.category || "ERROR CATEGORY"], I.name, I.id)
- var/cat = input(usr, "Select Category", "Instrument Category") as null|anything in categories
+ var/cat = tgui_input_list(usr, "Select Category", "Instrument Category", categories)
if(!cat)
return
var/list/instruments = categories[cat]
- var/choice = input(usr, "Select Instrument", "Instrument Selection") as null|anything in instruments
+ var/choice = tgui_input_list(usr, "Select Instrument", "Instrument Selection", instruments)
if(!choice)
return
choice = instruments[choice] //get id
@@ -238,7 +238,7 @@
note_shift = clamp(amount, note_shift_min, note_shift_max)
else if(href_list["setsustainmode"])
- var/choice = input(usr, "Choose a sustain mode", "Sustain Mode") as null|anything in list("Linear", "Exponential")
+ var/choice = tgui_input_list(usr, "Choose a sustain mode", "Sustain Mode", list("Linear", "Exponential"))
switch(choice)
if("Linear")
sustain_mode = SUSTAIN_LINEAR
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index 9cdd8a2e6e1..f671b515697 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -176,7 +176,7 @@
if(!check_interactivity(M))
return
- var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN)
if(src && input)
to_chat(M, "The machine now has a label reading '[input]'.")
name = input
@@ -352,7 +352,7 @@
var/obj/item/integrated_circuit/input/choice
if(available_inputs)
- var/selection = input(user, "What do you want to interact with?", "Interaction") as null|anything in input_selection
+ var/selection = tgui_input_list(user, "What do you want to interact with?", "Interaction", input_selection)
if(selection)
var/index = input_selection.Find(selection)
choice = available_inputs[index]
diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm
index 025915d0792..89cbf4fdd1c 100644
--- a/code/modules/integrated_electronics/core/integrated_circuit.dm
+++ b/code/modules/integrated_electronics/core/integrated_circuit.dm
@@ -68,7 +68,7 @@ a creative player the means to solve many problems. Circuits are held inside an
if(!check_interactivity(M))
return
- var/input = sanitizeSafe(input("What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN)
if(src && input && assembly.check_interactivity(M))
to_chat(M, "The circuit '[src.name]' is now labeled '[input]'.")
displayed_name = input
diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm
index c194b4a8a2d..4020d03a34a 100644
--- a/code/modules/integrated_electronics/core/pins.dm
+++ b/code/modules/integrated_electronics/core/pins.dm
@@ -147,19 +147,19 @@ list[](
src.linked.Remove(their_io)
/datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null"))
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in allowed_data_types
+ var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", allowed_data_types)
if(!holder.check_interactivity(user))
return
var/new_data = null
switch(type_to_use)
if("string")
- new_data = input("Now type in a string.","[src] string writing", istext(default) ? default : null) as null|text
+ new_data = input(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null) as null|text
if(istext(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
return new_data
if("number")
- new_data = input("Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num
+ new_data = input(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null) as null|num
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
return new_data
diff --git a/code/modules/integrated_electronics/core/special_pins/char_pin.dm b/code/modules/integrated_electronics/core/special_pins/char_pin.dm
index bd36d18495e..0449b705490 100644
--- a/code/modules/integrated_electronics/core/special_pins/char_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/char_pin.dm
@@ -3,7 +3,7 @@
name = "char pin"
/datum/integrated_io/char/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in one character.","[src] char writing") as null|text
+ var/new_data = input(usr, "Please type in one character.","[src] char writing") as null|text
if(holder.check_interactivity(user) )
to_chat(user, "You input [new_data ? "new_data" : "NULL"] into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/core/special_pins/color_pin.dm b/code/modules/integrated_electronics/core/special_pins/color_pin.dm
index e58d2d8e756..8f9a3b1a7ab 100644
--- a/code/modules/integrated_electronics/core/special_pins/color_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/color_pin.dm
@@ -3,7 +3,7 @@
name = "color pin"
/datum/integrated_io/color/ask_for_pin_data(mob/user)
- var/new_data = input("Please select a color.","[src] color writing", data ? data : "#000000") as null|color
+ var/new_data = input(usr, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color
if(holder.check_interactivity(user) )
to_chat(user, "You input a new color into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
index 1c803db510f..4b523f91141 100644
--- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm
@@ -3,7 +3,7 @@
name = "dir pin"
/datum/integrated_io/dir/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in a valid dir number. \
+ var/new_data = input(usr, "Please type in a valid dir number. \
Valid dirs are;\n\
North/Fore = [NORTH],\n\
South/Aft = [SOUTH],\n\
diff --git a/code/modules/integrated_electronics/core/special_pins/list_pin.dm b/code/modules/integrated_electronics/core/special_pins/list_pin.dm
index 4eeb756cd0d..b5c3d39ebba 100644
--- a/code/modules/integrated_electronics/core/special_pins/list_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/list_pin.dm
@@ -53,7 +53,7 @@
to_chat(user, "The list is empty, there's nothing to remove.")
return
if(!target_entry)
- target_entry = input("Which piece of data do you want to remove?", "Remove") as null|anything in my_list
+ target_entry = tgui_input_list(usr, "Which piece of data do you want to remove?", "Remove", my_list)
if(target_entry)
my_list.Remove(target_entry)
@@ -63,7 +63,7 @@
to_chat(user, "The list is empty, there's nothing to modify.")
return
if(!target_entry)
- target_entry = input("Which piece of data do you want to edit?", "Edit") as null|anything in my_list
+ target_entry = tgui_input_list(usr, "Which piece of data do you want to edit?", "Edit", my_list)
if(target_entry)
var/edited_entry = ask_for_data_type(user, target_entry)
if(edited_entry)
@@ -88,11 +88,11 @@
to_chat(user, "The list is empty, or too small to do any meaningful swapping.")
return
if(!first_target)
- first_target = input("Which piece of data do you want to swap? (1)", "Swap") as null|anything in my_list
+ first_target = tgui_input_list(usr, "Which piece of data do you want to swap? (1)", "Swap", my_list)
if(first_target)
if(!second_target)
- second_target = input("Which piece of data do you want to swap? (2)", "Swap") as null|anything in my_list - first_target
+ second_target = tgui_input_list(usr, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target)
if(second_target)
var/first_pos = my_list.Find(first_target)
diff --git a/code/modules/integrated_electronics/core/special_pins/number_pin.dm b/code/modules/integrated_electronics/core/special_pins/number_pin.dm
index 319ac2de06b..92b07638bd1 100644
--- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/number_pin.dm
@@ -4,7 +4,7 @@
// data = 0
/datum/integrated_io/number/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in a number.","[src] number writing") as null|num
+ var/new_data = input(usr, "Please type in a number.","[src] number writing") as null|num
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "You input [new_data] into the pin.")
write_data_to_pin(new_data)
diff --git a/code/modules/integrated_electronics/core/special_pins/string_pin.dm b/code/modules/integrated_electronics/core/special_pins/string_pin.dm
index 595a2053187..a0428a12de0 100644
--- a/code/modules/integrated_electronics/core/special_pins/string_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/string_pin.dm
@@ -3,7 +3,7 @@
name = "string pin"
/datum/integrated_io/string/ask_for_pin_data(mob/user)
- var/new_data = input("Please type in a string.","[src] string writing") as null|text
+ var/new_data = input(usr, "Please type in a string.","[src] string writing") as null|text
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(new_data && holder.check_interactivity(user) )
diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm
index 4f1b16ca746..e248ffe5454 100644
--- a/code/modules/integrated_electronics/core/tools.dm
+++ b/code/modules/integrated_electronics/core/tools.dm
@@ -114,7 +114,7 @@
var/accepting_refs = 0
/obj/item/device/integrated_electronics/debugger/attack_self(mob/user)
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null")
+ var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
if(!CanInteract(user, GLOB.tgui_physical_state))
return
@@ -122,14 +122,14 @@
switch(type_to_use)
if("string")
accepting_refs = 0
- new_data = input("Now type in a string.","[src] string writing") as null|text
+ new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "You set \the [src]'s memory to \"[new_data]\".")
if("number")
accepting_refs = 0
- new_data = input("Now type in a number.","[src] number writing") as null|num
+ new_data = input(usr, "Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "You set \the [src]'s memory to [new_data].")
diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm
index 90cb23de352..2fb6ad45982 100644
--- a/code/modules/integrated_electronics/subtypes/memory.dm
+++ b/code/modules/integrated_electronics/subtypes/memory.dm
@@ -88,7 +88,7 @@
/obj/item/integrated_circuit/memory/constant/attack_self(mob/user)
var/datum/integrated_io/O = outputs[1]
- var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null")
+ var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null"))
if(!CanInteract(user, GLOB.tgui_physical_state))
return
@@ -96,13 +96,13 @@
switch(type_to_use)
if("string")
accepting_refs = 0
- new_data = input("Now type in a string.","[src] string writing") as null|text
+ new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].")
if("number")
accepting_refs = 0
- new_data = input("Now type in a number.","[src] number writing") as null|num
+ new_data = input(usr, "Now type in a number.","[src] number writing") as null|num
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].")
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 576edff4a53..af20cc0959c 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -33,7 +33,7 @@
O.loc = src
update_icon()
else if(istype(O, /obj/item/weapon/pen))
- var/newname = sanitizeSafe(input("What would you like to title this bookshelf?"), MAX_NAME_LEN)
+ var/newname = sanitizeSafe(input(usr, "What would you like to title this bookshelf?"), MAX_NAME_LEN)
if(!newname)
return
else
@@ -57,7 +57,7 @@
/obj/structure/bookcase/attack_hand(var/mob/user as mob)
if(contents.len)
- var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
+ var/obj/item/weapon/book/choice = tgui_input_list(usr, "Which book would you like to remove from the shelf?", "Book Selection", contents)
if(choice)
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
return
@@ -226,10 +226,10 @@ Book Cart End
if(unique)
to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.")
return
- var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
+ var/choice = tgui_input_list(usr, "What would you like to change?", "Change What?", list("Title", "Contents", "Author", "Cancel"))
switch(choice)
if("Title")
- var/newtitle = reject_bad_text(sanitizeSafe(input("Write a new title:")))
+ var/newtitle = reject_bad_text(sanitizeSafe(input(usr, "Write a new title:")))
if(!newtitle)
to_chat(usr, "The title is invalid.")
return
@@ -237,7 +237,7 @@ Book Cart End
src.name = newtitle
src.title = newtitle
if("Contents")
- var/content = sanitize(input("Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN)
+ var/content = sanitize(input(usr, "Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN)
if(!content)
to_chat(usr, "The content is invalid.")
return
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 5106de66138..cd18f1c75e1 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -73,21 +73,21 @@
return
if(href_list["settitle"])
- var/newtitle = input("Enter a title to search for:") as text|null
+ var/newtitle = input(usr, "Enter a title to search for:") as text|null
if(newtitle)
title = sanitize(newtitle)
else
title = null
title = sanitizeSQL(title)
if(href_list["setcategory"])
- var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")
+ var/newcategory = tgui_input_list(usr, "Choose a category to search for:", list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion"))
if(newcategory)
category = sanitize(newcategory)
else
category = "Any"
category = sanitizeSQL(category)
if(href_list["setauthor"])
- var/newauthor = input("Enter an author to search for:") as text|null
+ var/newauthor = input(usr, "Enter an author to search for:") as text|null
if(newauthor)
author = sanitize(newauthor)
else
@@ -372,9 +372,9 @@
if(checkoutperiod < 1)
checkoutperiod = 1
if(href_list["editbook"])
- buffer_book = sanitizeSafe(input("Enter the book's title:") as text|null)
+ buffer_book = sanitizeSafe(input(usr, "Enter the book's title:") as text|null)
if(href_list["editmob"])
- buffer_mob = sanitize(input("Enter the recipient's name:") as text|null, MAX_NAME_LEN)
+ buffer_mob = sanitize(input(usr, "Enter the recipient's name:") as text|null, MAX_NAME_LEN)
if(href_list["checkout"])
var/datum/borrowbook/b = new /datum/borrowbook
b.bookname = sanitizeSafe(buffer_book)
@@ -389,11 +389,11 @@
var/obj/item/weapon/book/b = locate(href_list["delbook"])
inventory.Remove(b)
if(href_list["setauthor"])
- var/newauthor = sanitize(input("Enter the author's name: ") as text|null)
+ var/newauthor = sanitize(input(usr, "Enter the author's name: ") as text|null)
if(newauthor)
scanner.cache.author = newauthor
if(href_list["setcategory"])
- var/newcategory = input("Choose a category: ") in list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion")
+ var/newcategory = tgui_input_list(usr, "Choose a category: ", list("Fiction", "Non-Fiction", "Adult", "Reference", "Religion"))
if(newcategory)
upload_category = newcategory
@@ -401,7 +401,7 @@
if(href_list["upload"])
if(scanner)
if(scanner.cache)
- var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
+ var/choice = tgui_alert(usr, "Are you certain you wish to upload this title to the Archive?", "Confirmation", list("Confirm", "Abort"))
if(choice == "Confirm")
if(scanner.cache.unique)
tgui_alert_async(usr, "This book has been rejected from the database. Aborting!")
@@ -469,7 +469,7 @@
query.Execute()
if(href_list["orderbyid"])
- var/orderid = input("Enter your order:") as num|null
+ var/orderid = input(usr, "Enter your order:") as num|null
if(orderid)
if(isnum(orderid))
var/nhref = "src=\ref[src];targetid=[orderid]"
diff --git a/code/modules/materials/materials/glass.dm b/code/modules/materials/materials/glass.dm
index 79535422785..0327f343400 100644
--- a/code/modules/materials/materials/glass.dm
+++ b/code/modules/materials/materials/glass.dm
@@ -34,7 +34,7 @@
return 1
var/title = "Sheet-[used_stack.name] ([used_stack.get_amount()] sheet\s left)"
- var/choice = input(title, "What would you like to construct?") as null|anything in window_options
+ var/choice = tgui_input_list(title, "What would you like to construct?", "Window Selection", window_options)
if(!choice || !used_stack || !user || used_stack.loc != user || user.stat || user.loc != T)
return 1
diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm
index fe23dcab8ee..12fd7142838 100644
--- a/code/modules/media/mediamanager.dm
+++ b/code/modules/media/mediamanager.dm
@@ -62,7 +62,7 @@
if(!QDELETED(src.media) || !istype(src.media))
to_chat(user, "You have no media datum to change, if you're not in the lobby tell an admin.")
return
- var/value = input("Choose your Jukebox volume.", "Jukebox volume", media.volume)
+ var/value = input(usr, "Choose your Jukebox volume.", "Jukebox volume", media.volume)
value = round(max(0, min(100, value)))
media.update_volume(value)
diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm
index ef113ca7b7f..0c8c30e1266 100644
--- a/code/modules/mining/drilling/scanner.dm
+++ b/code/modules/mining/drilling/scanner.dm
@@ -84,7 +84,7 @@
/obj/item/weapon/mining_scanner/advanced/verb/change_size()
set name = "Set Scanner Range"
set category = "Object"
- var/custom_range = input("Scanner Range","Pick a range to scan. ") as null|anything in list(0,1,2,3,4,5,6,7)
+ var/custom_range = tgui_input_list(usr, "Scanner Range","Pick a range to scan. ", list(0,1,2,3,4,5,6,7))
if(custom_range)
range = custom_range
to_chat(usr, "Scanner will now look up to [range] tile(s) away.")
\ No newline at end of file
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index d2bb5725129..f5c74a2f8b9 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -30,7 +30,7 @@ var/global/list/total_extraction_beacons = list()
else
var/A
- A = input("Select a beacon to connect to", "Balloon Extraction Pack", A) as null|anything in possible_beacons
+ A = tgui_input_list(usr, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons)
if(!A)
return
diff --git a/code/modules/mining/machinery/machine_processing.dm b/code/modules/mining/machinery/machine_processing.dm
index f9b89290033..a4644035d99 100644
--- a/code/modules/mining/machinery/machine_processing.dm
+++ b/code/modules/mining/machinery/machine_processing.dm
@@ -100,7 +100,7 @@
var/ore = params["ore"]
var/new_setting = params["set"]
if(new_setting == null)
- new_setting = input("What setting do you wish to use for processing [ore]]?") as null|anything in list("Smelting","Compressing","Alloying","Nothing")
+ new_setting = tgui_input_list(usr, "What setting do you wish to use for processing [ore]]?", "Process Setting", list("Smelting","Compressing","Alloying","Nothing"))
if(!new_setting)
return
switch(new_setting)
diff --git a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm
index 234d88334e0..fea5712bd02 100644
--- a/code/modules/mining/ore_redemption_machine/equipment_vendor.dm
+++ b/code/modules/mining/ore_redemption_machine/equipment_vendor.dm
@@ -322,7 +322,7 @@
* * redeemer - The person holding it
*/
/obj/machinery/mineral/equipment_vendor/proc/redeem_voucher(obj/item/mining_voucher/voucher, mob/redeemer)
- var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner", "Crusher")
+ var/selection = tgui_input_list(redeemer, "Pick your equipment", "Mining Voucher Redemption", list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner", "Crusher"))
if(!selection || !Adjacent(redeemer) || voucher.loc != redeemer)
return
//VOREStation Edit Start - Uncommented these
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 9eabbdb2767..8fac13480e3 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -700,9 +700,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, "There is no blood to use nearby.")
return
- var/obj/effect/decal/cleanable/blood/choice = input(src,"What blood would you like to use?") in null|choices
+ var/obj/effect/decal/cleanable/blood/choice = tgui_input_list(src, "What blood would you like to use?", "Blood Choice", choices)
- var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
+ var/direction = tgui_input_list(src,"Which way?","Tile selection", list("Here","North","South","East","West"))
var/turf/simulated/T = src.loc
if (direction != "Here")
T = get_step(T,text2dir(direction))
@@ -725,7 +725,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/max_length = 50
- var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
+ var/message = sanitize(input(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
if (message)
@@ -876,7 +876,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/list/options = list()
for(var/mob/living/Ms in view(src))
options += Ms
- var/mob/living/M = input(src, "Select who to whisper to:", "Whisper to?", null) as null|mob in options
+ var/mob/living/M = tgui_input_list(src, "Select who to whisper to:", "Whisper to?", options)
if(!M)
return 0
var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null)
diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm
index 60a833671b0..36f5761dded 100644
--- a/code/modules/mob/dead/observer/observer_vr.dm
+++ b/code/modules/mob/dead/observer/observer_vr.dm
@@ -3,7 +3,7 @@
set name = "Join Into Soulcatcher"
set desc = "Select a player with a working NIF + Soulcatcher NIFSoft to join into it."
- var/picked = input("Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player") as null|anything in player_list
+ var/picked = tgui_input_list(usr, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", player_list)
//Didn't pick anyone or picked a null
if(!picked)
@@ -88,7 +88,7 @@
if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer!
return
- var/input = input(usr, "Select a ghost pod:", "Ghost Jump") as null|anything in observe_list_format(active_ghost_pods)
+ var/input = tgui_input_list(usr, "Select a ghost pod:", "Ghost Jump", observe_list_format(active_ghost_pods))
if(!input)
to_chat(src, "No active ghost pods detected.")
return
diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm
index 785718820db..66d5a595cf4 100644
--- a/code/modules/mob/living/bot/mulebot.dm
+++ b/code/modules/mob/living/bot/mulebot.dm
@@ -116,7 +116,7 @@
var/new_dest
var/list/beaconlist = GetBeaconList()
if(beaconlist.len)
- new_dest = input("Select new home tag", "Mulebot [suffix ? "([suffix])" : ""]", null) in null|beaconlist
+ new_dest = tgui_input_list(usr, "Select new home tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist)
else
tgui_alert_async(usr, "No destination beacons available.")
if(new_dest)
@@ -154,7 +154,7 @@
var/new_dest
var/list/beaconlist = GetBeaconList()
if(beaconlist.len)
- new_dest = input("Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]") in null|beaconlist
+ new_dest = tgui_input_list(usr, "Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", beaconlist)
else
tgui_alert_async(usr, "No destination beacons available.")
if(new_dest)
diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm
index e4c39e32dea..fe31cf9c8b8 100644
--- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm
+++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm
@@ -22,7 +22,7 @@
if(D.species && D.species.name == SPECIES_DIONA)
choices += C
- var/mob/living/M = input(src,"Who do you wish to merge with?") in null|choices
+ var/mob/living/M = tgui_input_list(src, "Who do you wish to merge with?", "Merge Choice", choices)
if(!M)
to_chat(src, "There is nothing nearby to merge with.")
diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm
index f4bc98bcbe6..e48246f4317 100644
--- a/code/modules/mob/living/carbon/human/emote_vr.dm
+++ b/code/modules/mob/living/carbon/human/emote_vr.dm
@@ -36,7 +36,7 @@
set name = "Set Gender Identity"
set desc = "Sets the pronouns when examined and performing an emote."
set category = "IC"
- var/new_gender_identity = input("Please select a gender Identity.") as null|anything in list(FEMALE, MALE, NEUTER, PLURAL, HERM)
+ var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity.", list(FEMALE, MALE, NEUTER, PLURAL, HERM))
if(!new_gender_identity)
return 0
change_gender_identity(new_gender_identity)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 141835566a6..b1fe390e783 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -356,7 +356,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
- var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
+ var/setcriminal = tgui_input_list(usr, "Specify a new criminal status for this person.", "Security HUD", list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel"))
if(hasHUD(usr, "security"))
if(setcriminal != "Cancel")
@@ -442,7 +442,7 @@
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
- var/t1 = sanitize(input("Add Comment:", "Sec. records", null, null) as message)
+ var/t1 = sanitize(input(usr, "Add Comment:", "Sec. records", null, null) as message)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -471,7 +471,7 @@
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
- var/setmedical = input(usr, "Specify a new medical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*SSD*", "*Deceased*", "Physically Unfit", "Active", "Disabled", "Cancel")
+ var/setmedical = tgui_input_list(usr, "Specify a new medical status for this person.", "Medical HUD", list("*SSD*", "*Deceased*", "Physically Unfit", "Active", "Disabled", "Cancel"))
if(hasHUD(usr,"medical"))
if(setmedical != "Cancel")
@@ -559,7 +559,7 @@
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
- var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
+ var/t1 = sanitize(input(usr, "Add Comment:", "Med. records", null, null) as message)
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
@@ -730,19 +730,19 @@
src.verbs -= /mob/living/carbon/human/proc/morph
return
- var/new_facial = input("Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color
+ var/new_facial = input(usr, "Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color
if(new_facial)
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
b_facial = hex2num(copytext(new_facial, 6, 8))
- var/new_hair = input("Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color
+ var/new_hair = input(usr, "Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color
if(new_facial)
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
b_hair = hex2num(copytext(new_hair, 6, 8))
- var/new_eyes = input("Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color
+ var/new_eyes = input(usr, "Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color
if(new_eyes)
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
@@ -759,7 +759,7 @@
hairs.Add(H.name) // add hair name to hairs
qdel(H) // delete the hair after it's all done
- var/new_style = input("Please select hair style", "Character Generation",h_style) as null|anything in hairs
+ var/new_style = tgui_input_list(usr, "Please select hair style", "Character Generation", hairs)
// if new style selected (not cancel)
if (new_style)
@@ -774,12 +774,12 @@
fhairs.Add(H.name)
qdel(H)
- new_style = input("Please select facial style", "Character Generation",f_style) as null|anything in fhairs
+ new_style = tgui_input_list(usr, "Please select facial style", "Character Generation", fhairs)
if(new_style)
f_style = new_style
- var/new_gender = tgui_alert("Please select gender.", "Character Generation", list("Male", "Female", "Neutral"))
+ var/new_gender = tgui_alert(usr, "Please select gender.", "Character Generation", list("Male", "Female", "Neutral"))
if (new_gender)
if(new_gender == "Male")
gender = MALE
@@ -807,11 +807,11 @@
var/list/creatures = list()
for(var/mob/living/carbon/h in mob_list)
creatures += h
- var/mob/target = input("Who do you want to project your mind to ?") as null|anything in creatures
+ var/mob/target = tgui_input_list(usr, "Who do you want to project your mind to?", "Project Mind", creatures)
if (isnull(target))
return
- var/say = sanitize(input("What do you wish to say"))
+ var/say = sanitize(input(usr, "What do you wish to say"))
if(mRemotetalk in target.mutations)
target.show_message(" You hear [src.real_name]'s voice: [say]")
else
@@ -920,7 +920,7 @@
set name = "sim"
set background = 1
- var/damage = input("Wound damage","Wound damage") as num
+ var/damage = input(usr, "Wound damage","Wound damage") as num
var/germs = 0
var/tdamage = 0
@@ -1193,7 +1193,7 @@
to_chat(src, "You cannot reach the floor.")
return
- var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
+ var/direction = tgui_input_list(src,"Which way?","Tile selection", list("Here","North","South","East","West"))
if (direction != "Here")
T = get_step(T,text2dir(direction))
if (!istype(T))
@@ -1209,7 +1209,7 @@
var/max_length = bloody_hands * 30 //tweeter style
- var/message = sanitize(input("Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
+ var/message = sanitize(input(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
if (message)
var/used_blood_amount = round(length(message) / 30, 1)
@@ -1371,7 +1371,7 @@
var/obj/item/organ/external/current_limb = organs_by_name[limb]
if(current_limb && current_limb.dislocated > 0 && !current_limb.is_parent_dislocated()) //if the parent is also dislocated you will have to relocate that first
limbs |= current_limb
- var/obj/item/organ/external/current_limb = input(usr,"Which joint do you wish to relocate?") as null|anything in limbs
+ var/obj/item/organ/external/current_limb = tgui_input_list(usr, "Which joint do you wish to relocate?", "Joint Choice", limbs)
if(!current_limb)
return
@@ -1468,7 +1468,7 @@
set category = "Object"
if(stat) return
- var/datum/category_group/underwear/UWC = input(usr, "Choose underwear:", "Show/hide underwear") as null|anything in global_underwear.categories
+ var/datum/category_group/underwear/UWC = tgui_input_list(usr, "Choose underwear:", "Show/hide underwear", global_underwear.categories)
if(!UWC) return
var/datum/category_item/underwear/UWI = all_underwear[UWC.name]
if(!UWI || UWI.name == "None")
diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
index 6be9f62a8f6..14bc1a20242 100644
--- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm
+++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm
@@ -185,7 +185,7 @@
if(!length(detachable_limbs))
to_chat(src, SPAN_WARNING("You have no detachable limbs."))
return FALSE
- var/obj/item/organ/external/E = input(usr, "Which limb do you wish to detach?", "Limb Removal") as null|anything in detachable_limbs
+ var/obj/item/organ/external/E = tgui_input_list(usr, "Which limb do you wish to detach?", "Limb Removal", detachable_limbs)
if(!check_can_detach_modular_limb(E))
return FALSE
if(!do_after(src, 2 SECONDS, src))
diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index 4b363cb604a..74dfba1b369 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -22,7 +22,7 @@
var/datum/sprite_accessory/hair/test = hair_styles_list[hair_string]
if(test.flags & HAIR_TIEABLE)
valid_hairstyles.Add(hair_string)
- selected_string = input("Select a new hairstyle", "Your hairstyle", hair_style) as null|anything in valid_hairstyles
+ selected_string = tgui_input_list(usr, "Select a new hairstyle", "Your hairstyle", valid_hairstyles)
if(incapacitated())
to_chat(src, "You can't mess with your hair right now!")
return
@@ -51,7 +51,7 @@
choices += M
choices -= src
- var/mob/living/T = input(src,"Who do you wish to tackle?") as null|anything in choices
+ var/mob/living/T = tgui_input_list(src, "Who do you wish to tackle?", "Target Choice", choices)
if(!T || !src || src.stat) return
@@ -90,11 +90,11 @@
var/text = null
targets += getmobs() //Fill list, prompt user with list
- target = input("Select a creature!", "Speak to creature", null, null) as null|anything in targets
+ target = tgui_input_list(usr, "Select a creature!", "Speak to creature", targets)
if(!target) return
- text = input("What would you like to say?", "Speak to creature", null, null)
+ text = input(usr, "What would you like to say?", "Speak to creature", null, null)
text = sanitize(text)
@@ -134,7 +134,7 @@
set desc = "Whisper silently to someone over a distance."
set category = "Abilities"
- var/msg = sanitize(input("Message:", "Psychic Whisper") as text|null)
+ var/msg = sanitize(input(usr, "Message:", "Psychic Whisper") as text|null)
if(msg)
log_say("(PWHISPER to [key_name(M)]) [msg]", src)
to_chat(M, "You hear a strange, alien voice in your head... [msg]")
@@ -370,7 +370,7 @@
var/list/states
if(!states)
states = params2list(robohead.monitor_styles)
- var/choice = input("Select a screen icon.") as null|anything in states
+ var/choice = tgui_input_list(usr, "Select a screen icon:", "Screen Icon Choice", states)
if(choice)
E.eye_icon_location = robohead.monitor_icon
E.eye_icon = states[choice]
diff --git a/code/modules/mob/living/carbon/human/species/outsider/event.dm b/code/modules/mob/living/carbon/human/species/outsider/event.dm
index 3604e201f39..f88768aa74d 100644
--- a/code/modules/mob/living/carbon/human/species/outsider/event.dm
+++ b/code/modules/mob/living/carbon/human/species/outsider/event.dm
@@ -178,7 +178,7 @@ Variables you may want to make use of are:
/datum/species/event1/proc/choose_limbset()
var/list/limb_sets = list("Normal" = 1, "Unbreakable" = 2, "Unseverable" = 3, "Indestructible" = 4)
- var/choice = input("Choose limb set to use for future spawns.", "Limb types.") as null|anything in limb_sets
+ var/choice = tgui_input_list(usr, "Choose limb set to use for future spawns.", "Limb types.", limb_sets)
set_limbset(limb_sets[choice])
return limb_sets[choice]
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
index 739d456bad0..1aa8454b701 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_abilities.dm
@@ -195,7 +195,7 @@
to_chat(src,"Nobody nearby to mend!")
return FALSE
- var/mob/living/target = input(src,"Pick someone to mend:","Mend Other") as null|anything in targets
+ var/mob/living/target = tgui_input_list(src,"Pick someone to mend:","Mend Other", targets)
if(!target)
return FALSE
diff --git a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_trait.dm b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_trait.dm
index 7f16315e851..5948fecc21c 100644
--- a/code/modules/mob/living/carbon/human/species/shadekin/shadekin_trait.dm
+++ b/code/modules/mob/living/carbon/human/species/shadekin/shadekin_trait.dm
@@ -1,4 +1,5 @@
/datum/trait/kintype
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_SHADEKIN)
var/color = BLUE_EYES
name = "Shadekin Blue Adaptation"
diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
index bc39e163106..106ffb618d9 100644
--- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
+++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm
@@ -111,13 +111,13 @@ var/list/wrapped_species_by_ref = list()
visible_message("\The [src]'s form contorts subtly.")
if(valid_hairstyles.len)
- var/new_hair = input("Select a hairstyle.", "Shapeshifter Hair") as null|anything in valid_hairstyles
+ var/new_hair = tgui_input_list(usr, "Select a hairstyle.", "Shapeshifter Hair", valid_hairstyles)
change_hair(new_hair ? new_hair : "Bald")
if(valid_gradstyles.len)
- var/new_hair = input("Select a hair gradient style.", "Shapeshifter Hair") as null|anything in valid_gradstyles
+ var/new_hair = tgui_input_list(usr, "Select a hair gradient style.", "Shapeshifter Hair", valid_gradstyles)
change_hair_gradient(new_hair ? new_hair : "None")
if(valid_facialhairstyles.len)
- var/new_hair = input("Select a facial hair style.", "Shapeshifter Hair") as null|anything in valid_facialhairstyles
+ var/new_hair = tgui_input_list(usr, "Select a facial hair style.", "Shapeshifter Hair", valid_facialhairstyles)
change_facial_hair(new_hair ? new_hair : "Shaved")
/mob/living/carbon/human/proc/shapeshifter_select_gender()
@@ -130,11 +130,11 @@ var/list/wrapped_species_by_ref = list()
last_special = world.time + 50
- var/new_gender = input("Please select a gender.", "Shapeshifter Gender") as null|anything in list(FEMALE, MALE, NEUTER, PLURAL)
+ var/new_gender = tgui_input_list(usr, "Please select a gender.", "Shapeshifter Gender", list(FEMALE, MALE, NEUTER, PLURAL))
if(!new_gender)
return
- var/new_gender_identity = input("Please select a gender Identity.", "Shapeshifter Gender Identity") as null|anything in list(FEMALE, MALE, NEUTER, PLURAL, HERM) //VOREStation Edit
+ var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity.", "Shapeshifter Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) //VOREStation Edit
if(!new_gender_identity)
return
@@ -153,7 +153,7 @@ var/list/wrapped_species_by_ref = list()
last_special = world.time + 50
var/new_species = null
- new_species = input("Please select a species to emulate.", "Shapeshifter Body") as null|anything in species.get_valid_shapeshifter_forms(src)
+ new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src))
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
return
@@ -178,7 +178,7 @@ var/list/wrapped_species_by_ref = list()
last_special = world.time + 50
var/current = RGBdec2hex(list(r_skin, g_skin, b_skin))
- var/new_skin = input("Please select a new body color.", "Shapeshifter Colour", current) as null|color
+ var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", current) as null|color
if(!new_skin)
return
shapeshifter_set_colour(new_skin)
@@ -216,15 +216,15 @@ var/list/wrapped_species_by_ref = list()
last_special = world.time + 50
- var/new_hair = input("Please select a new hair color.", "Hair Colour") as color
+ var/new_hair = input(usr, "Please select a new hair color.", "Hair Colour") as color
if(!new_hair)
return
shapeshifter_set_hair_color(new_hair)
- var/new_grad = input("Please select a new hair gradient color.", "Hair Gradient Colour") as color
+ var/new_grad = input(usr, "Please select a new hair gradient color.", "Hair Gradient Colour") as color
if(!new_grad)
return
shapeshifter_set_grad_color(new_grad)
- var/new_fhair = input("Please select a new facial hair color.", "Facial Hair Color") as color
+ var/new_fhair = input(usr, "Please select a new facial hair color.", "Facial Hair Color") as color
if(!new_fhair)
return
shapeshifter_set_facial_color(new_fhair)
@@ -316,7 +316,7 @@ var/list/wrapped_species_by_ref = list()
last_special = world.time + 50
var/current_color = rgb(r_eyes,g_eyes,b_eyes)
- var/new_eyes = input("Pick a new color for your eyes.","Eye Color", current_color) as null|color
+ var/new_eyes = input(usr, "Pick a new color for your eyes.","Eye Color", current_color) as null|color
if(!new_eyes)
return
diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
index 6d098687074..aab6fdd40b0 100644
--- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
+++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm
@@ -14,7 +14,7 @@
pretty_ear_styles[instance.name] = path
// Present choice to user
- var/new_ear_style = input(src, "Pick some ears!", "Character Preference", ear_style ? ear_style.name : null) as null|anything in pretty_ear_styles
+ var/new_ear_style = tgui_input_list(src, "Pick some ears!", "Character Preference", pretty_ear_styles)
if(!new_ear_style)
return
@@ -24,7 +24,7 @@
//Allow color picks
var/current_pri_color = rgb(r_ears,g_ears,b_ears)
- var/new_pri_color = input("Pick primary ear color:","Ear Color (Pri)", current_pri_color) as null|color
+ var/new_pri_color = input(usr, "Pick primary ear color:","Ear Color (Pri)", current_pri_color) as null|color
if(new_pri_color)
var/list/new_color_rgb_list = hex2rgb(new_pri_color)
r_ears = new_color_rgb_list[1]
@@ -34,7 +34,7 @@
//Indented inside positive primary color choice, don't bother if they clicked cancel
var/current_sec_color = rgb(r_ears2,g_ears2,b_ears2)
- var/new_sec_color = input("Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) as null|color
+ var/new_sec_color = input(usr, "Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) as null|color
if(new_sec_color)
new_color_rgb_list = hex2rgb(new_sec_color)
r_ears2 = new_color_rgb_list[1]
@@ -43,7 +43,7 @@
var/current_ter_color = rgb(r_ears3,g_ears3,b_ears3)
- var/new_ter_color = input("Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) as null|color
+ var/new_ter_color = input(usr, "Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) as null|color
if(new_ter_color)
new_color_rgb_list = hex2rgb(new_sec_color)
r_ears3 = new_color_rgb_list[1]
@@ -68,7 +68,7 @@
pretty_tail_styles[instance.name] = path
// Present choice to user
- var/new_tail_style = input(src, "Pick a tail!", "Character Preference", tail_style ? tail_style.name : null) as null|anything in pretty_tail_styles
+ var/new_tail_style = tgui_input_list(src, "Pick a tail!", "Character Preference", pretty_tail_styles)
if(!new_tail_style)
return
@@ -78,7 +78,7 @@
//Allow color picks
var/current_pri_color = rgb(r_tail,g_tail,b_tail)
- var/new_pri_color = input("Pick primary tail color:","Tail Color (Pri)", current_pri_color) as null|color
+ var/new_pri_color = input(usr, "Pick primary tail color:","Tail Color (Pri)", current_pri_color) as null|color
if(new_pri_color)
var/list/new_color_rgb_list = hex2rgb(new_pri_color)
r_tail = new_color_rgb_list[1]
@@ -88,7 +88,7 @@
//Indented inside positive primary color choice, don't bother if they clicked cancel
var/current_sec_color = rgb(r_tail2,g_tail2,b_tail2)
- var/new_sec_color = input("Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) as null|color
+ var/new_sec_color = input(usr, "Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) as null|color
if(new_sec_color)
new_color_rgb_list = hex2rgb(new_sec_color)
r_tail2 = new_color_rgb_list[1]
@@ -97,7 +97,7 @@
var/current_ter_color = rgb(r_tail3,g_tail3,b_tail3)
- var/new_ter_color = input("Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) as null|color
+ var/new_ter_color = input(usr, "Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) as null|color
if(new_ter_color)
new_color_rgb_list = hex2rgb(new_ter_color)
r_tail3 = new_color_rgb_list[1]
@@ -122,7 +122,7 @@
pretty_wing_styles[instance.name] = path
// Present choice to user
- var/new_wing_style = input(src, "Pick some wings!", "Character Preference", wing_style ? wing_style.name : null) as null|anything in pretty_wing_styles
+ var/new_wing_style = tgui_input_list(src, "Pick some wings!", "Character Preference", pretty_wing_styles)
if(!new_wing_style)
return
@@ -132,7 +132,7 @@
//Allow color picks
var/current_color = rgb(r_wing,g_wing,b_wing)
- var/new_color = input("Pick wing color:","Wing Color", current_color) as null|color
+ var/new_color = input(usr, "Pick wing color:","Wing Color", current_color) as null|color
if(new_color)
var/list/new_color_rgb_list = hex2rgb(new_color)
r_wing = new_color_rgb_list[1]
@@ -142,7 +142,7 @@
//Indented inside positive primary color choice, don't bother if they clicked cancel
var/current_sec_color = rgb(r_wing2,g_wing2,b_wing2)
- var/new_sec_color = input("Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color
+ var/new_sec_color = input(usr, "Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color
if(new_sec_color)
new_color_rgb_list = hex2rgb(new_sec_color)
r_wing2 = new_color_rgb_list[1]
@@ -151,7 +151,7 @@
var/current_ter_color = rgb(r_wing3,g_wing3,b_wing3)
- var/new_ter_color = input("Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) as null|color
+ var/new_ter_color = input(usr, "Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) as null|color
if(new_ter_color)
new_color_rgb_list = hex2rgb(new_ter_color)
r_wing3 = new_color_rgb_list[1]
diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm
index e9904dd5ca2..2cb0b357fb1 100644
--- a/code/modules/mob/living/carbon/human/species/station/alraune.dm
+++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm
@@ -391,7 +391,7 @@
break
if(fruit_gland)
- var/selection = input(src, "Choose your character's fruit type. Choosing nothing will result in a default of apples.", "Fruit Type", fruit_gland.fruit_type) as null|anything in acceptable_fruit_types
+ var/selection = tgui_input_list(src, "Choose your character's fruit type. Choosing nothing will result in a default of apples.", "Fruit Type", acceptable_fruit_types)
if(selection)
fruit_gland.fruit_type = selection
verbs |= /mob/living/carbon/human/proc/alraune_fruit_pick
diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm
index a75f42c9a44..f34a18af3e8 100644
--- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm
+++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm
@@ -367,7 +367,7 @@
choices += M
choices -= src
- var/mob/living/carbon/human/B = input(src,"Who do you wish to bite?") as null|anything in choices
+ var/mob/living/carbon/human/B = tgui_input_list(src, "Who do you wish to bite?", "Suck Blood", choices)
if(!B || !src || src.stat) return
@@ -670,7 +670,7 @@
if(!choices.len)
to_chat(src,"There's nobody nearby to use this on.")
- target = input(src,"Who do you wish to target?","Damage/Remove Prey's Organ") as null|anything in choices
+ target = tgui_input_list(src,"Who do you wish to target?","Damage/Remove Prey's Organ", choices)
if(!istype(target))
return FALSE
@@ -685,7 +685,7 @@
if(!choices.len)
to_chat(src,"There's nobody nearby to use this on.")
- target = input(src,"Who do you wish to target?","Damage/Remove Prey's Organ") as null|anything in choices
+ target = tgui_input_list(src,"Who do you wish to target?","Damage/Remove Prey's Organ", choices)
if(!istype(target))
return FALSE
@@ -700,7 +700,7 @@
if(!choices.len)
to_chat(src,"There's nobody nearby to use this on.")
- target = input(src,"Who do you wish to target?","Damage/Remove Prey's Organ") as null|anything in choices
+ target = tgui_input_list(src,"Who do you wish to target?","Damage/Remove Prey's Organ", choices)
if(!istype(target))
return FALSE
@@ -717,7 +717,7 @@
return //Silent, because can_shred does messages.
//Let them pick any of the target's external organs
- var/obj/item/organ/external/T_ext = input(src,"What do you wish to severely damage?") as null|anything in T.organs //D for destroy.
+ var/obj/item/organ/external/T_ext = tgui_input_list(src, "What do you wish to severely damage?", "Organ Choice", T.organs) //D for destroy.
if(!T_ext) //Picking something here is critical.
return
if(T_ext.vital)
@@ -725,13 +725,13 @@
return //If they reconsider, don't continue.
//Any internal organ, if there are any
- var/obj/item/organ/internal/T_int = input(src,"Do you wish to severely damage an internal organ, as well? If not, click 'cancel'") as null|anything in T_ext.internal_organs
+ var/obj/item/organ/internal/T_int = tgui_input_list(src,"Do you wish to severely damage an internal organ, as well? If not, click 'cancel'", "Organ Choice", T_ext.internal_organs)
if(T_int && T_int.vital)
if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes")
return //If they reconsider, don't continue.
//And a belly, if they want
- var/obj/belly/B = input(src,"Do you wish to swallow the organ if you tear if out? If not, click 'cancel'") as null|anything in vore_organs
+ var/obj/belly/B = tgui_input_list(src,"To where do you wish to swallow the organ if you tear if out? If not at all, click 'cancel'", "Organ Choice", vore_organs)
if(can_shred(T) != T)
to_chat(src,"Looks like you lost your chance...")
@@ -883,7 +883,7 @@
var/finalized = "No"
while(finalized == "No" && src.client)
- choice = input(src,"What would you like to weave?") as null|anything in weavable_structures
+ choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_structures)
desired_result = weavable_structures[choice]
if(!desired_result || !istype(desired_result))
return
@@ -942,7 +942,7 @@
var/finalized = "No"
while(finalized == "No" && src.client)
- choice = input(src,"What would you like to weave?") as null|anything in weavable_items
+ choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_items)
desired_result = weavable_items[choice]
if(!desired_result || !istype(desired_result))
return
@@ -992,7 +992,7 @@
to_chat(src, "You are not a weaver! How are you doing this? Tell a developer!")
return
- var/new_silk_color = input("Pick a color for your woven products:","Silk Color", species.silk_color) as null|color
+ var/new_silk_color = input(usr, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color
if(new_silk_color)
species.silk_color = new_silk_color
diff --git a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm
index 19e274306b4..2065d91cc45 100644
--- a/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm
+++ b/code/modules/mob/living/carbon/human/species/station/xenochimera_trait_vr.dm
@@ -4,6 +4,7 @@
** I won't add the resistances though because those are kinda lame for a 'chimera to take!
*/
/datum/trait/positive/weaver/xenochimera
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Weaver"
desc = "You've evolved your body to produce silk that you can fashion into articles of clothing and other objects."
@@ -12,6 +13,7 @@
custom_only = FALSE
/datum/trait/positive/hardfeet/xenochimera
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Hard Feet"
desc = "Your body has adapted to make your feet immune to glass shards, whether by developing hooves, chitin, or just horrible callous."
@@ -21,6 +23,7 @@
// Why put this on Xenochimera of all species? I have no idea, but someone may be enough of a lunatic to take it.
/datum/trait/negative/neural_hypersensitivity/xenochimera
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Neural Hypersensitivity"
desc = "Despite your evolutionary efforts, you are unusually sensitive to pain. \
@@ -30,6 +33,7 @@
custom_only = FALSE
/datum/trait/positive/melee_attack_fangs/xenochimera
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Sharp Melee & Numbing Fangs"
desc = "Your hunting instincts manifest in earnest! You have grown numbing fangs alongside your naturally grown hunting weapons."
@@ -38,6 +42,7 @@
custom_only = FALSE
/datum/trait/positive/snowwalker/xenochimera
+ sort = TRAIT_SORT_SPECIES
allowed_species = list(SPECIES_XENOCHIMERA)
name = "Xenochimera: Snow Walker"
desc = "You've adapted to traversing snowy terrain. Snow does not slow you down!"
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
index 01ef3fa7f4d..8e8d70b4ee6 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
@@ -67,7 +67,7 @@
to_chat(src, "Their plasma vessel is missing.")
return
- var/amount = input("Amount:", "Transfer Plasma to [M]") as num
+ var/amount = input(usr, "Amount:", "Transfer Plasma to [M]") as num
if (amount)
amount = abs(round(amount))
if(check_alien_ability(amount,0,O_PLASMA))
@@ -231,7 +231,7 @@
set desc = "Secrete tough malleable resin."
set category = "Abilities"
- var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest","resin blob") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
+ var/choice = tgui_input_list(usr, "Choose what you wish to shape.","Resin building", list("resin door","resin wall","resin membrane","resin nest","resin blob")) //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
if(!choice)
return
@@ -277,7 +277,7 @@
choices += M
choices -= src
- var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
+ var/mob/living/T = tgui_input_list(src, "Who do you wish to leap at?", "Target Choice", choices)
if(!T || !src || src.stat) return
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 7eee24671f0..e19fa16745c 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -350,7 +350,7 @@ var/list/ai_verbs_default = list(
return
if (!custom_sprite)
- var/new_sprite = input("Select an icon!", "AI", selected_sprite) as null|anything in ai_icons
+ var/new_sprite = tgui_input_list(usr, "Select an icon!", "AI", ai_icons)
if(new_sprite) selected_sprite = new_sprite
updateicon()
@@ -603,7 +603,7 @@ var/list/ai_verbs_default = list(
if("Crew Member") //A seeable crew member (or a dog)
var/list/targets = trackable_mobs()
if(targets.len)
- input = input("Select a crew member:") as null|anything in targets //The definition of "crew member" is a little loose...
+ input = tgui_input_list(usr, "Select a crew member:", "Hologram Choice", targets) //The definition of "crew member" is a little loose...
//This is torture, I know. If someone knows a better way...
if(!input) return
var/new_holo = getHologramIcon(getCompoundIcon(targets[input]))
@@ -651,7 +651,7 @@ var/list/ai_verbs_default = list(
"male skrell",
"female skrell"
)
- input = input("Please select a hologram:") as null|anything in icon_list
+ input = tgui_input_list(usr, "Please select a hologram:", "Hologram Choice", icon_list)
if(input)
qdel(holo_icon)
switch(input)
diff --git a/code/modules/mob/living/silicon/ai/ai_remote_control.dm b/code/modules/mob/living/silicon/ai/ai_remote_control.dm
index 3e976784258..768aba02f5e 100644
--- a/code/modules/mob/living/silicon/ai/ai_remote_control.dm
+++ b/code/modules/mob/living/silicon/ai/ai_remote_control.dm
@@ -34,7 +34,7 @@
to_chat(src, span("warning", "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 = tgui_input_list(src, "Which body to control?", "Shell Choice", possible)
if(!target || target.stat == DEAD || target.deployed || !(!target.connected_ai || (target.connected_ai == src) ) )
if(target)
diff --git a/code/modules/mob/living/silicon/pai/admin.dm b/code/modules/mob/living/silicon/pai/admin.dm
index 9ef49b834db..f3d8e495c1f 100644
--- a/code/modules/mob/living/silicon/pai/admin.dm
+++ b/code/modules/mob/living/silicon/pai/admin.dm
@@ -7,7 +7,7 @@
return
if(!pai_key)
- var/client/C = input("Select client") as null|anything in GLOB.clients
+ var/client/C = tgui_input_list(usr, "Select client:", "Client Choice", GLOB.clients)
if(!C) return
pai_key = C.key
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index bd045a80b07..a767c613b42 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -223,43 +223,6 @@
src.unset_machine()
src.cameraFollow = null
-//Addition by Mord_Sith to define AI's network change ability
-/*
-/mob/living/silicon/pai/proc/pai_network_change()
- set category = "pAI Commands"
- set name = "Change Camera Network"
- src.reset_view(null)
- src.unset_machine()
- src.cameraFollow = null
- var/cameralist[0]
-
- if(usr.stat == 2)
- to_chat(usr, "You can't change your camera network because you are dead!")
- return
-
- for (var/obj/machinery/camera/C in Cameras)
- if(!C.status)
- continue
- else
- if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "phoron" && C.network != "Prison") COMPILE ERROR! This will have to be updated as camera.network is no longer a string, but a list instead
- cameralist[C.network] = C.network
-
- src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist
- to_chat(src, "Switched to [src.network] camera network.")
-//End of code by Mord_Sith
-*/
-
-
-/*
-// Debug command - Maybe should be added to admin verbs later
-/mob/verb/makePAI(var/turf/t in view())
- var/obj/item/device/paicard/card = new(t)
- var/mob/living/silicon/pai/pai = new(card)
- pai.key = src.key
- card.setPersonality(pai)
-
-*/
-
// Procs/code after this point is used to convert the stationary pai item into a
// mobile pai mob. This also includes handling some of the general shit that can occur
// to it. Really this deserves its own file, but for the moment it can sit here. ~ Z
@@ -339,7 +302,7 @@
var/finalized = "No"
while(finalized == "No" && src.client)
- choice = input(usr,"What would you like to use for your mobile chassis icon?") as null|anything in possible_chassis
+ choice = tgui_input_list(usr,"What would you like to use for your mobile chassis icon?","Chassis Choice", possible_chassis)
if(!choice) return
icon_state = possible_chassis[choice]
@@ -354,7 +317,7 @@
set category = "pAI Commands"
set name = "Choose Speech Verbs"
- var/choice = input(usr,"What theme would you like to use for your speech verbs?") as null|anything in possible_say_verbs
+ var/choice = tgui_input_list(usr,"What theme would you like to use for your speech verbs?","Theme Choice", possible_say_verbs)
if(!choice) return
var/list/sayverbs = possible_say_verbs[choice]
diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm
index b8eb2283265..4b36a26ce59 100644
--- a/code/modules/mob/living/silicon/pai/pai_vr.dm
+++ b/code/modules/mob/living/silicon/pai/pai_vr.dm
@@ -68,7 +68,7 @@
set name = "Choose Chassis"
var/choice
- choice = input(usr,"What would you like to use for your mobile chassis icon?") as null|anything in possible_chassis
+ choice = tgui_input_list(usr, "What would you like to use for your mobile chassis icon?", "Chassis Choice", possible_chassis)
if(!choice) return
chassis = possible_chassis[choice]
verbs |= /mob/living/proc/hide
diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm
index 13e1780a9e5..ffd817d9c48 100644
--- a/code/modules/mob/living/silicon/pai/recruit.dm
+++ b/code/modules/mob/living/silicon/pai/recruit.dm
@@ -55,19 +55,19 @@ var/datum/paiController/paiController // Global handler for pAI candidates
switch(option)
if("name")
- t = sanitizeSafe(input("Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN)
+ t = sanitizeSafe(input(usr, "Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN)
if(t)
candidate.name = t
if("desc")
- t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
+ t = input(usr, "Enter a description for your pAI", "pAI Description", candidate.description) as message
if(t)
candidate.description = sanitize(t)
if("role")
- t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
+ t = input(usr, "Enter a role for your pAI", "pAI Role", candidate.role) as text
if(t)
candidate.role = sanitize(t)
if("ooc")
- t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
+ t = input(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
if(t)
candidate.comments = sanitize(t)
if("save")
diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm
index e518e74a4a2..1fb28a58fd2 100644
--- a/code/modules/mob/living/silicon/pai/software_modules.dm
+++ b/code/modules/mob/living/silicon/pai/software_modules.dm
@@ -71,7 +71,7 @@
// Check the carrier
var/datum/gender/TM = gender_datums[M.get_visible_gender()]
- var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
+ var/answer = tgui_alert(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No"))
if(answer == "Yes")
var/turf/T = get_turf(P.loc)
for (var/mob/v in viewers(T))
diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm
index a0fe3a017c4..0d909652e0e 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm
@@ -398,7 +398,7 @@
choices += M
choices -= src
- var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
+ var/mob/living/T = tgui_input_list(src,"Who do you wish to leap at?","Target Choice", choices)
if(!T || !src || src.stat) return
@@ -455,7 +455,7 @@
options["Whiskey Soda"] = "Liqour Licker"
options["Grape Soda"] = "The Grapist"
options["Demon's Blood"] = "Vampire's Aid"
- var/choice = input(M,"Choose your drink!") in options
+ var/choice = tgui_input_list(M, "Choose your drink!", "Drink Choice", options)
if(src && choice && !M.stat && in_range(M,src))
icontype = options[choice]
var/active_sound = 'sound/effects/bubbles.ogg'
diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
index 8d5fcee0d14..c7a5c13028b 100644
--- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
+++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm
@@ -345,7 +345,7 @@
sleeperUI(usr)
return
if(href_list["deliveryslot"])
- var/tag = input("Select active delivery slot.") as null|anything in deliverylists
+ var/tag = tgui_input_list(usr, "Select active delivery slot:", "Slot Choice", deliverylists)
if(!tag)
return 0
delivery_tag = tag
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm
index a799e2a1c9b..d045c14081c 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm
@@ -4,7 +4,7 @@
set desc = "Tag yourself for delivery through the disposals system."
set category = "Robot Commands"
- var/new_tag = input("Select the desired destination.", "Set Mail Tag", null) as null|anything in GLOB.tagger_locations
+ var/new_tag = tgui_input_list(usr, "Select the desired destination.", "Set Mail Tag", GLOB.tagger_locations)
if(!new_tag)
mail_destination = ""
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
index fc8b033681c..a3e8d71f480 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
@@ -154,7 +154,7 @@
to_chat(src, "There are no available drone spawn points, sorry.")
return
- var/choice = input(src,"Which fabricator do you wish to use?") as null|anything in all_fabricators
+ var/choice = tgui_input_list(src, "Which fabricator do you wish to use?", "Fabricator Choice", all_fabricators)
if(choice)
var/obj/machinery/drone_fabricator/chosen_fabricator = all_fabricators[choice]
chosen_fabricator.create_drone(src.client)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 4164b13e24b..b77a61104e2 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -274,7 +274,7 @@
modules+="Combat"
modules+="ERT"
//VOREStatation Edit End: shell restrictions
- modtype = input("Please, select a module!", "Robot module", null, null) as null|anything in modules
+ modtype = tgui_input_list(usr, "Please, select a module!", "Robot module", modules)
if(module)
return
@@ -403,7 +403,7 @@
if(C.installed)
installed_components += V
- var/toggle = input(src, "Which component do you want to toggle?", "Toggle Component") as null|anything in installed_components
+ var/toggle = tgui_input_list(src, "Which component do you want to toggle?", "Toggle Component", installed_components)
if(!toggle)
return
@@ -580,7 +580,7 @@
if(C.installed == 1 || C.installed == -1)
removable_components += V
- var/remove = input(user, "Which component do you want to pry out?", "Remove Component") as null|anything in removable_components
+ var/remove = tgui_input_list(user, "Which component do you want to pry out?", "Remove Component", removable_components)
if(!remove)
return
var/datum/robot_component/C = components[remove]
@@ -1021,7 +1021,7 @@
if(!(icontype in module_sprites))
icontype = module_sprites[1]
else
- icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", icontype, null) in module_sprites
+ icontype = tgui_input_list(usr, "Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot Icon", module_sprites)
if(notransform) //VOREStation edit start: sprite animation
to_chat(src, "Your current transformation has not finished yet!")
choose_icon(icon_selection_tries, module_sprites)
@@ -1038,8 +1038,8 @@
if (module_sprites.len > 1 && triesleft >= 1 && client)
icon_selection_tries--
- var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
- if(choice=="No")
+ var/choice = tgui_alert(usr, "Look at your icon - is this what you want?", "Icon Choice", list("Yes","No"))
+ if(choice == "No")
choose_icon(icon_selection_tries, module_sprites)
return
diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm
index 30fc9f1048d..d8212d2904b 100644
--- a/code/modules/mob/living/silicon/robot/robot_items.dm
+++ b/code/modules/mob/living/silicon/robot/robot_items.dm
@@ -273,15 +273,16 @@
/obj/item/weapon/pen/robopen/attack_self(mob/user as mob)
- var/choice = input("Would you like to change colour or mode?") as null|anything in list("Colour","Mode")
- if(!choice) return
+ var/choice = tgui_alert(usr, "Would you like to change colour or mode?", "Change What?", list("Colour","Mode","Cancel"))
+ if(!choice || choice == "Cancel")
+ return
playsound(src, 'sound/effects/pop.ogg', 50, 0)
switch(choice)
if("Colour")
- var/newcolour = input("Which colour would you like to use?") as null|anything in list("black","blue","red","green","yellow")
+ var/newcolour = tgui_input_list(usr, "Which colour would you like to use?", list("black","blue","red","green","yellow"))
if(newcolour) colour = newcolour
if("Mode")
@@ -400,7 +401,7 @@
set category = "Object"
set src in range(0)
- var/N = input("How much damage should the shield absorb?") in list("5","10","25","50","75","100")
+ var/N = tgui_input_list(usr, "How much damage should the shield absorb?", list("5","10","25","50","75","100"))
if (N)
shield_level = text2num(N)/100
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 694d3a80a10..61df11b48ff 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -222,7 +222,7 @@
. += "[L.name] ([get_language_prefix()][L.key])[synth ? default_str : null]
Speech Synthesizer: [synth ? "YES" : "NOT SUPPORTED"]
[L.desc]
"
/mob/living/silicon/proc/toggle_sensor_mode()
- var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security","Medical","Disable")
+ var/sensor_type = tgui_input_list(usr, "Please select sensor type.", "Sensor Integration", list("Security","Medical","Disable"))
switch(sensor_type)
if ("Security")
if(plane_holder)
diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
index 0914326cf27..c66b982b7db 100644
--- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm
+++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm
@@ -408,7 +408,7 @@
choices += M
choices -= src
- var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
+ var/mob/living/T = tgui_input_list(src, "Who do you wish to leap at?", "Target Choice", choices)
if(!T || !src || src.stat) return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm
index e1f7535bf84..f900622a8df 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm
@@ -241,7 +241,7 @@
nearby_mobs += LM
var/mob/living/speaker
if(nearby_mobs.len)
- speaker = input("Choose a target speaker.") as null|anything in nearby_mobs
+ speaker = tgui_input_list(usr, "Choose a target speaker:", "Target Choice", nearby_mobs)
if(speaker)
log_admin("[src.ckey]/([src]) tried to force [speaker] to say: [message]")
message_admins("[src.ckey]/([src]) tried to force [speaker] to say: [message]")
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
index cc60d888112..866c595492a 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm
@@ -60,7 +60,7 @@
to_chat(src, "There are no viable hosts within range...")
return
- var/mob/living/carbon/M = input(src,"Who do you wish to infest?") in null|choices
+ var/mob/living/carbon/M = tgui_input_list(src, "Who do you wish to infest?", "Target Choice", choices)
if(!M || !src) return
@@ -217,7 +217,7 @@
if(chemicals < 50)
to_chat(src, "You don't have enough chemicals!")
- var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in list("alkysine","bicaridine","hyperzine","tramadol")
+ var/chem = tgui_input_list(usr, "Select a chemical to secrete.", "Chemicals", list("alkysine","bicaridine","hyperzine","tramadol"))
if(!chem || chemicals < 50 || !host || controlling || !src || stat) //Sanity check.
return
@@ -252,7 +252,7 @@
to_chat(src, "You cannot use that ability again so soon.")
return
- var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
+ var/mob/living/carbon/M = tgui_input_list(src, "Who do you wish to dominate?", "Target Choice", choices)
if(!M || !src) return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
index 8a54faf8745..301edc38727 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm
@@ -171,7 +171,7 @@
if(!choices.len)
choices["radial"] = get_turf(src)
- A = input(src,"What do we wish to flash?") in null|choices
+ A = tgui_input_list(src, "What do we wish to flash?", "Target Choice", choices)
visible_message(span("alien","\The [src] flares its tails!"))
@@ -256,7 +256,7 @@
to_chat(src, span("warning","There are no viable targets within range..."))
return
- A = input(src,"What do we wish to strike?") in null|choices
+ A = tgui_input_list(src, "What do we wish to strike?", "Target Choice", choices)
if(!A || !src) return
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
index edc2b9eac05..38e20ff4803 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm
@@ -260,7 +260,7 @@
to_chat(user, span("warning","There are no viable hosts within range..."))
return
- M = input(src,"Who do we wish to infest?") in null|choices
+ M = tgui_input_list(src, "Who do we wish to infest?", "Target Choice", choices)
if(!M || !src) return
@@ -359,7 +359,7 @@
to_chat(src, span("warning","There are no viable hosts within range..."))
return
- M = input(src,"Who do we wish to inject?") in null|choices
+ M = tgui_input_list(src, "Who do we wish to inject?", "Target Choice", choices)
if(!M || stat)
return
@@ -401,7 +401,7 @@
return
if(host)
- var/chem = input("Select a chemical to produce.", "Chemicals") as null|anything in produceable_chemicals
+ var/chem = tgui_input_list(usr, "Select a chemical to produce.", "Chemicals", produceable_chemicals)
inject_meds(chem)
/mob/living/simple_mob/animal/sif/leech/proc/inject_meds(var/chem)
@@ -428,7 +428,7 @@
var/target
if(client)
- target = input("Select an organ to feed on.", "Organs") as null|anything in host_internal_organs
+ target = tgui_input_list(usr, "Select an organ to feed on.", "Organs", host_internal_organs)
if(!target)
to_chat(src, span("alien","We decide not to feed."))
return
diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm
index 5071f10b347..5c9fe28c2f1 100644
--- a/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/golem.dm
@@ -85,7 +85,7 @@
active_spell = new path(src)
/mob/living/simple_mob/mechanical/technomancer_golem/verb/test_giving_spells()
- var/choice = input(usr, "What spell?", "Give spell") as null|anything in known_spells
+ var/choice = tgui_input_list(usr, "What spell?", "Give spell", known_spells)
if(choice)
place_spell_in_hand(known_spells[choice])
else
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/hespawner.dm b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/hespawner.dm
index 585fdab8938..f92a9a07e66 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/hespawner.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/mobs_monsters/clowns/hespawner.dm
@@ -18,7 +18,7 @@
/obj/structure/ghost_pod/manual/clegg/create_occupant(var/mob/M)
lightning_strike(get_turf(src), cosmetic = TRUE)
var/list/choices = list(/mob/living/simple_mob/mobs_monsters/clowns/normal, /mob/living/simple_mob/mobs_monsters/clowns/honkling, /mob/living/simple_mob/mobs_monsters/clowns/mayor, /mob/living/simple_mob/mobs_monsters/clowns/blob, /mob/living/simple_mob/mobs_monsters/clowns/mutant, /mob/living/simple_mob/mobs_monsters/clowns/clowns, /mob/living/simple_mob/mobs_monsters/clowns/flesh, /mob/living/simple_mob/mobs_monsters/clowns/scary, /mob/living/simple_mob/mobs_monsters/clowns/chlown, /mob/living/simple_mob/mobs_monsters/clowns/destroyer, /mob/living/simple_mob/mobs_monsters/clowns/giggles, /mob/living/simple_mob/mobs_monsters/clowns/longface, /mob/living/simple_mob/mobs_monsters/clowns/hulk, /mob/living/simple_mob/mobs_monsters/clowns/thin, /mob/living/simple_mob/mobs_monsters/clowns/wide, /mob/living/simple_mob/mobs_monsters/clowns/perm, /mob/living/simple_mob/mobs_monsters/clowns/thicc, /mob/living/simple_mob/mobs_monsters/clowns/punished, /mob/living/simple_mob/mobs_monsters/clowns/sentinel, /mob/living/simple_mob/mobs_monsters/clowns/tunnelclown, /mob/living/simple_mob/mobs_monsters/clowns/cluwne, /mob/living/simple_mob/mobs_monsters/clowns/honkmunculus)
- var/chosen_clown = input(M, "Redspace clowns like themes, what's yours?") in choices
+ var/chosen_clown = tgui_input_list(M, "Redspace clowns like themes, what's yours?", "Theme Choice", choices)
density = FALSE
var/mob/living/simple_mob/R = new chosen_clown(get_turf(src))
if(M.mind)
diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
index 689f6cce7b0..208030125d4 100644
--- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/ability_procs.dm
@@ -125,7 +125,7 @@
to_chat(src,"Nobody nearby to mend!")
return FALSE
- var/mob/living/target = input(src,"Pick someone to mend:","Mend Other") as null|anything in targets
+ var/mob/living/target = tgui_input_list(src,"Pick someone to mend:","Mend Other", targets)
if(!target)
return FALSE
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 96c974c5ecd..d8040cdc0b8 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -433,7 +433,7 @@
var/eye_name = null
var/ok = "[is_admin ? "Admin Observe" : "Observe"]"
- eye_name = input("Please, select a player!", ok, null, null) as null|anything in targets
+ eye_name = tgui_input_list(usr, "Select something to [ok]:", "Select Target", targets)
if (!eye_name)
return
@@ -887,7 +887,7 @@
to_chat(U, "[src] has nothing stuck in their wounds that is large enough to remove.")
return
- var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
+ var/obj/item/weapon/selection = tgui_input_list(usr, "What do you want to yank out?", "Embedded objects", valid_objects)
if(self)
to_chat(src, "You attempt to get a good grip on [selection] in your body.")
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index 0c35f52a407..b3a1f39454d 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -9,7 +9,7 @@
return
if(!new_type)
- new_type = input("Mob type path:", "Mob type") as text|null
+ new_type = input(usr, "Mob type path:", "Mob type") as text|null
if(istext(new_type))
new_type = text2path(new_type)
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 47ccbfac25e..fb8410e0fac 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -250,7 +250,7 @@
/mob/living/carbon/human/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_mob)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes)
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
@@ -284,7 +284,7 @@
/mob/proc/Animalize()
var/list/mobtypes = typesof(/mob/living/simple_mob)
- var/mobpath = input("Which type of mob should [src] turn into?", "Choose a type") in mobtypes
+ var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes)
if(!safe_animal(mobpath))
to_chat(usr, "Sorry but this mob type is currently unavailable.")
diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm
index bf4a770f54d..c3c5a1450dd 100644
--- a/code/modules/mob/typing_indicator.dm
+++ b/code/modules/mob/typing_indicator.dm
@@ -43,7 +43,7 @@
set hidden = 1
set_typing_indicator(TRUE)
- var/message = input("","say (text)") as text
+ var/message = input(usr, "","say (text)") as text
set_typing_indicator(FALSE)
if(message)
@@ -54,7 +54,7 @@
set hidden = 1
set_typing_indicator(TRUE)
- var/message = input("","me (text)") as message //VOREStation Edit
+ var/message = input(usr, "","me (text)") as message //VOREStation Edit
set_typing_indicator(FALSE)
if(message)
diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm
index 1c3daa20927..d7e8573010e 100644
--- a/code/modules/modular_computers/computers/modular_computer/interaction.dm
+++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm
@@ -180,7 +180,7 @@
for(var/obj/item/weapon/computer_hardware/H in all_components)
component_names.Add(H.name)
- var/choice = input(usr, "Which component do you want to uninstall?", "Computer maintenance", null) as null|anything in component_names
+ var/choice = tgui_input_list(usr, "Which component do you want to uninstall?", "Computer maintenance", component_names)
if(!choice)
return
diff --git a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm
index f56683451e5..33aaa2120cd 100644
--- a/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm
+++ b/code/modules/modular_computers/computers/subtypes/dev_telescreen.dm
@@ -34,7 +34,7 @@
pixel_y = 0
to_chat(user, "You unsecure \the [src].")
else
- var/choice = input(user, "Where do you want to place \the [src]?", "Offset selection") in list("North", "South", "West", "East", "This tile", "Cancel")
+ var/choice = tgui_input_list(user, "Where do you want to place \the [src]?", "Offset selection", list("North", "South", "West", "East", "This tile", "Cancel"))
var/valid = FALSE
switch(choice)
if("North")
diff --git a/code/modules/modular_computers/file_system/programs/research/email_administration.dm b/code/modules/modular_computers/file_system/programs/research/email_administration.dm
index eb9dfd71a68..0ad80422cb1 100644
--- a/code/modules/modular_computers/file_system/programs/research/email_administration.dm
+++ b/code/modules/modular_computers/file_system/programs/research/email_administration.dm
@@ -117,7 +117,7 @@
return TRUE
if("newaccount")
- var/newdomain = sanitize(input(usr,"Pick domain:", "Domain name") as null|anything in using_map.usable_email_tlds)
+ var/newdomain = sanitize(tgui_input_list(usr,"Pick domain:", "Domain name", using_map.usable_email_tlds))
if(!newdomain)
return TRUE
var/newlogin = sanitize(input(usr,"Pick account name (@[newdomain]):", "Account name"), 100)
diff --git a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm
index 9cac7c920cd..752d6d849ef 100644
--- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm
+++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm
@@ -80,14 +80,16 @@ var/warrant_uid = 0
if("addwarrant")
. = TRUE
var/datum/data/record/warrant/W = new()
- var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest"))
+ var/temp = tgui_alert(usr, "Do you want to create a search-, or an arrest warrant?", "Warrant Type", list("Search","Arrest","Cancel"))
+ if(!temp)
+ return
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
- if(temp == "arrest")
+ if(temp == "Arrest")
W.fields["namewarrant"] = "Unknown"
W.fields["charges"] = "No charges present"
W.fields["auth"] = "Unauthorized"
W.fields["arrestsearch"] = "arrest"
- if(temp == "search")
+ if(temp == "Search")
W.fields["namewarrant"] = "No suspect/location given" // VOREStation edit
W.fields["charges"] = "No reason given"
W.fields["auth"] = "Unauthorized"
@@ -109,7 +111,7 @@ var/warrant_uid = 0
var/namelist = list()
for(var/datum/data/record/t in data_core.general)
namelist += t.fields["name"]
- var/new_name = sanitize(input(usr, "Please input name") as null|anything in namelist)
+ var/new_name = sanitize(tgui_input_list(usr, "Please input name:", "Name Choice", namelist))
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_name)
return
@@ -117,7 +119,7 @@ var/warrant_uid = 0
if("editwarrantnamecustom")
. = TRUE
- var/new_name = sanitize(input("Please input name") as null|text)
+ var/new_name = sanitize(input(usr, "Please input name") as null|text)
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_name)
return
@@ -125,7 +127,7 @@ var/warrant_uid = 0
if("editwarrantcharges")
. = TRUE
- var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
+ var/new_charges = sanitize(input(usr, "Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_charges)
return
diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm
index 4aaa6584685..19f3d344179 100644
--- a/code/modules/modular_computers/laptop_vendor.dm
+++ b/code/modules/modular_computers/laptop_vendor.dm
@@ -285,7 +285,7 @@
return 0
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
+ var/attempt_pin = input(usr, "Enter pin code", "Vendor transaction") as num
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm
index a182ee19611..6bb95364263 100644
--- a/code/modules/nifsoft/software/13_soulcatcher.dm
+++ b/code/modules/nifsoft/software/13_soulcatcher.dm
@@ -123,7 +123,7 @@
"AR Projecting \[[setting_flags & NIF_SC_PROJECTING ? "Enabled" : "Disabled"]\]" = NIF_SC_PROJECTING,
"Design Inside",
"Erase Contents")
- var/choice = input(nif.human,"Select a setting to modify:","Soulcatcher NIFSoft") as null|anything in settings_list
+ var/choice = tgui_input_list(nif.human,"Select a setting to modify:","Soulcatcher NIFSoft", settings_list)
if(choice in settings_list)
switch(choice)
@@ -142,7 +142,7 @@
return TRUE
if("Erase Contents")
- var/mob/living/carbon/brain/caught_soul/brainpick = input(nif.human,"Select a mind to delete:","Erase Mind") as null|anything in brainmobs
+ var/mob/living/carbon/brain/caught_soul/brainpick = tgui_input_list(nif.human,"Select a mind to delete:","Erase Mind", brainmobs)
var/warning = tgui_alert(nif.human,"Are you SURE you want to erase \"[brainpick]\"?","Erase Mind",list("CANCEL","DELETE"))
if(warning == "DELETE")
@@ -502,7 +502,7 @@
to_chat(src,SPAN_WARNING("You need a loaded mind to use NSay."))
return
if(!message)
- message = input("Type a message to say.","Speak into Soulcatcher") as text|null
+ message = input(usr, "Type a message to say.","Speak into Soulcatcher") as text|null
if(message)
var/sane_message = sanitize(message)
SC.say_into(sane_message,src)
@@ -533,7 +533,7 @@
return
if(!message)
- message = input("Type an action to perform.","Emote into Soulcatcher") as text|null
+ message = input(usr, "Type an action to perform.","Emote into Soulcatcher") as text|null
if(message)
var/sane_message = sanitize(message)
SC.emote_into(sane_message,src)
@@ -588,7 +588,7 @@
set category = "Soulcatcher"
if(!message)
- message = input("Type a message to say.","Speak into Soulcatcher") as text|null
+ message = input(usr, "Type a message to say.","Speak into Soulcatcher") as text|null
if(message)
var/sane_message = sanitize(message)
soulcatcher.say_into(sane_message,src,null)
@@ -599,7 +599,7 @@
set category = "Soulcatcher"
if(!message)
- message = input("Type an action to perform.","Emote into Soulcatcher") as text|null
+ message = input(usr, "Type an action to perform.","Emote into Soulcatcher") as text|null
if(message)
var/sane_message = sanitize(message)
soulcatcher.emote_into(sane_message,src,null)
diff --git a/code/modules/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm
index b4a4e40933d..46db84c235f 100644
--- a/code/modules/nifsoft/software/15_misc.dm
+++ b/code/modules/nifsoft/software/15_misc.dm
@@ -127,7 +127,7 @@
/datum/nifsoft/sizechange/activate()
if((. = ..()))
- var/new_size = input("Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
+ var/new_size = input(usr, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
if (!nif.human.size_range_check(new_size))
if(new_size)
diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm
index 18429b1de94..79d22fe5770 100644
--- a/code/modules/organs/internal/eyes.dm
+++ b/code/modules/organs/internal/eyes.dm
@@ -37,7 +37,7 @@
set src in usr
var/current_color = rgb(eye_colour[1],eye_colour[2],eye_colour[3])
- var/new_color = input("Pick a new color for your eyes.","Eye Color", current_color) as null|color
+ var/new_color = input(usr, "Pick a new color for your eyes.","Eye Color", current_color) as null|color
if(new_color && owner)
// input() supplies us with a hex color, which we can't use, so we convert it to rbg values.
var/list/new_color_rgb_list = hex2rgb(new_color)
diff --git a/code/modules/overmap/champagne.dm b/code/modules/overmap/champagne.dm
index 463f18eb2b9..477f9cc0722 100644
--- a/code/modules/overmap/champagne.dm
+++ b/code/modules/overmap/champagne.dm
@@ -27,7 +27,7 @@
return
user.visible_message("[user] lifts [src] bottle over [comp]!")
- var/shuttle_name = input("Choose a name for the shuttle", "New Shuttle Name") as null|text
+ var/shuttle_name = input(usr, "Choose a name for the shuttle", "New Shuttle Name") as null|text
if(!shuttle_name || QDELETED(src) || QDELETED(comp) || comp.shuttle_tag || user.incapacitated())
return // After input() safety re-checks
diff --git a/code/modules/overmap/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm
index cb2a8cea32a..789d768e6bc 100644
--- a/code/modules/overmap/disperser/disperser_console.dm
+++ b/code/modules/overmap/disperser/disperser_console.dm
@@ -177,7 +177,7 @@
. = TRUE
if("calibration")
- var/input = input("0-9", "disperser calibration", 0) as num|null
+ var/input = input(usr, "0-9", "disperser calibration", 0) as num|null
if(!isnull(input)) //can be zero so we explicitly check for null
var/calnum = sanitize_integer(text2num(params["calibration"]), 0, caldigit)//sanitiiiiize
calibration[calnum + 1] = sanitize_integer(input, 0, 9, 0)//must add 1 because js indexes from 0
@@ -189,14 +189,14 @@
. = TRUE
if("strength")
- var/input = input("1-5", "disperser strength", 1) as num|null
+ var/input = input(usr, "1-5", "disperser strength", 1) as num|null
if(input && tgui_status(usr, state) == STATUS_INTERACTIVE)
strength = sanitize_integer(input, 1, 5, 1)
middle.update_idle_power_usage(strength * range * 100)
. = TRUE
if("range")
- var/input = input("1-5", "disperser radius", 1) as num|null
+ var/input = input(usr, "1-5", "disperser radius", 1) as num|null
if(input && tgui_status(usr, state) == STATUS_INTERACTIVE)
range = sanitize_integer(input, 1, 5, 1)
middle.update_idle_power_usage(strength * range * 100)
diff --git a/code/modules/overmap/ships/computers/engine_control.dm b/code/modules/overmap/ships/computers/engine_control.dm
index 267381d9a4d..52342e23d3b 100644
--- a/code/modules/overmap/ships/computers/engine_control.dm
+++ b/code/modules/overmap/ships/computers/engine_control.dm
@@ -55,7 +55,7 @@
. = TRUE
if("set_global_limit")
- var/newlim = input("Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
+ var/newlim = input(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
linked.thrust_limit = clamp(newlim/100, 0, 1)
@@ -71,7 +71,7 @@
if("set_limit")
var/datum/ship_engine/E = locate(params["engine"])
- var/newlim = input("Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
+ var/newlim = input(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
var/limit = clamp(newlim/100, 0, 1)
diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm
index 16a44332cb7..8de83e1a725 100644
--- a/code/modules/overmap/ships/computers/helm.dm
+++ b/code/modules/overmap/ships/computers/helm.dm
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
switch(action)
if("add")
var/datum/computer_file/data/waypoint/R = new()
- var/sec_name = input("Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
+ var/sec_name = input(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(!sec_name)
@@ -163,10 +163,10 @@ GLOBAL_LIST_EMPTY(all_waypoints)
R.fields["x"] = linked.x
R.fields["y"] = linked.y
if("new")
- var/newx = input("Input new entry x coordinate", "Coordinate input", linked.x) as num
+ var/newx = input(usr, "Input new entry x coordinate", "Coordinate input", linked.x) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return TRUE
- var/newy = input("Input new entry y coordinate", "Coordinate input", linked.y) as num
+ var/newy = input(usr, "Input new entry y coordinate", "Coordinate input", linked.y) as num
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
R.fields["x"] = CLAMP(newx, 1, world.maxx)
@@ -183,14 +183,14 @@ GLOBAL_LIST_EMPTY(all_waypoints)
if("setcoord")
if(params["setx"])
- var/newx = input("Input new destiniation x coordinate", "Coordinate input", dx) as num|null
+ var/newx = input(usr, "Input new destiniation x coordinate", "Coordinate input", dx) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newx)
dx = CLAMP(newx, 1, world.maxx)
if(params["sety"])
- var/newy = input("Input new destiniation y coordinate", "Coordinate input", dy) as num|null
+ var/newy = input(usr, "Input new destiniation y coordinate", "Coordinate input", dy) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newy)
@@ -208,13 +208,13 @@ GLOBAL_LIST_EMPTY(all_waypoints)
. = TRUE
if("speedlimit")
- var/newlimit = input("Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
+ var/newlimit = input(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
if(newlimit)
speedlimit = CLAMP(newlimit/1000, 0, 100)
. = TRUE
if("accellimit")
- var/newlimit = input("Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
+ var/newlimit = input(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
if(newlimit)
accellimit = max(newlimit/1000, 0)
. = TRUE
diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm
index 30c9ed36320..f0cdf89afa5 100644
--- a/code/modules/overmap/ships/computers/sensors.dm
+++ b/code/modules/overmap/ships/computers/sensors.dm
@@ -99,7 +99,7 @@
if(sensors)
switch(action)
if("range")
- var/nrange = input("Set new sensors range", "Sensor range", sensors.range) as num|null
+ var/nrange = input(usr, "Set new sensors range", "Sensor range", sensors.range) as num|null
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(nrange)
diff --git a/code/modules/overmap/ships/computers/shuttle.dm b/code/modules/overmap/ships/computers/shuttle.dm
index 76c0d3e6d15..8426f1ba2a2 100644
--- a/code/modules/overmap/ships/computers/shuttle.dm
+++ b/code/modules/overmap/ships/computers/shuttle.dm
@@ -43,7 +43,7 @@
var/list/possible_d = shuttle.get_possible_destinations()
var/D
if(possible_d.len)
- D = input("Choose shuttle destination", "Shuttle Destination") as null|anything in possible_d
+ D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d)
else
to_chat(usr,"No valid landing sites in range.")
possible_d = shuttle.get_possible_destinations()
diff --git a/code/modules/paperwork/adminpaper.dm b/code/modules/paperwork/adminpaper.dm
index 378dc483c9a..d5af66f01e3 100644
--- a/code/modules/paperwork/adminpaper.dm
+++ b/code/modules/paperwork/adminpaper.dm
@@ -87,7 +87,7 @@
to_chat(usr, "There isn't enough space left on \the [src] to write anything.")
return
- var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, free_space, extra = 0)
+ var/t = sanitize(input(usr, "Enter what you want to write:", "Write", null, null) as message, free_space, extra = 0)
if(!t)
return
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index f65b71c9ca7..731dfa80d3f 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -125,7 +125,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
if("dept")
var/lastdestination = destination
- destination = input(usr, "Which department?", "Choose a department", "") as null|anything in (alldepartments + admin_departments)
+ destination = tgui_input_list(usr, "Which department?", "Choose a department", (alldepartments + admin_departments))
if(!destination)
destination = lastdestination
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index fe863752bea..2a3e181913e 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -425,7 +425,7 @@
to_chat(usr, "There isn't enough space left on \the [src] to write anything.")
return
- var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
+ var/t = sanitize(input(usr, "Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN, extra = 0)
if(!t)
return
diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm
index 5c1efb2a28c..4332be7762d 100644
--- a/code/modules/paperwork/paper_sticky.dm
+++ b/code/modules/paperwork/paper_sticky.dm
@@ -34,7 +34,7 @@
if(writing_space <= 0)
to_chat(user, SPAN_WARNING("There is no room left on \the [src]."))
return
- var/text = sanitizeSafe(input("What would you like to write?") as text, writing_space)
+ var/text = sanitizeSafe(input(usr, "What would you like to write?") as text, writing_space)
if(!text || thing.loc != user || (!Adjacent(user) && loc != user) || user.incapacitated())
return
user.visible_message(SPAN_NOTICE("\The [user] jots a note down on \the [src]."))
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 6601e7965c1..2b0008440c7 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -231,11 +231,11 @@
personnel_list.Add(t.fields["name"])
personnel_list.Add("Anonymous")
- var/new_signature = input("Enter new signature pattern.", "New Signature") as null|anything in personnel_list
+ var/new_signature = tgui_input_list(usr, "Enter new signature pattern.", "New Signature", personnel_list)
if(new_signature)
signature = new_signature
*/
- signature = sanitize(input("Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature))
+ signature = sanitize(input(usr, "Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature))
/obj/item/weapon/pen/proc/get_signature(var/mob/user)
return (user && user.real_name) ? user.real_name : "Anonymous"
@@ -248,7 +248,7 @@
set category = "Object"
var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red", "Invisible", "Black")
- var/selected_type = input("Pick new colour.", "Pen Colour", null, null) as null|anything in possible_colours
+ var/selected_type = tgui_input_list(usr, "Pick new colour.", "Pen Colour", possible_colours)
if(selected_type)
switch(selected_type)
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index c4460e5dcf5..6343cd0d19e 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -140,7 +140,7 @@ var/global/photo_count = 0
/obj/item/device/camera/verb/change_size()
set name = "Set Photo Focus"
set category = "Object"
- var/nsize = input("Photo Size","Pick a size of resulting photo.") as null|anything in list(1,3,5,7)
+ var/nsize = tgui_input_list(usr, "Photo Size","Pick a size of resulting photo.", list(1,3,5,7))
if(nsize)
size = nsize
to_chat(usr, "Camera will now take [size]x[size] photos.")
diff --git a/code/modules/paperwork/silicon_photography.dm b/code/modules/paperwork/silicon_photography.dm
index dd00694df74..6ee94c0a5ad 100644
--- a/code/modules/paperwork/silicon_photography.dm
+++ b/code/modules/paperwork/silicon_photography.dm
@@ -43,7 +43,7 @@
return
for(var/obj/item/weapon/photo/t in cam.aipictures)
nametemp += t.name
- find = input("Select image (numbered in order taken)") as null|anything in nametemp
+ find = tgui_input_list(usr, "Select image (numbered in order taken)", "Picture Choice", nametemp)
if(!find)
return
diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm
index 8667ffc7727..f4eb22e4fa0 100644
--- a/code/modules/paperwork/stamps.dm
+++ b/code/modules/paperwork/stamps.dm
@@ -86,7 +86,7 @@
var/list/show_stamps = list("EXIT" = null) + sortList(stamps) // the list that will be shown to the user to pick from
- var/input_stamp = input(user, "Choose a stamp to disguise as.", "Choose a stamp.") in show_stamps
+ var/input_stamp = tgui_input_list(user, "Choose a stamp to disguise as:", "Stamp Choice", show_stamps)
if(user && (src in user.contents)) // Er, how necessary is this in attack_self?
diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm
index 4b561c98444..141f41a8fb9 100644
--- a/code/modules/pda/core_apps.dm
+++ b/code/modules/pda/core_apps.dm
@@ -62,7 +62,7 @@
return TRUE
switch(action)
if("Edit")
- var/n = input("Please enter message", name, notehtml) as message
+ var/n = input(usr, "Please enter message", name, notehtml) as message
if(pda.loc == usr)
note = adminscrub(n)
notehtml = html_decode(note)
diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm
index 2755e09d3f7..274a27857ac 100644
--- a/code/modules/pda/pda.dm
+++ b/code/modules/pda/pda.dm
@@ -98,7 +98,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
O.show_message(text("[bicon(src)] *[ttone]*"))
/obj/item/device/pda/proc/set_ringtone()
- var/t = input("Please enter new ringtone", name, ttone) as text
+ var/t = input(usr, "Please enter new ringtone", name, ttone) as text
if(in_range(src, usr) && loc == usr)
if(t)
if(hidden_uplink && hidden_uplink.check_trigger(usr, lowertext(t), lowertext(lock_code)))
diff --git a/code/modules/persistence/graffiti.dm b/code/modules/persistence/graffiti.dm
index 9f0a7c3a32d..e0b7fa05ee3 100644
--- a/code/modules/persistence/graffiti.dm
+++ b/code/modules/persistence/graffiti.dm
@@ -54,7 +54,7 @@
to_chat(user, SPAN_WARNING("You are banned from leaving persistent information across rounds."))
return
- var/_message = sanitize(input("Enter an additional message to engrave.", "Graffiti") as null|text, trim = TRUE)
+ var/_message = sanitize(input(usr, "Enter an additional message to engrave.", "Graffiti") as null|text, trim = TRUE)
if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user)
user.visible_message("\The [user] begins carving something into \the [loc].")
if(do_after(user, max(20, length(_message)), src) && loc)
diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm
index 87304164359..ced0b3128bb 100644
--- a/code/modules/persistence/noticeboard.dm
+++ b/code/modules/persistence/noticeboard.dm
@@ -56,7 +56,7 @@
/obj/structure/noticeboard/attackby(obj/item/I, mob/user)
if(I.is_screwdriver())
- var/choice = input("Which direction do you wish to place the noticeboard?", "Noticeboard Offset") as null|anything in list("North", "South", "East", "West", "No Offset")
+ var/choice = tgui_input_list(usr, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset"))
if(choice && Adjacent(user) && I.loc == user && !user.incapacitated())
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
switch(choice)
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 693226ecfe4..d3e2ece04bf 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -606,7 +606,7 @@ var/list/possible_cable_coil_colours = list(
/obj/item/stack/cable_coil/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/device/multitool))
- var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_cable_coil_colours
+ var/selected_type = tgui_input_list(usr, "Pick new colour.", "Cable Colour", possible_cable_coil_colours)
set_cable_color(selected_type, usr)
return
return ..()
@@ -632,7 +632,7 @@ var/list/possible_cable_coil_colours = list(
set name = "Change Colour"
set category = "Object"
- var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_cable_coil_colours
+ var/selected_type = tgui_input_list(usr, "Pick new colour.", "Cable Colour", possible_cable_coil_colours)
set_cable_color(selected_type, usr)
// Items usable on a cable coil :
@@ -985,7 +985,7 @@ var/list/possible_cable_coil_colours = list(
/obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
- var/N = input("How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1) as num|null
+ var/N = input(usr, "How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1) as num|null
if(N && N <= amount)
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = N
diff --git a/code/modules/power/fusion/_setup.dm b/code/modules/power/fusion/_setup.dm
index 4ac8bb9cbf5..ca490705260 100644
--- a/code/modules/power/fusion/_setup.dm
+++ b/code/modules/power/fusion/_setup.dm
@@ -21,7 +21,7 @@
to_chat(usr, "This map is not appropriate for this verb.")
return
- var/response = input(usr, "Are you sure?", "Engine setup") as null|anything in list("No", "Yes")
+ var/response = tgui_alert(usr, "Are you sure?", "Engine setup", list("No", "Yes"))
if(!response || response == "No")
return
diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm
index e7a93f71a37..af1f24449ec 100644
--- a/code/modules/power/fusion/core/_core.dm
+++ b/code/modules/power/fusion/core/_core.dm
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
return
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", "Fusion Core", id_tag) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", "Fusion Core", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
diff --git a/code/modules/power/fusion/core/core_control.dm b/code/modules/power/fusion/core/core_control.dm
index e897dbd6ab5..7f909d48969 100644
--- a/code/modules/power/fusion/core/core_control.dm
+++ b/code/modules/power/fusion/core/core_control.dm
@@ -24,7 +24,7 @@
/obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user)
..()
if(istype(thing, /obj/item/device/multitool))
- var/new_ident = sanitize_text(input("Enter a new ident tag.", "Core Control", monitor.core_tag) as null|text)
+ var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Core Control", monitor.core_tag) as null|text)
if(new_ident && user.Adjacent(src))
monitor.core_tag = new_ident
// id_tag = new_ident
@@ -185,7 +185,7 @@
if(href_list["str"])
var/val = text2num(href_list["str"])
if(!val) //Value is 0, which is manual entering.
- cur_viewed_device.set_strength(input("Enter the new field power density (W.m^-3)", "Fusion Control", cur_viewed_device.field_strength) as num)
+ cur_viewed_device.set_strength(input(usr, "Enter the new field power density (W.m^-3)", "Fusion Control", cur_viewed_device.field_strength) as num)
else
cur_viewed_device.set_strength(cur_viewed_device.field_strength + val)
updateUsrDialog()
diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm
index b5d039d5b28..6fd14755af1 100644
--- a/code/modules/power/fusion/fuel_assembly/fuel_control.dm
+++ b/code/modules/power/fusion/fuel_assembly/fuel_control.dm
@@ -117,7 +117,7 @@
/obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user)
..()
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", "Fuel Control", monitor.fuel_tag) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag) as null|text
if(new_ident && user.Adjacent(src))
monitor.fuel_tag = new_ident
return
diff --git a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm
index adb661c25b6..e45fe4ad9cd 100644
--- a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm
+++ b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm
@@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
/obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
diff --git a/code/modules/power/fusion/gyrotron/gyrotron.dm b/code/modules/power/fusion/gyrotron/gyrotron.dm
index 96212340079..4740e0a1183 100644
--- a/code/modules/power/fusion/gyrotron/gyrotron.dm
+++ b/code/modules/power/fusion/gyrotron/gyrotron.dm
@@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(gyrotrons)
/obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", "Gyrotron", id_tag) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", "Gyrotron", id_tag) as null|text
if(new_ident && user.Adjacent(src))
id_tag = new_ident
return
diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm
index 1f06a4b6d10..ef4dd1641c2 100644
--- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm
+++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm
@@ -90,7 +90,7 @@
return
if(href_list["modifypower"])
- var/new_val = input("Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
+ var/new_val = input(usr, "Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
if(!new_val)
to_chat(usr, "That's not a valid number.")
return 1
@@ -100,7 +100,7 @@
return 1
if(href_list["modifyrate"])
- var/new_val = input("Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
+ var/new_val = input(usr, "Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
if(!new_val)
to_chat(usr, "That's not a valid number.")
return 1
@@ -119,7 +119,7 @@
/obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user)
..()
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag) as null|text
if(new_ident && user.Adjacent(src))
monitor.gyro_tag = new_ident
return
diff --git a/code/modules/power/supermatter/setup_supermatter.dm b/code/modules/power/supermatter/setup_supermatter.dm
index c0b63d9ce17..1d9225351cf 100644
--- a/code/modules/power/supermatter/setup_supermatter.dm
+++ b/code/modules/power/supermatter/setup_supermatter.dm
@@ -20,7 +20,7 @@
to_chat(usr, "Error: you are not an admin!")
return
- var/response = input(usr, "Are you sure? This will start up the engine with selected gas as coolant.", "Engine setup") as null|anything in list("N2", "CO2", "PH", "Abort")
+ var/response = tgui_input_list(usr, "Are you sure? This will start up the engine with selected gas as coolant.", "Engine setup", list("N2", "CO2", "PH", "Abort"))
if(!response || response == "Abort")
return
diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm
index 4766864ec15..297a749aa7d 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -124,7 +124,7 @@
if(default_deconstruction_crowbar(user, W))
return
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", name, comp_id) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", name, comp_id) as null|text
if(new_ident && user.Adjacent(src))
comp_id = new_ident
return
@@ -337,7 +337,7 @@
/obj/machinery/computer/turbine_computer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input("Enter a new ident tag.", name, id) as null|text
+ var/new_ident = input(usr, "Enter a new ident tag.", name, id) as null|text
if(new_ident && user.Adjacent(src))
id = new_ident
return
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 404562ae1dd..0ea7871e30b 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -68,7 +68,7 @@
set category = "Object"
set src in view(1)
- var/genemask = input("Choose a gene to modify.") as null|anything in SSplants.plant_gene_datums
+ var/genemask = tgui_input_list(usr, "Choose a gene to modify.", "Gene Choice", SSplants.plant_gene_datums)
if(!genemask)
return
diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm
index 6a6bf73cb13..ccc72a248bf 100644
--- a/code/modules/projectiles/guns/launcher/pneumatic.dm
+++ b/code/modules/projectiles/guns/launcher/pneumatic.dm
@@ -32,7 +32,7 @@
set name = "Set Valve Pressure"
set category = "Object"
set src in range(0)
- var/N = input("Percentage of tank used per shot:","[src]") as null|anything in possible_pressure_amounts
+ var/N = tgui_input_list(usr, "Percentage of tank used per shot:","[src]", possible_pressure_amounts)
if (N)
pressure_setting = N
to_chat(usr, "You dial the pressure valve to [pressure_setting]%.")
diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm
index 123a1d83c81..4c563d8a314 100644
--- a/code/modules/projectiles/guns/projectile/pistol.dm
+++ b/code/modules/projectiles/guns/projectile/pistol.dm
@@ -38,7 +38,7 @@
to_chat(M, "You don't feel cool enough to name this gun, chump.")
return 0
- var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
@@ -61,7 +61,7 @@
options["Jindal T15 Chooha"] = "p08"
options["Jindal KP-45W"] = "p08b"
options["PCA-11 Tenzu"] = "enforcer_black"
- var/choice = input(M,"Choose your sprite!","Resprite Gun") in options
+ var/choice = tgui_input_list(M,"Choose your sprite!","Resprite Gun", options)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
unique_reskin = options[choice]
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index 85f9077cfb0..5d158e5d0ae 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -64,7 +64,7 @@
to_chat(M, "You don't feel cool enough to name this gun, chump.")
return 0
- var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
@@ -93,7 +93,7 @@
to_chat(M, "You don't feel cool enough to name this gun, chump.")
return 0
- var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
@@ -116,7 +116,7 @@
options["H-H Sindri"] = "webley"
options["Lombardi Buzzard"] = "detective_buzzard"
options["Lombardi Constable Deluxe 2502"] = "detective_constable"
- var/choice = input(M,"Choose your sprite!","Resprite Gun") in options
+ var/choice = tgui_input_list(M,"Choose your sprite!","Resprite Gun", options)
if(src && choice && !M.stat && in_range(M,src))
icon_state = options[choice]
to_chat(M, "Your gun is now sprited as [choice]. Say hello to your new friend.")
diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm
index ad2d966c0e8..e63c31b1a5e 100644
--- a/code/modules/random_map/drop/droppod.dm
+++ b/code/modules/random_map/drop/droppod.dm
@@ -158,12 +158,12 @@
var/mob/living/spawned_mob
var/list/spawned_mobs = list()
- var/spawn_path = input("Select a mob type.", "Drop Pod Selection", null) as null|anything in typesof(/mob/living)-/mob/living
+ var/spawn_path = tgui_input_list(usr, "Select a mob type.", "Drop Pod Selection", typesof(/mob/living)-/mob/living)
if(!spawn_path)
return
if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No")
- var/spawn_count = input("How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
+ var/spawn_count = input(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
if(spawn_count <= 0)
return
for(var/i=0;iYou connect one end of tubing to \the [AC].")
else
- var/choice = input("Select a target hose connector.", "Socket Selection", null) as null|anything in available_sockets
+ var/choice = tgui_input_list(usr, "Select a target hose connector.", "Socket Selection", available_sockets)
if(choice)
var/obj/item/hose_connector/CC = choice
diff --git a/code/modules/reagents/machinery/dispenser/dispenser2.dm b/code/modules/reagents/machinery/dispenser/dispenser2.dm
index d53dac4ba53..c956409dc98 100644
--- a/code/modules/reagents/machinery/dispenser/dispenser2.dm
+++ b/code/modules/reagents/machinery/dispenser/dispenser2.dm
@@ -92,7 +92,7 @@
add_cartridge(W, user)
else if(W.is_screwdriver())
- var/label = input(user, "Which cartridge would you like to remove?", "Chemical Dispenser") as null|anything in cartridges
+ var/label = tgui_input_list(user, "Which cartridge would you like to remove?", "Chemical Dispenser", cartridges)
if(!label) return
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = remove_cartridge(label)
if(C)
diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
index d194793b9ee..f5c28ea7200 100644
--- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm
+++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm
@@ -51,7 +51,7 @@
set name = "Set transfer amount"
set category = "Object"
set src in view(1)
- var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
+ var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts)
if (N)
amount_per_transfer_from_this = N
diff --git a/code/modules/reagents/machinery/distillery.dm b/code/modules/reagents/machinery/distillery.dm
index d64d8b32114..c9679ccec9f 100644
--- a/code/modules/reagents/machinery/distillery.dm
+++ b/code/modules/reagents/machinery/distillery.dm
@@ -204,7 +204,7 @@
OutputBeaker = null
if("adjust temp")
- target_temp = input("Choose a target temperature.", "Temperature.", T20C) as num
+ target_temp = input(usr, "Choose a target temperature.", "Temperature.", T20C) as num
target_temp = CLAMP(target_temp, min_temp, max_temp)
update_icon()
diff --git a/code/modules/reagents/reagent_containers/_reagent_containers.dm b/code/modules/reagents/reagent_containers/_reagent_containers.dm
index 64dd2622d2e..5c61d6a5ad4 100644
--- a/code/modules/reagents/reagent_containers/_reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers/_reagent_containers.dm
@@ -12,7 +12,7 @@
set name = "Set transfer amount"
set category = "Object"
set src in range(0)
- var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
+ var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts)
if(N)
amount_per_transfer_from_this = N
diff --git a/code/modules/resleeving/computers.dm b/code/modules/resleeving/computers.dm
index d8c8b56a5ef..b40e1a13c60 100644
--- a/code/modules/resleeving/computers.dm
+++ b/code/modules/resleeving/computers.dm
@@ -390,7 +390,7 @@
subtargets += H
if(subtargets.len)
var/oc_sanity = sleever.occupant
- override = input(usr,"Multiple bodies detected. Select target for resleeving of [active_mr.mindname] manually. Sleeving of primary body is unsafe with sub-contents, and is not listed.", "Resleeving Target") as null|anything in subtargets
+ override = tgui_input_list(usr,"Multiple bodies detected. Select target for resleeving of [active_mr.mindname] manually. Sleeving of primary body is unsafe with sub-contents, and is not listed.", "Resleeving Target", subtargets)
if(!override || oc_sanity != sleever.occupant || !(override in sleever.occupant))
set_temp("Error: Target selection aborted.", "danger")
tgui_modal_clear(src)
diff --git a/code/modules/resleeving/designer.dm b/code/modules/resleeving/designer.dm
index ba65e52e62d..a2d50cf6438 100644
--- a/code/modules/resleeving/designer.dm
+++ b/code/modules/resleeving/designer.dm
@@ -394,7 +394,7 @@
ASSERT(istype(G))
if(params["target_href"] == "bio_gender")
- var/new_gender = input(user, "Choose your character's biological gender:", "Character Preference", active_br.bodygender) as null|anything in G.get_genders()
+ var/new_gender = tgui_input_list(user, "Choose your character's biological gender:", "Character Preference", G.get_genders())
if(new_gender)
active_br.bodygender = new_gender
active_br.mydna.dna.SetUIState(DNA_UI_GENDER, new_gender!=MALE, 1)
diff --git a/code/modules/resleeving/infomorph.dm b/code/modules/resleeving/infomorph.dm
index ee1edfd8da7..7ba0858334c 100644
--- a/code/modules/resleeving/infomorph.dm
+++ b/code/modules/resleeving/infomorph.dm
@@ -317,7 +317,7 @@ var/list/infomorph_emotions = list(
set category = "Card Commands"
set name = "Choose Chassis"
- var/choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in possible_chassis
+ var/choice = tgui_input_list(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.", "Chassis Choice", possible_chassis)
if(!choice) return
icon_state = possible_chassis[choice]
@@ -327,7 +327,7 @@ var/list/infomorph_emotions = list(
set category = "Card Commands"
set name = "Choose Speech Verbs"
- var/choice = input(usr,"What theme would you like to use for your speech verbs? This decision can only be made once.") as null|anything in possible_say_verbs
+ var/choice = tgui_input_list(usr,"What theme would you like to use for your speech verbs? This decision can only be made once.", "Verb Choice", possible_say_verbs)
if(!choice) return
var/list/sayverbs = possible_say_verbs[choice]
diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm
index 37275899b82..23a51da05a9 100644
--- a/code/modules/shieldgen/shield_generator.dm
+++ b/code/modules/shieldgen/shield_generator.dm
@@ -485,7 +485,7 @@
if(!running)
return TRUE
- var/choice = input(usr, "Are you sure that you want to initiate an emergency shield shutdown? This will instantly drop the shield, and may result in unstable release of stored electromagnetic energy. Proceed at your own risk.") in list("Yes", "No")
+ var/choice = tgui_alert(usr, "Are you sure that you want to initiate an emergency shield shutdown? This will instantly drop the shield, and may result in unstable release of stored electromagnetic energy. Proceed at your own risk.", "Confirmation", list("No", "Yes"))
if((choice != "Yes") || !running)
return TRUE
diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm
index 93688365c0b..a263267f5a8 100644
--- a/code/modules/shuttles/shuttle_console.dm
+++ b/code/modules/shuttles/shuttle_console.dm
@@ -104,7 +104,7 @@
return TRUE
if("set_codes")
- var/newcode = input("Input new docking codes", "Docking codes", shuttle.docking_codes) as text|null
+ var/newcode = input(usr, "Input new docking codes", "Docking codes", shuttle.docking_codes) as text|null
if(newcode && !..())
shuttle.set_docking_codes(uppertext(newcode))
return TRUE
diff --git a/code/modules/shuttles/shuttle_console_multi.dm b/code/modules/shuttles/shuttle_console_multi.dm
index 2e45441b1a1..fe948c1f184 100644
--- a/code/modules/shuttles/shuttle_console_multi.dm
+++ b/code/modules/shuttles/shuttle_console_multi.dm
@@ -25,7 +25,7 @@
switch(action)
if("pick")
- var/dest_key = input("Choose shuttle destination", "Shuttle Destination") as null|anything in shuttle.get_destinations()
+ var/dest_key = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations())
if(dest_key && CanInteract(usr, GLOB.tgui_default_state))
shuttle.set_destination(dest_key, usr)
return TRUE
diff --git a/code/modules/spells/general/area_teleport.dm b/code/modules/spells/general/area_teleport.dm
index 93d86c2d20c..3012be46fa4 100644
--- a/code/modules/spells/general/area_teleport.dm
+++ b/code/modules/spells/general/area_teleport.dm
@@ -26,7 +26,7 @@
var/A = null
if(!randomise_selection)
- A = input("Area to teleport to", "Teleport", A) in teleportlocs
+ A = tgui_input_list(usr, "Area to teleport to", "Teleport", teleportlocs)
else
A = pick(teleportlocs)
diff --git a/code/modules/spells/targeted/targeted.dm b/code/modules/spells/targeted/targeted.dm
index d9d581e0504..c2de26439f1 100644
--- a/code/modules/spells/targeted/targeted.dm
+++ b/code/modules/spells/targeted/targeted.dm
@@ -61,7 +61,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
if(possible_targets.len)
if(spell_flags & SELECTABLE) //if we are allowed to choose. see setup.dm for details
- var/mob/temp_target = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
+ var/mob/temp_target = tgui_input_list(user, "Choose the target for the spell.", "Targeting", possible_targets)
if(temp_target)
targets += temp_target
else
@@ -89,7 +89,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
for(var/i = 1; i<=max_targets, i++)
if(!possible_targets.len)
break
- var/mob/M = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
+ var/mob/M = tgui_input_list(user, "Choose the target for the spell.", "Targeting", possible_targets)
if(!M)
break
if(range != -2)
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 06dd35434c8..effdecd863a 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -180,7 +180,7 @@
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
attached_organs |= organ
- var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
+ var/organ_to_remove = tgui_input_list(user, "Which organ do you want to prepare for removal?", "Organ Choice", attached_organs)
if(!organ_to_remove)
return 0
@@ -241,7 +241,7 @@
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
removable_organs |= organ
- var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
+ var/organ_to_remove = tgui_input_list(user, "Which organ do you want to remove?", "Organ Choice", removable_organs)
if(!organ_to_remove)
return 0
@@ -378,7 +378,7 @@
if(istype(I) && (I.status & ORGAN_CUT_AWAY) && !(I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
removable_organs |= organ
- var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
+ var/organ_to_replace = tgui_input_list(user, "Which organ do you want to reattach?", "Organ Choice", removable_organs)
if(!organ_to_replace)
return 0
@@ -437,7 +437,7 @@
if(istype(I) && I.parent_organ == target_zone)
removable_organs |= organ
- var/organ_to_remove = input(user, "Which organ do you want to remove?") as null|anything in removable_organs
+ var/organ_to_remove = tgui_input_list(user, "Which organ do you want to remove?", "Organ Choice", removable_organs)
if(!organ_to_remove)
return 0
diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm
index ba0bb41dbd7..6ed7dad69db 100644
--- a/code/modules/surgery/robotics.dm
+++ b/code/modules/surgery/robotics.dm
@@ -325,7 +325,7 @@
if(I && !(I.status & ORGAN_CUT_AWAY) && I.parent_organ == target_zone)
attached_organs |= organ
- var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
+ var/organ_to_remove = tgui_input_list(user, "Which organ do you want to prepare for removal?", "Organ Choice", attached_organs)
if(!organ_to_remove)
return 0
@@ -375,7 +375,7 @@
if(I && (I.status & ORGAN_CUT_AWAY) && (I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
removable_organs |= organ
- var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
+ var/organ_to_replace = tgui_input_list(user, "Which organ do you want to reattach?", "Organ Choice", removable_organs)
if(!organ_to_replace)
return 0
diff --git a/code/modules/telesci/gps_advanced.dm b/code/modules/telesci/gps_advanced.dm
index 92f2e7a4cff..bc0d3223184 100644
--- a/code/modules/telesci/gps_advanced.dm
+++ b/code/modules/telesci/gps_advanced.dm
@@ -59,7 +59,7 @@
/obj/item/device/gps/advanced/Topic(href, href_list)
..()
if(href_list["tag"] )
- var/a = input("Please enter desired tag.", name, gpstag) as text
+ var/a = input(usr, "Please enter desired tag.", name, gpstag) as text
a = uppertext(copytext(sanitize(a), 1, 5))
if(src.loc == usr)
gpstag = a
diff --git a/code/modules/tgui/modules/admin_shuttle_controller.dm b/code/modules/tgui/modules/admin_shuttle_controller.dm
index 3c88efd95da..4f65517729f 100644
--- a/code/modules/tgui/modules/admin_shuttle_controller.dm
+++ b/code/modules/tgui/modules/admin_shuttle_controller.dm
@@ -69,7 +69,7 @@
var/datum/shuttle/S = locate(params["ref"])
if(istype(S, /datum/shuttle/autodock/multi))
var/datum/shuttle/autodock/multi/shuttle = S
- var/dest_key = input("Choose shuttle destination", "Shuttle Destination") as null|anything in shuttle.get_destinations()
+ var/dest_key = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", shuttle.get_destinations())
if(dest_key)
shuttle.set_destination(dest_key, usr)
shuttle.launch(src)
@@ -80,7 +80,7 @@
if(!LAZYLEN(possible_d))
to_chat(usr, "There are no possible destinations for [shuttle] ([shuttle.type])")
return FALSE
- D = input("Choose shuttle destination", "Shuttle Destination") as null|anything in possible_d
+ D = tgui_input_list(usr, "Choose shuttle destination", "Shuttle Destination", possible_d)
if(D)
shuttle.set_destination(possible_d[D])
shuttle.launch()
diff --git a/code/modules/tgui/modules/agentcard.dm b/code/modules/tgui/modules/agentcard.dm
index a83e1b9021f..d61f8e33941 100644
--- a/code/modules/tgui/modules/agentcard.dm
+++ b/code/modules/tgui/modules/agentcard.dm
@@ -54,7 +54,7 @@
to_chat(usr, "Age has been set to '[S.age]'.")
. = TRUE
if("appearance")
- var/datum/card_state/choice = input(usr, "Select the appearance for this card.", "Agent Card Appearance") as null|anything in id_card_states()
+ var/datum/card_state/choice = tgui_input_list(usr, "Select the appearance for this card.", "Agent Card Appearance", id_card_states())
if(choice && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.icon_state = choice.icon_state
S.item_state = choice.item_state
diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm
index d063d6b41a3..3b84e95d534 100644
--- a/code/modules/tgui/modules/appearance_changer.dm
+++ b/code/modules/tgui/modules/appearance_changer.dm
@@ -134,7 +134,7 @@
return 1
if("hair_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select hair color.", "Hair Color", rgb(target.r_hair, target.g_hair, target.b_hair)) as color|null
+ var/new_hair = input(usr, "Please select hair color.", "Hair Color", rgb(target.r_hair, target.g_hair, target.b_hair)) as color|null
if(new_hair && can_still_topic(usr, state))
var/r_hair = hex2num(copytext(new_hair, 2, 4))
var/g_hair = hex2num(copytext(new_hair, 4, 6))
@@ -151,7 +151,7 @@
return 1
if("facial_hair_color")
if(can_change(APPEARANCE_FACIAL_HAIR_COLOR))
- var/new_facial = input("Please select facial hair color.", "Facial Hair Color", rgb(target.r_facial, target.g_facial, target.b_facial)) as color|null
+ var/new_facial = input(usr, "Please select facial hair color.", "Facial Hair Color", rgb(target.r_facial, target.g_facial, target.b_facial)) as color|null
if(new_facial && can_still_topic(usr, state))
var/r_facial = hex2num(copytext(new_facial, 2, 4))
var/g_facial = hex2num(copytext(new_facial, 4, 6))
@@ -162,7 +162,7 @@
return 1
if("eye_color")
if(can_change(APPEARANCE_EYE_COLOR))
- var/new_eyes = input("Please select eye color.", "Eye Color", rgb(target.r_eyes, target.g_eyes, target.b_eyes)) as color|null
+ var/new_eyes = input(usr, "Please select eye color.", "Eye Color", rgb(target.r_eyes, target.g_eyes, target.b_eyes)) as color|null
if(new_eyes && can_still_topic(usr, state))
var/r_eyes = hex2num(copytext(new_eyes, 2, 4))
var/g_eyes = hex2num(copytext(new_eyes, 4, 6))
@@ -186,7 +186,7 @@
return TRUE
if("ears_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select ear color.", "Ear Color", rgb(target.r_ears, target.g_ears, target.b_ears)) as color|null
+ var/new_hair = input(usr, "Please select ear color.", "Ear Color", rgb(target.r_ears, target.g_ears, target.b_ears)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_ears = hex2num(copytext(new_hair, 2, 4))
target.g_ears = hex2num(copytext(new_hair, 4, 6))
@@ -197,7 +197,7 @@
return 1
if("ears2_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select secondary ear color.", "2nd Ear Color", rgb(target.r_ears2, target.g_ears2, target.b_ears2)) as color|null
+ var/new_hair = input(usr, "Please select secondary ear color.", "2nd Ear Color", rgb(target.r_ears2, target.g_ears2, target.b_ears2)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_ears2 = hex2num(copytext(new_hair, 2, 4))
target.g_ears2 = hex2num(copytext(new_hair, 4, 6))
@@ -220,7 +220,7 @@
return TRUE
if("tail_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select tail color.", "Tail Color", rgb(target.r_tail, target.g_tail, target.b_tail)) as color|null
+ var/new_hair = input(usr, "Please select tail color.", "Tail Color", rgb(target.r_tail, target.g_tail, target.b_tail)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_tail = hex2num(copytext(new_hair, 2, 4))
target.g_tail = hex2num(copytext(new_hair, 4, 6))
@@ -231,7 +231,7 @@
return 1
if("tail2_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select secondary tail color.", "2nd Tail Color", rgb(target.r_tail2, target.g_tail2, target.b_tail2)) as color|null
+ var/new_hair = input(usr, "Please select secondary tail color.", "2nd Tail Color", rgb(target.r_tail2, target.g_tail2, target.b_tail2)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_tail2 = hex2num(copytext(new_hair, 2, 4))
target.g_tail2 = hex2num(copytext(new_hair, 4, 6))
@@ -254,7 +254,7 @@
return TRUE
if("wing_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select wing color.", "Wing Color", rgb(target.r_wing, target.g_wing, target.b_wing)) as color|null
+ var/new_hair = input(usr, "Please select wing color.", "Wing Color", rgb(target.r_wing, target.g_wing, target.b_wing)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_wing = hex2num(copytext(new_hair, 2, 4))
target.g_wing = hex2num(copytext(new_hair, 4, 6))
@@ -265,7 +265,7 @@
return 1
if("wing2_color")
if(can_change(APPEARANCE_HAIR_COLOR))
- var/new_hair = input("Please select secondary wing color.", "2nd Wing Color", rgb(target.r_wing2, target.g_wing2, target.b_wing2)) as color|null
+ var/new_hair = input(usr, "Please select secondary wing color.", "2nd Wing Color", rgb(target.r_wing2, target.g_wing2, target.b_wing2)) as color|null
if(new_hair && can_still_topic(usr, state))
target.r_wing2 = hex2num(copytext(new_hair, 2, 4))
target.g_wing2 = hex2num(copytext(new_hair, 4, 6))
diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm
index 395f581e0a7..1a2ae082ef3 100644
--- a/code/modules/tgui/modules/communications.dm
+++ b/code/modules/tgui/modules/communications.dm
@@ -324,11 +324,11 @@
post_status(src, params["statdisp"], user = usr)
if("setmsg1")
- stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
+ stat_msg1 = reject_bad_text(sanitize(input(usr, "Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
setMenuState(usr, COMM_SCREEN_STAT)
if("setmsg2")
- stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
+ stat_msg2 = reject_bad_text(sanitize(input(usr, "Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
setMenuState(usr, COMM_SCREEN_STAT)
// OMG CENTCOMM LETTERHEAD
@@ -337,7 +337,7 @@
if(centcomm_message_cooldown > world.time)
to_chat(usr, "Arrays recycling. Please stand by.")
return
- var/input = sanitize(input("Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \
+ var/input = sanitize(input(usr, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \
Please be aware that this process is very expensive, and abuse will lead to... termination. \
Transmission does not guarantee a response. \
There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging") as null|message)
diff --git a/code/modules/tgui/modules/gyrotron_control.dm b/code/modules/tgui/modules/gyrotron_control.dm
index 2cb42eb45cd..ee6f5af9b6f 100644
--- a/code/modules/tgui/modules/gyrotron_control.dm
+++ b/code/modules/tgui/modules/gyrotron_control.dm
@@ -18,7 +18,7 @@
switch(action)
if("set_tag")
- var/new_ident = sanitize_text(input("Enter a new ident tag.", "Gyrotron Control", gyro_tag) as null|text)
+ var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Gyrotron Control", gyro_tag) as null|text)
if(new_ident)
gyro_tag = new_ident
return TRUE
diff --git a/code/modules/tgui/modules/ntos-only/cardmod.dm b/code/modules/tgui/modules/ntos-only/cardmod.dm
index a05dbf0ff76..f96772626ef 100644
--- a/code/modules/tgui/modules/ntos-only/cardmod.dm
+++ b/code/modules/tgui/modules/ntos-only/cardmod.dm
@@ -193,7 +193,7 @@
if(computer && program.can_run(usr, 1) && id_card)
var/t1 = params["assign_target"]
if(t1 == "Custom")
- var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment", id_card.assignment), 45)
+ var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment", id_card.assignment), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t)
id_card.assignment = temp_t
diff --git a/code/modules/tgui/modules/ntos-only/email.dm b/code/modules/tgui/modules/ntos-only/email.dm
index 8d8d1fbbc71..746582ae7fd 100644
--- a/code/modules/tgui/modules/ntos-only/email.dm
+++ b/code/modules/tgui/modules/ntos-only/email.dm
@@ -427,7 +427,7 @@
if(CF.unsendable)
continue
filenames.Add(CF.filename)
- var/picked_file = input(user, "Please pick a file to send as attachment (max 32GQ)") as null|anything in filenames
+ var/picked_file = tgui_input_list(user, "Please pick a file to send as attachment (max 32GQ)", "Select Attachment", filenames)
if(!picked_file)
return 1
diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm
index 097bf84a059..5aac12d7c16 100644
--- a/code/modules/tgui/modules/overmap.dm
+++ b/code/modules/tgui/modules/overmap.dm
@@ -307,7 +307,7 @@
/* HELM */
if("add")
var/datum/computer_file/data/waypoint/R = new()
- var/sec_name = input("Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
+ var/sec_name = input(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
if(!sec_name)
sec_name = "Sector #[known_sectors.len]"
R.fields["name"] = sec_name
@@ -319,8 +319,8 @@
R.fields["x"] = linked.x
R.fields["y"] = linked.y
if("new")
- var/newx = input("Input new entry x coordinate", "Coordinate input", linked.x) as num
- var/newy = input("Input new entry y coordinate", "Coordinate input", linked.y) as num
+ var/newx = input(usr, "Input new entry x coordinate", "Coordinate input", linked.x) as num
+ var/newy = input(usr, "Input new entry y coordinate", "Coordinate input", linked.y) as num
R.fields["x"] = CLAMP(newx, 1, world.maxx)
R.fields["y"] = CLAMP(newy, 1, world.maxy)
known_sectors[sec_name] = R
@@ -335,12 +335,12 @@
if("setcoord")
if(params["setx"])
- var/newx = input("Input new destiniation x coordinate", "Coordinate input", dx) as num|null
+ var/newx = input(usr, "Input new destiniation x coordinate", "Coordinate input", dx) as num|null
if(newx)
dx = CLAMP(newx, 1, world.maxx)
if(params["sety"])
- var/newy = input("Input new destiniation y coordinate", "Coordinate input", dy) as num|null
+ var/newy = input(usr, "Input new destiniation y coordinate", "Coordinate input", dy) as num|null
if(newy)
dy = CLAMP(newy, 1, world.maxy)
. = TRUE
@@ -356,13 +356,13 @@
. = TRUE
if("speedlimit")
- var/newlimit = input("Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
+ var/newlimit = input(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
if(newlimit)
speedlimit = CLAMP(newlimit/1000, 0, 100)
. = TRUE
if("accellimit")
- var/newlimit = input("Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
+ var/newlimit = input(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
if(newlimit)
accellimit = max(newlimit/1000, 0)
. = TRUE
@@ -402,7 +402,7 @@
. = TRUE
if("set_global_limit")
- var/newlim = input("Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
+ var/newlim = input(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
linked.thrust_limit = clamp(newlim/100, 0, 1)
for(var/datum/ship_engine/E in linked.engines)
E.set_thrust_limit(linked.thrust_limit)
@@ -416,7 +416,7 @@
if("set_limit")
var/datum/ship_engine/E = locate(params["engine"])
- var/newlim = input("Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
+ var/newlim = input(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
var/limit = clamp(newlim/100, 0, 1)
if(istype(E))
E.set_thrust_limit(limit)
@@ -437,7 +437,7 @@
/* END ENGINES */
/* SENSORS */
if("range")
- var/nrange = input("Set new sensors range", "Sensor range", sensors.range) as num|null
+ var/nrange = input(usr, "Set new sensors range", "Sensor range", sensors.range) as num|null
if(nrange)
sensors.set_range(CLAMP(nrange, 1, world.view))
. = TRUE
diff --git a/code/modules/tgui/modules/rustcore_monitor.dm b/code/modules/tgui/modules/rustcore_monitor.dm
index d4ea472a5b5..553363a9633 100644
--- a/code/modules/tgui/modules/rustcore_monitor.dm
+++ b/code/modules/tgui/modules/rustcore_monitor.dm
@@ -25,7 +25,7 @@
return TRUE
if("set_tag")
- var/new_ident = sanitize_text(input("Enter a new ident tag.", "Core Control", core_tag) as null|text)
+ var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Core Control", core_tag) as null|text)
if(new_ident)
core_tag = new_ident
return TRUE
diff --git a/code/modules/tgui/modules/rustfuel_control.dm b/code/modules/tgui/modules/rustfuel_control.dm
index 54828c8ec19..b7c43b521d2 100644
--- a/code/modules/tgui/modules/rustfuel_control.dm
+++ b/code/modules/tgui/modules/rustfuel_control.dm
@@ -22,7 +22,7 @@
return TRUE
if("set_tag")
- var/new_ident = sanitize_text(input("Enter a new ident tag.", "Gyrotron Control", fuel_tag) as null|text)
+ var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Gyrotron Control", fuel_tag) as null|text)
if(new_ident)
fuel_tag = new_ident
diff --git a/code/modules/tgui/modules/teleporter.dm b/code/modules/tgui/modules/teleporter.dm
index 05529390fe6..5baefde9eb6 100644
--- a/code/modules/tgui/modules/teleporter.dm
+++ b/code/modules/tgui/modules/teleporter.dm
@@ -59,7 +59,7 @@
areaindex[tmpname] = 1
L[tmpname] = I
- var/desc = input("Please select a location to lock in.", "Locking Menu") in L|null
+ var/desc = tgui_input_list(usr, "Please select a location to lock in.", "Locking Menu", L)
if(!desc)
return FALSE
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
diff --git a/code/modules/tgui/tgui_input_list.dm b/code/modules/tgui/tgui_input_list.dm
index 9c27467d25b..8374c4e092a 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, list/buttons, default, timeout = 0)
if (istext(user))
stack_trace("tgui_alert() received text for user instead of list")
return
@@ -23,7 +23,7 @@
user = client.mob
else
return
- var/datum/tgui_list_input/input = new(user, message, title, buttons, timeout)
+ var/datum/tgui_list_input/input = new(user, message, title, buttons, default, timeout)
input.tgui_interact(user)
input.wait()
if (input)
@@ -42,7 +42,7 @@
* * callback - The callback to be invoked when a choice is made.
* * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
*/
-/proc/tgui_input_list_async(mob/user, message, title, list/buttons, datum/callback/callback, timeout = 60 SECONDS)
+/proc/tgui_input_list_async(mob/user, message, title, list/buttons, default, datum/callback/callback, timeout = 60 SECONDS)
if (istext(user))
stack_trace("tgui_alert() received text for user instead of list")
return
@@ -56,7 +56,7 @@
user = client.mob
else
return
- var/datum/tgui_list_input/async/input = new(user, message, title, buttons, callback, timeout)
+ var/datum/tgui_list_input/async/input = new(user, message, title, buttons, default, callback, timeout)
input.tgui_interact(user)
/**
@@ -83,7 +83,7 @@
/// Boolean field describing if the tgui_list_input was closed by the user.
var/closed
-/datum/tgui_list_input/New(mob/user, message, title, list/buttons, timeout)
+/datum/tgui_list_input/New(mob/user, message, title, list/buttons, default, timeout)
src.title = title
src.message = message
src.buttons = list()
@@ -171,8 +171,8 @@
/// The callback to be invoked by the tgui_list_input upon having a choice made.
var/datum/callback/callback
-/datum/tgui_list_input/async/New(mob/user, message, title, list/buttons, callback, timeout)
- ..(user, title, message, buttons, timeout)
+/datum/tgui_list_input/async/New(mob/user, message, title, list/buttons, default, callback, timeout)
+ ..(user, title, message, buttons, default, timeout)
src.callback = callback
/datum/tgui_list_input/async/Destroy(force, ...)
diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm
index 298d0f06d66..915e2687bab 100644
--- a/code/modules/vehicles/bike.dm
+++ b/code/modules/vehicles/bike.dm
@@ -48,7 +48,7 @@
/obj/vehicle/bike/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool) && open)
- var/new_paint = input("Please select paint color.", "Paint Color", paint_color) as color|null
+ var/new_paint = input(usr, "Please select paint color.", "Paint Color", paint_color) as color|null
if(new_paint)
paint_color = new_paint
update_icon()
diff --git a/code/modules/vehicles/quad.dm b/code/modules/vehicles/quad.dm
index 2e83164b91d..7f5eee732c8 100644
--- a/code/modules/vehicles/quad.dm
+++ b/code/modules/vehicles/quad.dm
@@ -74,7 +74,7 @@
/obj/vehicle/train/engine/quadbike/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool) && open)
- var/new_paint = input("Please select paint color.", "Paint Color", paint_color) as color|null
+ var/new_paint = input(usr, "Please select paint color.", "Paint Color", paint_color) as color|null
if(new_paint)
paint_color = new_paint
update_icon()
@@ -250,7 +250,7 @@
/obj/vehicle/train/trolley/trailer/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/multitool) && open)
- var/new_paint = input("Please select paint color.", "Paint Color", paint_color) as color|null
+ var/new_paint = input(usr, "Please select paint color.", "Paint Color", paint_color) as color|null
if(new_paint)
paint_color = new_paint
update_icon()
diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm
index 2e7710e8391..dd96f40167e 100644
--- a/code/modules/ventcrawl/ventcrawl.dm
+++ b/code/modules/ventcrawl/ventcrawl.dm
@@ -103,7 +103,7 @@ var/list/ventcrawl_machinery = list(
if(pipes.len == 1)
pipe = pipes[1]
else
- pipe = input("Crawl Through Vent", "Pick a pipe") as null|anything in pipes
+ pipe = tgui_input_list(usr, "Crawl Through Vent", "Pick a pipe", pipes)
if(canmove && pipe)
return pipe
diff --git a/code/modules/virus2/admin.dm b/code/modules/virus2/admin.dm
index 9eef58102a2..b0e92139b4c 100644
--- a/code/modules/virus2/admin.dm
+++ b/code/modules/virus2/admin.dm
@@ -64,7 +64,7 @@
var/datum/disease2/effect/Eff = s[stage]
- var/C = input("Select effect for stage [stage]:", "Stage [stage]", initial(Eff.name)) as null|anything in L
+ var/C = tgui_input_list(usr, "Select effect for stage [stage]:", "Stage [stage]", L, Eff)
if(!C) return
return L[C]
@@ -130,12 +130,12 @@
s_multiplier[stage] = max(1, round(initial(E.maxm)/2))
else if(href_list["chance"])
var/datum/disease2/effect/Eff = s[stage]
- var/I = input("Chance, per tick, of this effect happening (min 0, max [initial(Eff.chance_maxm)])", "Effect Chance", s_chance[stage]) as null|num
+ var/I = input(usr, "Chance, per tick, of this effect happening (min 0, max [initial(Eff.chance_maxm)])", "Effect Chance", s_chance[stage]) as null|num
if(I == null || I < 0 || I > initial(Eff.chance_maxm)) return
s_chance[stage] = I
else if(href_list["multiplier"])
var/datum/disease2/effect/Eff = s[stage]
- var/I = input("Multiplier for this effect (min 1, max [initial(Eff.maxm)])", "Effect Multiplier", s_multiplier[stage]) as null|num
+ var/I = input(usr, "Multiplier for this effect (min 1, max [initial(Eff.maxm)])", "Effect Multiplier", s_multiplier[stage]) as null|num
if(I == null || I < 1 || I > initial(Eff.maxm)) return
s_multiplier[stage] = I
if("species")
@@ -151,7 +151,7 @@
if(!infectee.species || !(infectee.species.get_bodytype() in species))
infectee = null
if("ichance")
- var/I = input("Input infection chance", "Infection Chance", infectionchance) as null|num
+ var/I = input(usr, "Input infection chance", "Infection Chance", infectionchance) as null|num
if(!I) return
infectionchance = I
if("stype")
@@ -159,7 +159,7 @@
if(!S) return
spreadtype = S
if("speed")
- var/S = input("Input speed", "Speed", speed) as null|num
+ var/S = input(usr, "Input speed", "Speed", speed) as null|num
if(!S) return
speed = S
if("antigen")
@@ -173,7 +173,7 @@
else if(href_list["reset"])
antigens = list()
if("resistance")
- var/S = input("Input % resistance to antibiotics", "Resistance", resistance) as null|num
+ var/S = input(usr, "Input % resistance to antibiotics", "Resistance", resistance) as null|num
if(!S) return
resistance = S
if("infectee")
@@ -187,7 +187,7 @@
if(!candidates.len)
to_chat(usr, "No possible candidates found!")
- var/I = input("Choose initial infectee", "Infectee", infectee) as null|anything in candidates
+ var/I = tgui_input_list(usr, "Choose initial infectee", "Infectee", candidates)
if(!I || !candidates[I]) return
infectee = candidates[I]
species |= infectee.species.get_bodytype()
diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm
index 8ca60c0b1c7..0f42e6e498d 100644
--- a/code/modules/vore/eating/living_vr.dm
+++ b/code/modules/vore/eating/living_vr.dm
@@ -163,7 +163,7 @@
else if(istype(I,/obj/item/device/radio/beacon))
var/confirm = tgui_alert(user, "[src == user ? "Eat the beacon?" : "Feed the beacon to [src]?"]", "Confirmation", list("Yes!", "Cancel"))
if(confirm == "Yes!")
- var/obj/belly/B = input("Which belly?", "Select A Belly") as null|anything in vore_organs
+ var/obj/belly/B = tgui_input_list(usr, "Which belly?", "Select A Belly", vore_organs)
if(!istype(B))
return TRUE
visible_message("[user] is trying to stuff a beacon into [src]'s [lowertext(B.name)]!",
@@ -459,17 +459,17 @@
/mob/living/proc/eat_held_mob(mob/living/user, mob/living/prey, mob/living/pred)
var/belly
if(user != pred)
- belly = input("Choose Belly") in pred.vore_organs
+ belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
else
belly = pred.vore_selected
return perform_the_nom(user, prey, pred, belly)
/mob/living/proc/feed_self_to_grabbed(mob/living/user, mob/living/pred)
- var/belly = input("Choose Belly") in pred.vore_organs
+ var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
return perform_the_nom(user, user, pred, belly)
/mob/living/proc/feed_grabbed_to_other(mob/living/user, mob/living/prey, mob/living/pred)
- var/belly = input("Choose Belly") in pred.vore_organs
+ var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
return perform_the_nom(user, prey, pred, belly)
//
diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm
index df5b488cd4f..727a08de0d2 100644
--- a/code/modules/vore/eating/silicon_vr.dm
+++ b/code/modules/vore/eating/silicon_vr.dm
@@ -69,7 +69,7 @@
hologram.drop_prey()
return
- var/mob/living/prey = input(src,"Select a mob to eat","Holonoms") as mob in oview(0,eyeobj)|null
+ var/mob/living/prey = tgui_input_list(src,"Select a mob to eat","Holonoms", oview(0,eyeobj))
if(!prey)
return //Probably cancelled
diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index b91d613a3f8..8491e74baf9 100644
--- a/code/modules/vore/eating/vorepanel_vr.dm
+++ b/code/modules/vore/eating/vorepanel_vr.dm
@@ -536,7 +536,7 @@
to_chat(user,"You can't do that in your state!")
return TRUE
- var/obj/belly/choice = input("Move all where?","Select Belly") as null|anything in host.vore_organs
+ var/obj/belly/choice = tgui_input_list(usr, "Move all where?","Select Belly", host.vore_organs)
if(!choice)
return FALSE
@@ -552,7 +552,7 @@
var/list/available_options = list("Examine", "Eject", "Move")
if(ishuman(target))
available_options += "Transform"
- intent = input(user, "What would you like to do with [target]?", "Vore Pick", "Examine") as null|anything in available_options
+ intent = tgui_input_list(user, "What would you like to do with [target]?", "Vore Pick", "Examine", available_options)
switch(intent)
if("Examine")
var/list/results = target.examine(host)
@@ -574,7 +574,7 @@
to_chat(user,"You can't do that in your state!")
return TRUE
- var/obj/belly/choice = input("Move [target] where?","Select Belly") as null|anything in host.vore_organs
+ var/obj/belly/choice = tgui_input_list(usr, "Move [target] where?","Select Belly", host.vore_organs)
if(!choice || !(target in host.vore_selected))
return TRUE
@@ -630,7 +630,7 @@
. = TRUE
if("b_mode")
var/list/menu_list = host.vore_selected.digest_modes.Copy()
- var/new_mode = input("Choose Mode (currently [host.vore_selected.digest_mode])") as null|anything in menu_list
+ var/new_mode = tgui_input_list(usr, "Choose Mode (currently [host.vore_selected.digest_mode])", "Mode Choice", menu_list)
if(!new_mode)
return FALSE
@@ -638,7 +638,7 @@
. = TRUE
if("b_addons")
var/list/menu_list = host.vore_selected.mode_flag_list.Copy()
- var/toggle_addon = input("Toggle Addon") as null|anything in menu_list
+ var/toggle_addon = tgui_input_list(usr, "Toggle Addon", "Addon Choice", menu_list)
if(!toggle_addon)
return FALSE
host.vore_selected.mode_flags ^= host.vore_selected.mode_flag_list[toggle_addon]
@@ -647,7 +647,7 @@
if("b_item_mode")
var/list/menu_list = host.vore_selected.item_digest_modes.Copy()
- var/new_mode = input("Choose Mode (currently [host.vore_selected.item_digest_mode])") as null|anything in menu_list
+ var/new_mode = tgui_input_list(usr, "Choose Mode (currently [host.vore_selected.item_digest_mode])", "Mode Choice", menu_list)
if(!new_mode)
return FALSE
@@ -659,14 +659,14 @@
. = TRUE
if("b_contamination_flavor")
var/list/menu_list = contamination_flavors.Copy()
- var/new_flavor = input("Choose Contamination Flavor Text Type (currently [host.vore_selected.contamination_flavor])") as null|anything in menu_list
+ var/new_flavor = tgui_input_list(usr, "Choose Contamination Flavor Text Type (currently [host.vore_selected.contamination_flavor])", "Flavor Choice", menu_list)
if(!new_flavor)
return FALSE
host.vore_selected.contamination_flavor = new_flavor
. = TRUE
if("b_contamination_color")
var/list/menu_list = contamination_colors.Copy()
- var/new_color = input("Choose Contamination Color (currently [host.vore_selected.contamination_color])") as null|anything in menu_list
+ var/new_color = tgui_input_list(usr, "Choose Contamination Color (currently [host.vore_selected.contamination_color])", "Color Choice", menu_list)
if(!new_color)
return FALSE
host.vore_selected.contamination_color = new_color
@@ -674,7 +674,7 @@
. = TRUE
if("b_egg_type")
var/list/menu_list = global_vore_egg_types.Copy()
- var/new_egg_type = input("Choose Egg Type (currently [host.vore_selected.egg_type])") as null|anything in menu_list
+ var/new_egg_type = tgui_input_list(usr, "Choose Egg Type (currently [host.vore_selected.egg_type])", "Egg Choice", menu_list)
if(!new_egg_type)
return FALSE
host.vore_selected.egg_type = new_egg_type
@@ -777,9 +777,9 @@
if("b_release")
var/choice
if(host.vore_selected.fancy_vore)
- choice = input(user,"Currently set to [host.vore_selected.release_sound]","Select Sound") as null|anything in fancy_release_sounds
+ choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", fancy_release_sounds)
else
- choice = input(user,"Currently set to [host.vore_selected.release_sound]","Select Sound") as null|anything in classic_release_sounds
+ choice = tgui_input_list(user,"Currently set to [host.vore_selected.release_sound]","Select Sound", classic_release_sounds)
if(!choice)
return FALSE
@@ -799,9 +799,9 @@
if("b_sound")
var/choice
if(host.vore_selected.fancy_vore)
- choice = input(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound") as null|anything in fancy_vore_sounds
+ choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", fancy_vore_sounds)
else
- choice = input(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound") as null|anything in classic_vore_sounds
+ choice = tgui_input_list(user,"Currently set to [host.vore_selected.vore_sound]","Select Sound", classic_vore_sounds)
if(!choice)
return FALSE
@@ -910,7 +910,7 @@
host.vore_selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(host.vore_selected.transferchance))
. = TRUE
if("b_transferlocation")
- var/obj/belly/choice = input("Where do you want your [lowertext(host.vore_selected.name)] to lead if prey resists?","Select Belly") as null|anything in (host.vore_organs + "None - Remove" - host.vore_selected)
+ var/obj/belly/choice = tgui_input_list(usr, "Where do you want your [lowertext(host.vore_selected.name)] to lead if prey resists?","Select Belly", (host.vore_organs + "None - Remove" - host.vore_selected))
if(!choice) //They cancelled, no changes
return FALSE
diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm
index b25cea22915..cf086498d7a 100644
--- a/code/modules/vore/resizing/sizegun_vr.dm
+++ b/code/modules/vore/resizing/sizegun_vr.dm
@@ -41,7 +41,7 @@
set category = "Object"
set src in view(1)
- var/size_select = input("Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num|null
+ var/size_select = input(usr, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num|null
if(!size_select)
return //cancelled
//We do valid resize testing in actual firings because people move after setting these things.
@@ -66,7 +66,7 @@
set category = "Object"
set src in view(1)
- var/size_select = input("Put the desired size (1-600%)", "Set Size", size_set_to * 100) as num|null
+ var/size_select = input(usr, "Put the desired size (1-600%)", "Set Size", size_set_to * 100) as num|null
if(!size_select)
return //cancelled
size_set_to = clamp((size_select/100), 0, 1000) //eheh
diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm
index e2ee0173498..3344afa24e3 100644
--- a/code/modules/xenoarcheaology/artifacts/artifact.dm
+++ b/code/modules/xenoarcheaology/artifacts/artifact.dm
@@ -85,11 +85,11 @@
secondary_effect.trigger = predefined_trig_secondary
/obj/machinery/artifact/proc/choose_effect()
- var/effect_type = input(usr, "What type do you want?", "Effect Type") as null|anything in typesof(/datum/artifact_effect) - /datum/artifact_effect
+ var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", typesof(/datum/artifact_effect) - /datum/artifact_effect)
if(effect_type)
my_effect = new effect_type(src)
if(tgui_alert(usr, "Do you want a secondary effect?", "Second Effect", list("No", "Yes")) == "Yes")
- var/second_effect_type = input(usr, "What type do you want as well?", "Second Effect Type") as null|anything in typesof(/datum/artifact_effect) - list(/datum/artifact_effect, effect_type)
+ var/second_effect_type = tgui_input_list(usr, "What type do you want as well?", "Second Effect Type", typesof(/datum/artifact_effect) - list(/datum/artifact_effect, effect_type))
secondary_effect = new second_effect_type(src)
else
secondary_effect = null
diff --git a/code/modules/xenoarcheaology/finds/fossils.dm b/code/modules/xenoarcheaology/finds/fossils.dm
index 91fe2456439..89d83efa4e9 100644
--- a/code/modules/xenoarcheaology/finds/fossils.dm
+++ b/code/modules/xenoarcheaology/finds/fossils.dm
@@ -76,7 +76,7 @@
else
..()
else if(istype(W,/obj/item/weapon/pen))
- plaque_contents = sanitize(input("What would you like to write on the plaque:","Skeleton plaque",""))
+ plaque_contents = sanitize(input(usr, "What would you like to write on the plaque:","Skeleton plaque",""))
user.visible_message("[user] writes something on the base of [src].","You relabel the plaque on the base of [bicon(src)] [src].")
if(src.contents.Find(/obj/item/weapon/fossil/skull/horned))
src.desc = "A creature made of [src.contents.len-1] assorted bones and a horned skull. The plaque reads \'[plaque_contents]\'."
diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm
index d9e00f64e99..7962976a0e5 100644
--- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm
+++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm
@@ -174,7 +174,7 @@
attack_verb = list("drilled")
/obj/item/weapon/pickaxe/excavationdrill/attack_self(mob/user as mob)
- var/depth = input("Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num
+ var/depth = input(usr, "Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num
if(depth>30 || depth<1)
to_chat(user, "Invalid depth.")
return
diff --git a/maps/gateway_archive_vr/wildwest.dm b/maps/gateway_archive_vr/wildwest.dm
index 76663b5973c..cb1167d0dcd 100644
--- a/maps/gateway_archive_vr/wildwest.dm
+++ b/maps/gateway_archive_vr/wildwest.dm
@@ -41,7 +41,7 @@
else
chargesa--
insistinga = 0
- var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
+ var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace"))
switch(wish)
if("Power")
to_chat(user, "Your wish is granted, but at a terrible cost...")
diff --git a/maps/gateway_vr/wildwest.dm b/maps/gateway_vr/wildwest.dm
index e2c0d2cb9a1..36317745d61 100644
--- a/maps/gateway_vr/wildwest.dm
+++ b/maps/gateway_vr/wildwest.dm
@@ -45,7 +45,7 @@
else
chargesa--
insistinga = 0
- var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","Immortality","To Kill","Peace")
+ var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace"))
switch(wish)
if("Power")
to_chat(user, "Your wish is granted, but at a terrible cost...")