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: