diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 067fc6d1d8..c4643632dc 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -147,7 +147,7 @@ var/global/vs_control/vsc = new
var/newvar = vw
switch(how)
if("Numeric")
- newvar = input(user,"Enter a number:","Settings",newvar) as num
+ newvar = tgui_input_number(user,"Enter a number:","Settings",newvar)
if("Bit Flag")
var/flag = tgui_input_list(user,"Toggle which bit?","Settings", bitflags)
flag = text2num(flag)
@@ -158,9 +158,9 @@ var/global/vs_control/vsc = new
if("Toggle")
newvar = !newvar
if("Text")
- newvar = input(user,"Enter a string:","Settings",newvar) as text
+ newvar = tgui_input_text(user,"Enter a string:","Settings",newvar)
if("Long Text")
- newvar = input(user,"Enter text:","Settings",newvar) as message
+ newvar = tgui_input_text(user,"Enter text:","Settings",newvar, multiline = TRUE)
vw = newvar
if(ch in plc.settings)
plc.vars[ch] = vw
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index 94914550b3..286b5f6693 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -344,7 +344,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/newname
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
- newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
+ newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname)
if((world.time-time_passed)>3000)
return //took too long
newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
@@ -1364,7 +1364,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(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text
+ value = tgui_input_text(usr, "Enter type to find (blank for all, cancel to cancel)", "Search for type")
if (isnull(value))
return
value = trim(value)
diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm
index 40e5977c83..39d36738aa 100644
--- a/code/_onclick/hud/movable_screen_objects.dm
+++ b/code/_onclick/hud/movable_screen_objects.dm
@@ -114,7 +114,7 @@
M.maptext = "Movable"
M.maptext_width = 64
- var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object") as text
+ var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Movable UI Object")
if(!screen_l)
return
@@ -133,7 +133,7 @@
S.maptext = "Snap"
S.maptext_width = 64
- var/screen_l = input(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object") as text
+ var/screen_l = tgui_input_text(usr,"Where on the screen? (Formatted as 'X,Y' e.g: '1,1' for bottom left)","Spawn Snap UI Object")
if(!screen_l)
return
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index 06a6060227..5315a3dbe8 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -350,13 +350,13 @@ SUBSYSTEM_DEF(game_master)
choose_game_master(usr)
if(href_list["set_staleness"])
- var/amount = input(usr, "How much staleness should there be?", "Game Master") as null|num
+ var/amount = tgui_input_number(usr, "How much staleness should there be?", "Game Master")
if(!isnull(amount))
staleness = amount
message_admins("GM staleness was set to [amount] by [usr.key].")
if(href_list["set_danger"])
- var/amount = input(usr, "How much danger should there be?", "Game Master") as null|num
+ var/amount = tgui_input_number(usr, "How much danger should there be?", "Game Master")
if(!isnull(amount))
danger = amount
message_admins("GM danger was set to [amount] by [usr.key].")
diff --git a/code/controllers/subsystems/media_tracks.dm b/code/controllers/subsystems/media_tracks.dm
index 53805bcbec..58fd0ec858 100644
--- a/code/controllers/subsystems/media_tracks.dm
+++ b/code/controllers/subsystems/media_tracks.dm
@@ -74,7 +74,7 @@ SUBSYSTEM_DEF(media_tracks)
return
// Required
- var/url = input(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL") as message|null
+ var/url = tgui_input_text(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL", multiline = TRUE)
if(!url)
return
@@ -112,20 +112,20 @@ SUBSYSTEM_DEF(media_tracks)
sort_tracks()
return
- var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
+ var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
- var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
+ var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
- var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
+ var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
- var/genre = input(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre") as text|null
+ var/genre = tgui_input_text(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre")
if(isnull(genre)) // Cancel rather than empty string
return
@@ -160,7 +160,7 @@ SUBSYSTEM_DEF(media_tracks)
if(!check_rights(R_DEBUG|R_FUN))
return
- var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
+ var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm
index af096c33a8..c30d559e4b 100644
--- a/code/controllers/subsystems/supply.dm
+++ b/code/controllers/subsystems/supply.dm
@@ -363,15 +363,15 @@ SUBSYSTEM_DEF(supply)
// Will add an item entry to the specified export receipt on the user-side list
/datum/controller/subsystem/supply/proc/add_export_item(var/datum/exported_crate/E, var/mob/user)
- var/new_name = input(user, "Name", "Please enter the name of the item.") as null|text
+ var/new_name = tgui_input_text(user, "Name", "Please enter the name of the item.")
if(!new_name)
return
- var/new_quantity = input(user, "Name", "Please enter the quantity of the item.") as null|num
+ var/new_quantity = tgui_input_number(user, "Name", "Please enter the quantity of the item.")
if(!new_quantity)
return
- var/new_value = input(user, "Name", "Please enter the value of the item.") as null|num
+ var/new_value = tgui_input_number(user, "Name", "Please enter the value of the item.")
if(!new_value)
return
diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm
index 61ba792151..352550a9a5 100644
--- a/code/controllers/subsystems/vote.dm
+++ b/code/controllers/subsystems/vote.dm
@@ -231,11 +231,11 @@ SUBSYSTEM_DEF(vote)
choices.Add(antag.role_text)
choices.Add("None")
if(VOTE_CUSTOM)
- question = sanitizeSafe(input(usr, "What is the vote for?") as text|null)
+ question = sanitizeSafe(tgui_input_text(usr, "What is the vote for?"))
if(!question)
return 0
for(var/i = 1 to 10)
- var/option = capitalize(sanitize(input(usr, "Please enter an option or hit cancel to finish") as text|null))
+ var/option = capitalize(sanitize(tgui_input_text(usr, "Please enter an option or hit cancel to finish")))
if(!option || mode || !usr.client)
break
choices.Add(option)
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 75c3c64c7f..8da8bab272 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:", "Add Component/Element", names)
+ var/result = tgui_input_text(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/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm
index b380018bea..da7a028240 100644
--- a/code/datums/managed_browsers/feedback_form.dm
+++ b/code/datums/managed_browsers/feedback_form.dm
@@ -99,7 +99,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
if(href_list["feedback_edit_body"])
// This is deliberately not sanitized here, and is instead checked when hitting the submission button,
// as we want to give the user a chance to fix it without needing to rewrite the whole thing.
- feedback_body = input(my_client, "Please write your feedback here.", "Feedback Body", feedback_body) as null|message
+ feedback_body = tgui_input_text(my_client, "Please write your feedback here.", "Feedback Body", feedback_body, multiline = TRUE)
display() // Refresh the window with new information.
return
diff --git a/code/datums/managed_browsers/feedback_viewer.dm b/code/datums/managed_browsers/feedback_viewer.dm
index 895bd36fae..0236036338 100644
--- a/code/datums/managed_browsers/feedback_viewer.dm
+++ b/code/datums/managed_browsers/feedback_viewer.dm
@@ -132,29 +132,29 @@
return
if(href_list["filter_id"])
- var/id_to_search = input(my_client, "Write feedback ID here.", "Filter by ID", null) as null|num
+ var/id_to_search = tgui_input_number(my_client, "Write feedback ID here.", "Filter by ID", null)
if(id_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_ID, id_to_search, TRUE)
if(href_list["filter_author"])
- var/author_to_search = input(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null) as null|text
+ var/author_to_search = tgui_input_text(my_client, "Write desired key or hash here. Partial keys/hashes are allowed.", "Filter by Author", null)
if(author_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_AUTHOR, author_to_search)
if(href_list["filter_topic"])
- var/topic_to_search = input(my_client, "Write desired topic here. Partial topics are allowed. \
- \nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null) as null|text
+ var/topic_to_search = tgui_input_text(my_client, "Write desired topic here. Partial topics are allowed. \
+ \nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null)
if(topic_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_TOPIC, topic_to_search)
if(href_list["filter_content"])
- var/content_to_search = input(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null) as null|message
+ var/content_to_search = tgui_input_text(my_client, "Write desired content to find here. Partial matches are allowed.", "Filter by Content", null, multiline = TRUE)
if(content_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_CONTENT, content_to_search)
if(href_list["filter_datetime"])
- var/datetime_to_search = input(my_client, "Write desired datetime. Partial matches are allowed.\n\
- Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null) as null|text
+ var/datetime_to_search = tgui_input_text(my_client, "Write desired datetime. Partial matches are allowed.\n\
+ Format is 'YYYY-MM-DD HH:MM:SS'.", "Filter by Datetime", null)
if(datetime_to_search)
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_DATETIME, datetime_to_search)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 736fdff021..34b4105e86 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -190,7 +190,7 @@
assigned_role = new_role
else if (href_list["memory_edit"])
- var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
+ var/new_memo = sanitize(tgui_input_text("Write new memory", "Memory", memory, multiline = TRUE))
if (isnull(new_memo)) return
memory = new_memo
@@ -198,7 +198,7 @@
var/datum/mind/mind = locate(href_list["amb_edit"])
if(!mind)
return
- var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
+ var/new_ambition = tgui_input_text("Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE)
if(isnull(new_ambition))
return
if(mind)
@@ -296,7 +296,7 @@
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
- var/target_number = input("Input target number:", "Objective", def_num) as num|null
+ var/target_number = tgui_input_number("Input target number:", "Objective", def_num)
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
@@ -314,7 +314,7 @@
new_objective.target_amount = target_number
if ("custom")
- var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
+ var/expl = sanitize(tgui_input_text("Custom objective:", "Objective", objective ? objective.explanation_text : ""))
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
@@ -410,7 +410,7 @@
// var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink() No longer needed, uses stored in mind
var/crystals
crystals = tcrystals
- crystals = input("Amount of telecrystals for [key]", crystals) as null|num
+ crystals = tgui_input_number("Amount of telecrystals for [key]", crystals)
if (!isnull(crystals))
tcrystals = crystals
diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm
index f1db67a647..f6742fb815 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(usr, "Enter your announcement title.", "Announcement Title") as null|text)
+ var/title = sanitize(tgui_input_text(usr, "Enter your announcement title.", "Announcement Title"))
if(!title)
return
- var/message = sanitize(input(usr, "Enter your announcement message.", "Announcement Title") as null|text)
+ var/message = sanitize(tgui_input_text(usr, "Enter your announcement message.", "Announcement Title"))
if(!message)
return
return list("title" = title, "message" = message)
diff --git a/code/game/antagonist/antagonist_objectives.dm b/code/game/antagonist/antagonist_objectives.dm
index c2c56c7be1..223db7dda8 100644
--- a/code/game/antagonist/antagonist_objectives.dm
+++ b/code/game/antagonist/antagonist_objectives.dm
@@ -41,9 +41,9 @@
to_chat(src, "While you may perhaps have goals, this verb's meant to only be visible \
to antagonists. Please make a bug report!")
return
- var/new_ambitions = input(src, "Write a short sentence of what your character hopes to accomplish \
+ var/new_ambitions = tgui_input_text(src, "Write a short sentence of what your character hopes to accomplish \
today as an antagonist. Remember that this is purely optional. It will be shown at the end of the \
- round for everybody else.", "Ambitions", mind.ambitions) as null|message
+ round for everybody else.", "Ambitions", mind.ambitions, multiline = TRUE)
if(isnull(new_ambitions))
return
new_ambitions = sanitize(new_ambitions)
diff --git a/code/game/base_turf.dm b/code/game/base_turf.dm
index 3f78c6fba4..238015d6ed 100644
--- a/code/game/base_turf.dm
+++ b/code/game/base_turf.dm
@@ -19,7 +19,7 @@
if(!holder) return
- var/choice = input(usr, "Which Z-level do you wish to set the base turf for?") as num|null
+ var/choice = tgui_input_number(usr, "Which Z-level do you wish to set the base turf for?")
if(!choice)
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 d8229e1562..2ee412194e 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(usr, "Select message title: ")
- var/text = input(usr, "Select message text: ")
+ var/title = tgui_input_text(usr, "Select message title: ")
+ var/text = tgui_input_text(usr, "Select message text: ")
if(!title || !text || !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 aec6442f8d..3b8f8360d8 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -160,7 +160,7 @@
to_chat(usr, "You set the pinpointer to locate [targetitem]")
if("DNA")
- var/DNAstring = input(usr, "Input DNA string to search for." , "Please Enter String." , "")
+ var/DNAstring = tgui_input_text(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 cb2a3fcb4b..9b6b532f96 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -481,7 +481,7 @@ var/global/list/all_objectives = list()
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
qdel(tmp_obj)
- custom_name = sanitize(input(usr, "Enter target name:", "Objective target", custom_name) as text|null)
+ custom_name = sanitize(tgui_input_text(usr, "Enter target name:", "Objective target", custom_name))
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
diff --git a/code/game/gamemodes/technomancer/spells/illusion.dm b/code/game/gamemodes/technomancer/spells/illusion.dm
index dcadf53ffb..ab83319bc5 100644
--- a/code/game/gamemodes/technomancer/spells/illusion.dm
+++ b/code/game/gamemodes/technomancer/spells/illusion.dm
@@ -49,12 +49,12 @@
if("Cancel")
return
if("Speak")
- var/what_to_say = input(user, "What do you want \the [illusion] to say?","Illusion Speak") as null|text
+ var/what_to_say = tgui_input_text(user, "What do you want \the [illusion] to say?","Illusion Speak")
//what_to_say = sanitize(what_to_say) //Sanitize occurs inside say() already.
if(what_to_say)
illusion.say(what_to_say)
if("Emote")
- var/what_to_emote = input(user, "What do you want \the [illusion] to do?","Illusion Emote") as null|text
+ var/what_to_emote = tgui_input_text(user, "What do you want \the [illusion] to do?","Illusion Emote")
if(what_to_emote)
illusion.emote(what_to_emote)
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index dd653d746a..ca40f0dc53 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -675,7 +675,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(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
+ var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature)
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")
@@ -729,7 +729,7 @@
var/env = params["env"]
var/name = params["var"]
- var/value = input(usr, "New [name] for [env]:", name, TLV[env][name]) as num|null
+ var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name])
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 f9a1437041..364d4bf377 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(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20) as num
+ var/new_temp = tgui_input_number(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20)
if(!Adjacent(user) || user.incapacitated())
return
new_temp = convert_c2k(new_temp)
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index bc8a8081d0..3e8cf00207 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -176,7 +176,7 @@
if(!isnull(materials.get_material_amount(material)) && materials.get_material_amount(material) < round(making.resources[material] * coeff))
max_sheets = 0
//Build list of multipliers for sheets.
- multiplier = input(usr, "How many do you want to print? (0-[max_sheets])") as num|null
+ multiplier = tgui_input_number(usr, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0)
if(!multiplier || multiplier <= 0 || multiplier > max_sheets || tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 1e6cc6030a..5bc0272997 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(usr, "Enter pin code", "Vendor transaction") as num
+ var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction")
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index f95e864c4f..24b97e2099 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -170,15 +170,15 @@
mode = params["mode"]
if("giv_name")
- var/nam = sanitizeName(input(usr, "Person pass is issued to", "Name", giv_name) as text|null)
+ var/nam = sanitizeName(tgui_input_text(usr, "Person pass is issued to", "Name", giv_name))
if(nam)
giv_name = nam
if("reason")
- var/reas = sanitize(input(usr, "Reason why pass is issued", "Reason", reason) as text|null)
+ var/reas = sanitize(tgui_input_text(usr, "Reason why pass is issued", "Reason", reason))
if(reas)
reason = reas
if("duration")
- var/dur = input(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration") as num|null //VOREStation Edit
+ var/dur = tgui_input_number(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration", null, 360, 0)
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 5962f9aa8f..ec5a1f5fcd 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -243,7 +243,7 @@
. = TRUE
//Change the password - KEY REQUIRED
if("pass")
- var/dkey = trim(input(usr, "Please enter the current decryption key.") as text|null)
+ var/dkey = trim(tgui_input_text(usr, "Please enter the current decryption key."))
if(dkey && dkey != "")
if(linkedServer.decryptkey == dkey)
var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
@@ -325,7 +325,7 @@
. = TRUE
if("addtoken")
- linkedServer.spamfilter += input(usr,"Enter text you want to be filtered out","Token creation") as text|null
+ linkedServer.spamfilter += tgui_input_text(usr,"Enter text you want to be filtered out","Token creation")
. = TRUE
if("deltoken")
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index fa0a2ebce0..4f2b4fd4e8 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -82,7 +82,7 @@
to_chat(usr, "Unauthorized Access.")
. = TRUE
if("warn")
- var/warning = sanitize(input(usr, "Message:", "Enter your message here!", ""))
+ var/warning = sanitize(tgui_input_text(usr, "Message:", "Enter your message here!", ""))
if(!warning)
return
var/obj/item/weapon/implant/I = locate(params["imp"])
diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm
index e805e151bd..ce345e429e 100644
--- a/code/game/machinery/computer/supply.dm
+++ b/code/game/machinery/computer/supply.dm
@@ -221,12 +221,12 @@
visible_message("[src]'s monitor flashes, \"[reqtime - world.time] seconds remaining until another requisition form may be printed.\"")
return FALSE
- var/amount = clamp(input(usr, "How many crates? (0 to 20)") as num|null, 0, 20)
+ var/amount = clamp(tgui_input_number(usr, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20)
if(!amount)
return FALSE
var/timeout = world.time + 600
- var/reason = sanitize(input(usr, "Reason:","Why do you require this item?","") as null|text)
+ var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?",""))
if(world.time > timeout)
to_chat(usr, "Error. Request timed out.")
return FALSE
@@ -280,7 +280,7 @@
return FALSE
var/timeout = world.time + 600
- var/reason = sanitize(input(usr, "Reason:","Why do you require this item?","") as null|text)
+ var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?",""))
if(world.time > timeout)
to_chat(usr, "Error. Request timed out.")
return FALSE
@@ -323,7 +323,7 @@
return FALSE
if(!(authorization & SUP_ACCEPT_ORDERS))
return FALSE
- var/new_val = sanitize(input(usr, params["edit"], "Enter the new value for this field:", params["default"]) as null|text)
+ var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"]))
if(!new_val)
return FALSE
@@ -396,7 +396,7 @@
var/list/L = E.contents[params["index"]]
var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value"))
- var/new_val = sanitize(input(usr, field, "Enter the new value for this field:", L[lowertext(field)]) as null|text)
+ var/new_val = sanitize(tgui_input_text(usr, field, "Enter the new value for this field:", L[lowertext(field)]))
if(!new_val)
return
@@ -439,7 +439,7 @@
return FALSE
if(!(authorization & SUP_ACCEPT_ORDERS))
return FALSE
- var/new_val = sanitize(input(usr, params["edit"], "Enter the new value for this field:", params["default"]) as null|text)
+ var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"]))
if(!new_val)
return
diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm
index d2f6074c78..7412f6b464 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(usr, "Enter a custom job assignment.","Assignment"))
+ var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"))
if(temp_t)
t1 = temp_t
set_default_access(t1)
diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm
index 70c97af29d..315b56e847 100644
--- a/code/game/machinery/gear_dispenser.dm
+++ b/code/game/machinery/gear_dispenser.dm
@@ -693,7 +693,7 @@ var/list/dispenser_presets = list()
* "gearlist" = array of types (yes the types are not valid json, byond parses them into real types.)
* "req_one_access" = array of numbers (accesses)
*/
- var/input = input(usr, "Paste new gear pack JSON below. See example/code comments.", "Admin-load Dispenser", example) as null|message
+ var/input = tgui_input_text(usr, "Paste new gear pack JSON below. See example/code comments.", "Admin-load Dispenser", example, multiline = TRUE)
if(!input)
return
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 955b99009a..0e184683ec 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -401,20 +401,20 @@
return
// Required
- var/url = input(C, "REQUIRED: Provide URL for track", "Track URL") as text|null
+ var/url = tgui_input_text(C, "REQUIRED: Provide URL for track", "Track URL")
if(!url)
return
- var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
+ var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
- var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
+ var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
- var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
+ var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
@@ -428,7 +428,7 @@
if(!check_rights(R_FUN|R_ADMIN))
return
- var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
+ var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index f713cea2d0..e2b76f3632 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -314,7 +314,7 @@
if(speed <= 0)
speed = 1
if("setpath")
- var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
+ var/newpath = sanitize(tgui_input_text(usr, "Please define a new path!",,path))
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm
index 7e6721f109..1002e3fa21 100644
--- a/code/game/machinery/mass_driver.dm
+++ b/code/game/machinery/mass_driver.dm
@@ -28,7 +28,7 @@
if(istype(I, /obj/item/device/multitool))
if(panel_open)
- var/input = sanitize(input(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id))
+ var/input = sanitize(tgui_input_text(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 90a623d0b9..1e1fff180e 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(usr, "Enter New Location", "Navigation Beacon", location) as text|null)
+ var/newloc = sanitize(tgui_input_text(usr, "Enter New Location", "Navigation Beacon", location))
if(newloc)
location = newloc
updateDialog()
@@ -158,12 +158,12 @@ Transponder Codes:"}
else if(href_list["edit"])
var/codekey = href_list["code"]
- var/newkey = input(usr, "Enter Transponder Code Key", "Navigation Beacon", codekey) as text|null
+ var/newkey = tgui_input_text(usr, "Enter Transponder Code Key", "Navigation Beacon", codekey)
if(!newkey)
return
var/codeval = codes[codekey]
- var/newval = input(usr, "Enter Transponder Code Value", "Navigation Beacon", codeval) as text|null
+ var/newval = tgui_input_text(usr, "Enter Transponder Code Value", "Navigation Beacon", codeval)
if(!newval)
newval = codekey
return
@@ -180,11 +180,11 @@ Transponder Codes:"}
else if(href_list["add"])
- var/newkey = input(usr, "Enter New Transponder Code Key", "Navigation Beacon") as text|null
+ var/newkey = tgui_input_text(usr, "Enter New Transponder Code Key", "Navigation Beacon")
if(!newkey)
return
- var/newval = input(usr, "Enter New Transponder Code Value", "Navigation Beacon") as text|null
+ var/newval = tgui_input_text(usr, "Enter New Transponder Code Value", "Navigation Beacon")
if(!newval)
newval = "1"
return
diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm
index 68ac2e2a3f..f19b80befc 100644
--- a/code/game/machinery/pointdefense.dm
+++ b/code/game/machinery/pointdefense.dm
@@ -94,7 +94,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
/obj/machinery/pointdefense_control/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool())
- var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
+ var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag)
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
// Check for duplicate controllers with this ID
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
@@ -211,7 +211,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
/obj/machinery/power/pointdefense/attackby(var/obj/item/W, var/mob/user)
if(W?.is_multitool())
- var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
+ var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "[src]", id_tag)
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
to_chat(user, "You register [src] with the [new_ident] network.")
id_tag = new_ident
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index a8c4e21dbc..7350ca0c1e 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -153,7 +153,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(usr, "Write your message:", "Awaiting Input", ""))
+ var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = RCS_MESSAUTH
@@ -169,7 +169,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
. = TRUE
if("writeAnnouncement")
- var/new_message = sanitize(input(usr, "Write your message:", "Awaiting Input", ""))
+ var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
else
@@ -238,7 +238,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(computer_deconstruction_screwdriver(user, O))
return
if(istype(O, /obj/item/device/multitool))
- var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
+ var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department))
if(!input)
to_chat(usr, "No input found. Please hang up and try your call again.")
return
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index ba63655b9c..461a200481 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -128,7 +128,7 @@
. = TRUE
if("network")
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
+ var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index 384790e60d..3014474b8e 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -26,13 +26,13 @@
data["network"] = network
data["temp"] = temp
- var/list/machinelistData = list()
+ var/list/machinelistData = list()
for(var/obj/machinery/telecomms/T in machinelist)
- machinelistData.Add(list(list(
+ machinelistData.Add(list(list(
"id" = T.id,
"name" = T.name,
)))
- data["machinelist"] = machinelistData
+ data["machinelist"] = machinelistData
data["selectedMachine"] = null
if(SelectedMachine)
@@ -100,7 +100,7 @@
. = TRUE
if("network")
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
+ var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad")
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 4565ab1668..cf7f9946aa 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -192,7 +192,7 @@
if(href_list["network"])
- var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
+ var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm
index d9c4e3b7ce..c3758d0c89 100644
--- a/code/game/objects/items/devices/communicator/UI_tgui.dm
+++ b/code/game/objects/items/devices/communicator/UI_tgui.dm
@@ -376,7 +376,7 @@
to_chat(usr, "Error: Cannot connect to Exonet node.")
return FALSE
var/their_address = params["message"]
- var/text = sanitizeSafe(input(usr,"Enter your message.","Text Message"))
+ var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message"))
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
@@ -424,7 +424,7 @@
selected_tab = params["switch_tab"]
if("edit")
- var/n = input(usr, "Please enter message", name, notehtml) as message|null
+ var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
n = sanitizeSafe(n, extra = 0)
if(n)
note = html_decode(n)
diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm
index a9bc3afe6d..d56ed07c2e 100644
--- a/code/game/objects/items/devices/communicator/messaging.dm
+++ b/code/game/objects/items/devices/communicator/messaging.dm
@@ -102,7 +102,7 @@
switch(href_list["action"])
if("Reply")
var/obj/item/device/communicator/comm = locate(href_list["target"])
- var/message = input(usr, "Enter your message below.", "Reply")
+ var/message = tgui_input_text(usr, "Enter your message below.", "Reply")
if(message)
exonet.send_message(comm.exonet.address, "text", message)
@@ -153,7 +153,7 @@
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
- var/text_message = sanitize(input(src, "What do you want the message to say?") as message)
+ var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", multiline = TRUE))
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 4fb99a9fc0..21ec2ea3b6 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -323,7 +323,7 @@ var/list/GPS_list = list()
. = TRUE
if(href_list["tag"])
- var/a = input(usr, "Please enter desired tag.", name, gps_tag) as text
+ var/a = tgui_input_text(usr, "Please enter desired tag.", name, gps_tag)
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index 55f92f0cc8..26d58082b6 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -40,7 +40,7 @@
user.audible_message("[user.GetVoice()][user.GetAltName()] broadcasts, \"[message]\"", runemessage = message)
/obj/item/device/megaphone/attack_self(var/mob/living/user)
- var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
+ var/message = sanitize(tgui_input_text(user, "Shout a message?", "Megaphone", null))
if(!message)
return
message = capitalize(message)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 0a73ea74c6..1e0183499b 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -49,7 +49,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
var/actual_pai_name
var/turf/location = get_turf(src)
if(choice == "No")
- var/pai_name = input(user, "Choose your character's name", "Character Name") as text
+ var/pai_name = tgui_input_text(user, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -73,7 +73,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
- var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
+ var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -83,7 +83,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
- var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
+ var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -328,7 +328,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
- 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)
+ var/newlaws = sanitize(tgui_input_text(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, multiline = TRUE))
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/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index a4ba173aed..88701319cd 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -417,7 +417,7 @@
return
else if(istype(I, /obj/item/weapon/pen))
if(loc == user && !user.incapacitated())
- var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
+ var/new_name = tgui_input_text(user, "What would you like to label the tape?", "Tape labeling")
if(isnull(new_name)) return
new_name = sanitizeSafe(new_name)
if(new_name)
diff --git a/code/game/objects/items/devices/text_to_speech.dm b/code/game/objects/items/devices/text_to_speech.dm
index 54510fb9a4..330ca97d73 100644
--- a/code/game/objects/items/devices/text_to_speech.dm
+++ b/code/game/objects/items/devices/text_to_speech.dm
@@ -22,7 +22,7 @@
named = 1
*/
- var/message = sanitize(input(user,"Choose a message to relay to those around you.") as text|null)
+ var/message = sanitize(tgui_input_text(user,"Choose a message to relay to those around you."))
if(message)
audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech")
if(ismob(loc))
diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm
index b7d7933a88..78f5a381c7 100644
--- a/code/game/objects/items/devices/tvcamera.dm
+++ b/code/game/objects/items/devices/tvcamera.dm
@@ -65,7 +65,7 @@
if(..())
return 1
if(href_list["channel"])
- var/nc = input(usr, "Channel name", "Select new channel name", channel) as text|null
+ var/nc = tgui_input_text(usr, "Channel name", "Select new channel name", channel)
if(nc)
channel = nc
camera.c_tag = channel
diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm
index 54ed540475..846fae358d 100644
--- a/code/game/objects/items/devices/whistle.dm
+++ b/code/game/objects/items/devices/whistle.dm
@@ -19,7 +19,7 @@
to_chat(usr, "The hailer is fried. The tiny input screen just shows a waving ASCII penis.")
return
- var/new_message = input(usr, "Please enter new message (leave blank to reset).") as text
+ var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).")
if(!new_message || new_message == "")
use_message = "Halt! Security!"
else
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index e366a3e8ee..2eec58b136 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -133,7 +133,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
- var/targName = sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
+ var/targName = sanitize(tgui_input_text(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)
@@ -159,7 +159,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
- var/targName = sanitize(input(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
+ var/targName = sanitize(tgui_input_text(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)
@@ -244,7 +244,7 @@ AI MODULES
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
- var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
+ var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -357,7 +357,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
- var/targName = sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
+ var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -381,7 +381,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
- var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
+ var/targName = sanitize(tgui_input_text(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/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 10f0c8c0a7..ee0ee93a41 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(usr, "Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text)
+ value = sanitize(tgui_input_text(usr, "Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null))
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(usr, "Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
+ value = tgui_input_number(usr, "Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null)
if(!isnum(value) || !value)
to_chat(usr, "Cancelled")
return
diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm
index 4171ea6a37..dfe4ba88e2 100644
--- a/code/modules/admin/ToRban.dm
+++ b/code/modules/admin/ToRban.dm
@@ -77,7 +77,7 @@
if("remove all")
to_chat(src, "[TORFILE] was [fdel(TORFILE)?"":"not "]removed.")
if("find")
- var/input = input(src,"Please input an IP address to search for:","Find ToR ban",null) as null|text
+ var/input = tgui_input_text(src,"Please input an IP address to search for:","Find ToR ban",null)
if(input)
if(ToRban_isbanned(input))
to_chat(src, "Address is a known ToR address")
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index c78614ca43..67df19e943 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -638,12 +638,12 @@ var/datum/announcement/minor/admin_min_announcer = new
var/channel = tgui_input_list(usr, "Channel for message:","Channel", radiochannels)
if(channel) //They picked a channel
- var/sender = input(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
+ var/sender = tgui_input_text(usr, "Name of sender (max 75):", "Announcement", "Announcement Computer")
if(sender) //They put a sender
sender = sanitize(sender, 75, extra = 0)
- var/message = input(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
- var/msgverb = input(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says") as null|text //VOREStation Addition
+ var/message = tgui_input_text(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE)
+ var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
if(message) //They put a message
message = sanitize(message, 500, extra = 0)
//VOREStation Edit Start
@@ -681,7 +681,7 @@ var/datum/announcement/minor/admin_min_announcer = new
The above will result in those messages playing, with a 5 second gap between each. Maximum of 20 messages allowed.")
var/list/decomposed
- var/message = input(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "") as null|message
+ var/message = tgui_input_text(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE)
if(!message)
return
@@ -1047,7 +1047,7 @@ var/datum/announcement/minor/admin_min_announcer = new
if(!seedtype || !SSplants.seeds[seedtype])
return
- var/amount = input(usr, "Amount of fruit to spawn", "Fruit Amount", 1) as null|num
+ var/amount = tgui_input_number(usr, "Amount of fruit to spawn", "Fruit Amount", 1)
if(!isnull(amount))
var/datum/seed/S = SSplants.seeds[seedtype]
S.harvest(usr,0,0,amount)
@@ -1460,7 +1460,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
- crystals = input(usr, "Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
+ crystals = tgui_input_number(usr, "Amount of telecrystals for [H.ckey], currently [H.mind.tcrystals].", crystals)
if (!isnull(crystals))
H.mind.tcrystals = crystals
var/msg = "[key_name(usr)] has modified [H.ckey]'s telecrystals to [crystals]."
@@ -1476,7 +1476,7 @@ var/datum/announcement/minor/admin_min_announcer = new
var/crystals
if(check_rights(R_ADMIN|R_EVENT))
- crystals = input(usr, "Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals) as null|num
+ crystals = tgui_input_number(usr, "Amount of telecrystals to give to [H.ckey], currently [H.mind.tcrystals].", crystals)
if (!isnull(crystals))
H.mind.tcrystals += crystals
var/msg = "[key_name(usr)] has added [crystals] to [H.ckey]'s telecrystals."
@@ -1499,7 +1499,7 @@ var/datum/announcement/minor/admin_min_announcer = new
to_chat(usr, "Error: you are not an admin!")
return
- var/replyorigin = input(src.owner, "Please specify who the fax is coming from", "Origin") as text|null
+ var/replyorigin = tgui_input_text(src.owner, "Please specify who the fax is coming from", "Origin")
var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us
faxreply = P
@@ -1514,7 +1514,7 @@ var/datum/announcement/minor/admin_min_announcer = new
/datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in
/datum/admins/proc/faxCallback(var/obj/item/weapon/paper/admin/P, var/obj/machinery/photocopier/faxmachine/destination)
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
+ var/customname = tgui_input_text(src.owner, "Pick a title for the report", "Title")
P.name = "[P.origin] - [customname]"
P.desc = "This is a paper titled '" + P.name + "'."
diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm
index 57f3fe3197..ba15e99c2d 100644
--- a/code/modules/admin/admin_memo.dm
+++ b/code/modules/admin/admin_memo.dm
@@ -18,7 +18,7 @@
/client/proc/admin_memo_write()
var/savefile/F = new(MEMOFILE)
if(F)
- var/memo = sanitize(input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message, extra = 0)
+ var/memo = sanitize(tgui_input_text(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null, multiline = TRUE), extra = 0)
switch(memo)
if(null)
return
diff --git a/code/modules/admin/admin_report.dm b/code/modules/admin/admin_report.dm
index 6a6a5d241e..db87c39c71 100644
--- a/code/modules/admin/admin_report.dm
+++ b/code/modules/admin/admin_report.dm
@@ -127,7 +127,7 @@ world/New()
if(M.client)
CID = M.client.computer_id
- var/body = input(src.mob, "Describe in detail what you're reporting [M] for", "Report") as null|text
+ var/body = tgui_input_text(src.mob, "Describe in detail what you're reporting [M] for", "Report")
if(!body) return
@@ -174,7 +174,7 @@ world/New()
if(!found)
to_chat(src, "* An error occured, sorry.")
- var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
+ var/body = tgui_input_text(src.mob, "Enter a body for the news", "Body", multiline = TRUE)
if(!body) return
found.body = body
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index db51bd4ed3..81a3e79576 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -200,7 +200,7 @@
if(istype(src.mob, /mob/new_player))
mob.name = capitalize(ckey)
else
- var/new_key = ckeyEx(input(usr, "Enter your desired display name.", "Fake Key", key) as text|null)
+ var/new_key = ckeyEx(tgui_input_text(usr, "Enter your desired display name.", "Fake Key", key))
if(!new_key)
return
if(length(new_key) >= 26)
@@ -274,10 +274,10 @@
if("Big Bomb")
explosion(epicenter, 3, 5, 7, 5)
if("Custom Bomb")
- 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
+ var/devastation_range = tgui_input_number(usr, "Devastation range (in tiles):")
+ var/heavy_impact_range = tgui_input_number(usr, "Heavy impact range (in tiles):")
+ var/light_impact_range = tgui_input_number(usr, "Light impact range (in tiles):")
+ var/flash_range = tgui_input_number(usr, "Flash range (in tiles):")
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!
@@ -297,7 +297,7 @@
if ("Badmin") severity = 99
D.makerandom(severity)
- D.infectionchance = input(usr, "How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
+ D.infectionchance = tgui_input_number(usr, "How virulent is this disease? (1-100)", "Give Disease", D.infectionchance)
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
@@ -328,7 +328,7 @@
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(usr, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") as num
+ var/duration = tgui_input_number(usr, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration")
if(duration == 0)
duration = null
else
@@ -342,7 +342,7 @@
set name = "Make Sound"
set desc = "Display a message to everyone who can hear the target"
if(O)
- var/message = sanitize(input(usr, "What do you want the message to be?", "Make Sound") as text|null)
+ var/message = sanitize(tgui_input_text(usr, "What do you want the message to be?", "Make Sound"))
if(!message)
return
O.audible_message(message)
@@ -426,7 +426,7 @@
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))
+ var/new_name = sanitizeSafe(tgui_input_text(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
if(new_name && new_name != S.real_name)
log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
S.SetName(new_name)
diff --git a/code/modules/admin/admin_verbs_vr.dm b/code/modules/admin/admin_verbs_vr.dm
index 6d92fde40b..994d12a4ea 100644
--- a/code/modules/admin/admin_verbs_vr.dm
+++ b/code/modules/admin/admin_verbs_vr.dm
@@ -39,9 +39,9 @@
if(isturf(orbiter))
to_chat(usr, "The orbiter cannot be a turf. It can only be used as a center.")
return
- var/distance = input(usr, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32) as num|null
- var/speed = input(usr, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20) as num|null
- var/segments = input(usr, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36) as num|null
+ var/distance = tgui_input_number(usr, "How large will their orbit radius be? (In pixels. 32 is 'near around a character)", "Orbit Radius", 32)
+ var/speed = tgui_input_number(usr, "How fast will they orbit (negative numbers spin clockwise)", "Orbit Speed", 20)
+ var/segments = tgui_input_number(usr, "How many segments will they have in their orbit? (3 is a triangle, 36 is a circle, etc)", "Orbit Segments", 36)
var/clock = FALSE
if(!distance)
distance = 32
diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm
index 4a0d3c496f..58e9012277 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(usr, "Proc path, eg: /proc/fake_blood","Path:", null) as text|null
+ var/procname = tgui_input_text(usr, "Proc path, eg: /proc/fake_blood","Path:", null)
if(!procname)
return
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(!check_rights(R_DEBUG))
return
- var/procname = input(usr, "Proc name, eg: fake_blood","Proc:", null) as text|null
+ var/procname = tgui_input_text(usr, "Proc name, eg: fake_blood","Proc:", 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(usr, "Number of arguments","Number:",0) as num|null
+ var/argnum = tgui_input_number(usr, "Number of arguments","Number:",0)
if(isnull(argnum))
return null //Cancel
diff --git a/code/modules/admin/news.dm b/code/modules/admin/news.dm
index 179391987c..3a518bdef0 100644
--- a/code/modules/admin/news.dm
+++ b/code/modules/admin/news.dm
@@ -22,13 +22,13 @@
if(F)
var/title = F["title"]
var/body = html2paper_markup(F["body"])
- var/new_title = sanitize(input(src,"Write a good title for the news update. Note: HTML is NOT supported.","Write News", title) as null|text, extra = 0)
+ var/new_title = sanitize(tgui_input_text(src,"Write a good title for the news update. Note: HTML is NOT supported.","Write News", title), extra = 0)
if(!new_title)
return
- var/new_body = sanitize(input(src,"Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
+ var/new_body = sanitize(tgui_input_text(src,"Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
Hitting enter will automatically add a line break. \n\
Valid markup includes: \[b\], \[i\], \[u\], \[large\], \[h1\], \[h2\], \[h3\]\ \[*\], \[hr\], \[small\], \[list\], \[table\], \[grid\], \
- \[row\], \[cell\], \[logo\], \[sglogo\].","Write News", body) as null|message, extra = 0)
+ \[row\], \[cell\], \[logo\], \[sglogo\].","Write News", body, multiline = TRUE), extra = 0)
new_body = paper_markup2html(new_body)
diff --git a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
index 594b3c34d2..942ff60d77 100644
--- a/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
+++ b/code/modules/admin/secrets/admin_secrets/jump_shuttle.dm
@@ -26,7 +26,7 @@
var/transition_area = tgui_input_list(user, "Which area is the transition area? (MAKE SURE THIS IS CORRECT OR THINGS WILL BREAK)", "Area Choice", area_choices)
if (!transition_area) return
- var/move_duration = input(user, "How many seconds will this jump take?") as num
+ var/move_duration = tgui_input_number(user, "How many seconds will this jump take?")
S.long_jump(area_choices[origin_area], area_choices[destination_area], area_choices[transition_area], move_duration)
message_admins("[key_name_admin(user)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 3b4b817c00..d23239d4b0 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -113,7 +113,7 @@
var/task = href_list["editrights"]
if(task == "add")
- var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
+ var/new_ckey = ckey(tgui_input_text(usr,"New admin's ckey","Admin ckey", null))
if(!new_ckey) return
if(new_ckey in admin_datums)
to_chat(usr, "Error: Topic 'editrights': [new_ckey] is already an admin")
@@ -151,7 +151,7 @@
switch(new_rank)
if(null,"") return
if("*New Rank*")
- new_rank = input(usr, "Please input a new rank", "New custom rank") as null|text
+ new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank")
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
@@ -232,7 +232,7 @@
if(!check_rights(R_SERVER)) return
if (emergency_shuttle.wait_for_launch)
- var/new_time_left = input(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() ) as num
+ var/new_time_left = tgui_input_number(usr, "Enter new shuttle launch countdown (seconds):","Edit Shuttle Launch Time", emergency_shuttle.estimate_launch_time() )
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(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() ) as num
+ var/new_time_left = tgui_input_number(usr, "Enter new shuttle arrival time (seconds):","Edit Shuttle Arrival Time", emergency_shuttle.estimate_arrival_time() )
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]")
@@ -343,12 +343,12 @@
mins = min(525599,mins)
minutes = CMinutes + mins
duration = GetExp(minutes)
- reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
+ reason = sanitize(tgui_input_text(usr,"Reason?","reason",reason2))
if(!reason) return
if("No")
temp = 0
duration = "Perma"
- reason = sanitize(input(usr,"Reason?","reason",reason2) as text|null)
+ reason = sanitize(tgui_input_text(usr,"Reason?","reason",reason2))
if(!reason) return
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
@@ -758,13 +758,13 @@
if(config.ban_legacy_system)
to_chat(usr, "Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.")
return
- var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
+ var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max)
to_chat(usr, " Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!")
return
- var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
+ var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
if(!reason)
return
@@ -789,7 +789,7 @@
return 1
if("No")
if(!check_rights(R_BAN)) return
- var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
+ var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
if(reason)
var/msg
for(var/job in notbannedlist)
@@ -846,7 +846,7 @@
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
- var/reason = sanitize(input(usr, "Please enter reason.") as null|message)
+ var/reason = sanitize(tgui_input_text(usr, "Please enter reason.", multiline = TRUE))
if(!reason)
return
@@ -888,14 +888,14 @@
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel")))
if("Yes")
- var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
+ var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
to_chat(usr, "Moderators can only job tempban up to [config.mod_tempban_max] minutes!")
return
if(mins >= 525600) mins = 525599
- var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
+ var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
@@ -919,7 +919,7 @@
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
if(!check_rights(R_BAN)) return
- var/reason = sanitize(input(usr,"Reason?","reason","Griefer") as text|null)
+ var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
if(!reason)
return
switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel")))
@@ -1045,7 +1045,7 @@
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob")
- 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.
+ var/speech = tgui_input_text(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
@@ -1463,7 +1463,7 @@
return
if(L.can_centcom_reply())
- var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", ""))
+ var/input = sanitize(tgui_input_text(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", ""))
if(!input) return
to_chat(src.owner, "You sent [input] to [L] via a secure channel.")
@@ -1488,7 +1488,7 @@
to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
- var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
+ var/input = sanitize(tgui_input_text(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
if(!input) return
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
@@ -1785,7 +1785,7 @@
src.access_news_network()
else if(href_list["ac_set_channel_name"])
- src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
+ src.admincaster_feed_channel.channel_name = sanitizeSafe(tgui_input_text(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.access_news_network()
else if(href_list["ac_set_channel_lock"])
@@ -1817,11 +1817,11 @@
src.access_news_network()
else if(href_list["ac_set_new_title"])
- src.admincaster_feed_message.title = sanitize(input(usr, "Enter the Feed title", "Network Channel Handler", ""))
+ src.admincaster_feed_message.title = sanitize(tgui_input_text(usr, "Enter the Feed title", "Network Channel Handler", ""))
src.access_news_network()
else if(href_list["ac_set_new_message"])
- src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "") as message)
+ src.admincaster_feed_message.body = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", "", multiline = TRUE))
src.access_news_network()
else if(href_list["ac_submit_new_message"])
@@ -1863,7 +1863,7 @@
src.access_news_network()
else if(href_list["ac_set_wanted_name"])
- src.admincaster_feed_message.author = sanitize(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
+ src.admincaster_feed_message.author = sanitize(tgui_input_text(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.access_news_network()
else if(href_list["ac_set_wanted_desc"])
@@ -1972,7 +1972,7 @@
src.access_news_network()
else if(href_list["ac_set_signature"])
- src.admincaster_signature = sanitize(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
+ src.admincaster_signature = sanitize(tgui_input_text(usr, "Provide your desired signature", "Network Identity Handler", ""))
src.access_news_network()
else if(href_list["populate_inactive_customitems"])
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 2f6cfc3a21..cad1c9fb15 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -459,7 +459,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
usr << browse(dat.Join(), "window=ahelp[id];size=620x480")
/datum/admin_help/proc/Retitle()
- var/new_title = input(usr, "Enter a title for the ticket", "Rename Ticket", name) as text|null
+ var/new_title = tgui_input_text(usr, "Enter a title for the ticket", "Rename Ticket", name)
if(new_title)
name = new_title
//not saying the original name cause it could be a long ass message
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index c108bbf14b..ee127136da 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -210,13 +210,13 @@
if(config.allow_admin_jump)
if(isnull(tx))
- tx = input(usr, "Select X coordinate", "Move Atom", null, null) as null|num
+ tx = tgui_input_number(usr, "Select X coordinate", "Move Atom", null, null)
if(!tx) return
if(isnull(ty))
- ty = input(usr, "Select Y coordinate", "Move Atom", null, null) as null|num
+ ty = tgui_input_number(usr, "Select Y coordinate", "Move Atom", null, null)
if(!ty) return
if(isnull(tz))
- tz = input(usr, "Select Z coordinate", "Move Atom", null, null) as null|num
+ tz = tgui_input_number(usr, "Select Z coordinate", "Move Atom", null, null)
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 a25fac29e9..592b20b358 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -57,7 +57,7 @@
if(AH)
message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.")
- var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
+ var/msg = tgui_input_text(src,"Message:", "Private message to [key_name(C, 0, 0)]")
if (!msg)
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.")
return
@@ -92,7 +92,7 @@
if(!ircreplyamount) //to prevent people from spamming irc
return
if(!msg)
- msg = input(src,"Message:", "Private message to Administrator") as text|null
+ msg = tgui_input_text(src,"Message:", "Private message to Administrator")
if(!msg)
return
@@ -112,7 +112,7 @@
//get message text, limit it's length.and clean/escape html
if(!msg)
- msg = input(src,"Message:", "Private message to [key_name(recipient, 0, 0)]") as text|null
+ msg = tgui_input_text(src,"Message:", "Private message to [key_name(recipient, 0, 0)]")
if(!msg)
return
@@ -188,7 +188,7 @@
spawn() //so we don't hold the caller proc up
var/sender = src
var/sendername = key
- var/reply = input(recipient, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
+ var/reply = tgui_input_text(recipient, msg,"Admin PM from-[sendername]", "") //show message and await a reply
if(recipient && reply)
if(sender)
recipient.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
index 290b04bdde..28649fe3b5 100644
--- a/code/modules/admin/verbs/buildmode.dm
+++ b/code/modules/admin/verbs/buildmode.dm
@@ -257,16 +257,16 @@
if(BUILDMODE_EDIT)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
- master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
+ master.buildmode.varholder = tgui_input_text(usr,"Enter variable name:" ,"Name", "name")
if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0))
return 1
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")
- master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
+ master.buildmode.valueholder = tgui_input_text(usr,"Enter variable value:" ,"Value", "value")
if("number")
- master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
+ master.buildmode.valueholder = tgui_input_number(usr,"Enter variable value:" ,"Value", 123)
if("mob-reference")
master.buildmode.valueholder = tgui_input_list(usr,"Enter variable value:", "Value", mob_list)
if("obj-reference")
@@ -286,11 +286,11 @@
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(usr, "New light range.","Light Maker",3) as null|num
+ var/input = tgui_input_number(usr, "New light range.","Light Maker",3)
if(input)
new_light_range = input
if("Power")
- var/input = input(usr, "New light power.","Light Maker",3) as null|num
+ var/input = tgui_input_number(usr, "New light power.","Light Maker",3)
if(input)
new_light_intensity = input
if("Color")
@@ -625,7 +625,7 @@
return
/obj/effect/bmode/buildmode/proc/get_path_from_partial_text(default_path)
- var/desired_path = input(usr, "Enter full or partial typepath.","Typepath","[default_path]")
+ var/desired_path = tgui_input_text(usr, "Enter full or partial typepath.","Typepath","[default_path]")
var/list/types = typesof(/atom)
var/list/matches = list()
diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm
index 717a8ce5bd..2cafd14ee4 100644
--- a/code/modules/admin/verbs/change_appearance.dm
+++ b/code/modules/admin/verbs/change_appearance.dm
@@ -74,7 +74,7 @@
M.g_skin = hex2num(copytext(new_skin, 4, 6))
M.b_skin = hex2num(copytext(new_skin, 6, 8))
- 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
+ var/new_tone = tgui_input_number(usr, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", null, 220, 1)
if (new_tone)
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm
index 51f0364843..477f2f032c 100644
--- a/code/modules/admin/verbs/cinematic.dm
+++ b/code/modules/admin/verbs/cinematic.dm
@@ -12,7 +12,7 @@
if("explosion")
if(tgui_alert(usr, "The game will be over. Are you really sure?", "Confirmation", list("Continue","Cancel")) == "Cancel")
return
- var/parameter = input(src,"station_missed = ?","Enter Parameter",0) as num
+ var/parameter = tgui_input_number(src,"station_missed = ?","Enter Parameter",0,1,0)
var/override
switch(parameter)
if(1)
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 40635bb7fe..c2e4b671f7 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -152,7 +152,7 @@
if(tgui_alert(pai, "Do you want to load your pAI data?", "Load", list("Yes", "No")) == "Yes")
pai.savefile_load(pai)
else
- pai.name = sanitizeSafe(input(pai, "Enter your pAI name:", "pAI Name", "Personal AI") as text)
+ pai.name = sanitizeSafe(tgui_input_text(pai, "Enter your pAI name:", "pAI Name", "Personal AI"))
card.setPersonality(pai)
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
if(candidate.key == choice.key)
@@ -662,9 +662,9 @@
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
+ var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")))
if(!isnull(new_hour))
- var/new_minute = input(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")) ) as null|num
+ var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")) )
if(!isnull(new_minute))
var/type_needed = current_time_datum.type
var/datum/time/new_time = new type_needed()
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index b70a091980..ce39bbb0b8 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(usr, "Contains what?","Job Filter") as text|null
+ var/job_filter = tgui_input_text(usr, "Contains what?","Job Filter")
if(!job_filter)
return
diff --git a/code/modules/admin/verbs/dice.dm b/code/modules/admin/verbs/dice.dm
index 2aa6f91a66..cc21521859 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(usr, "How many times should we throw?") as num
- var/side = input(usr, "Select the number of sides.") as num
+ var/sum = tgui_input_number(usr, "How many times should we throw?")
+ var/side = tgui_input_number(usr, "Select the number of sides.")
if(!side)
side = 6
if(!sum)
diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm
index 4b357a704d..c3b9999afb 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(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps) as num|null)
+ var/new_fps = round(tgui_input_number(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps))
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/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 66d1e6c74e..fea37f2931 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(usr, "Which z-level?","Level?") as text
+ var/level = tgui_input_text(usr, "Which z-level?","Level?")
if(!level) return
var/num_level = text2num(level)
if(!num_level) return
if(!isnum(num_level)) return
- var/type_text = input(usr, "Which type path?","Path?") as text
+ var/type_text = tgui_input_text(usr, "Which type path?","Path?")
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(usr, "Which type path?","") as text
+ var/type_text = tgui_input_text(usr, "Which type path?","")
if(!type_text) return
var/type_path = text2path(type_text)
if(!type_path) return
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index fcf5d64e7e..850f4f6e25 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -86,7 +86,7 @@
if (!holder)
return
- var/msg = sanitize(input(usr, "Message:", text("Subtle PM to [M.key]")) as text)
+ var/msg = sanitize(tgui_input_text(usr, "Message:", text("Subtle PM to [M.key]")))
if (!msg)
return
@@ -108,7 +108,7 @@
if (!holder)
return
- var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
+ var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
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)
@@ -132,7 +132,7 @@
if(!M)
return
- var/msg = input(usr, "Message:", text("Enter the text you wish to appear to your target:")) as text
+ var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to your target:"))
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)
@@ -575,7 +575,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
- var/input = sanitize(input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null)
+ var/input = sanitize(tgui_input_text(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", ""))
if(!input)
return
for(var/mob/living/silicon/ai/M in mob_list)
@@ -627,8 +627,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!holder)
return
- var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
- var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
+ var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE), extra = 0)
+ var/customname = sanitizeSafe(tgui_input_text(usr, "Pick a title for the report.", "Title"))
if(!input)
return
if(!customname)
@@ -675,13 +675,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(usr, "Range of total devastation. -1 to none", text("Input")) as num|null
+ var/devastation = tgui_input_number(usr, "Range of total devastation. -1 to none", text("Input"))
if(devastation == null) return
- var/heavy = input(usr, "Range of heavy impact. -1 to none", text("Input")) as num|null
+ var/heavy = tgui_input_number(usr, "Range of heavy impact. -1 to none", text("Input"))
if(heavy == null) return
- var/light = input(usr, "Range of light impact. -1 to none", text("Input")) as num|null
+ var/light = tgui_input_number(usr, "Range of light impact. -1 to none", text("Input"))
if(light == null) return
- var/flash = input(usr, "Range of flash. -1 to none", text("Input")) as num|null
+ var/flash = tgui_input_number(usr, "Range of flash. -1 to none", text("Input"))
if(flash == null) return
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1))
@@ -703,13 +703,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(usr, "Range of heavy pulse.", text("Input")) as num|null
+ var/heavy = tgui_input_number(usr, "Range of heavy pulse.", text("Input"))
if(heavy == null) return
- var/med = input(usr, "Range of medium pulse.", text("Input")) as num|null
+ var/med = tgui_input_number(usr, "Range of medium pulse.", text("Input"))
if(med == null) return
- var/light = input(usr, "Range of light pulse.", text("Input")) as num|null
+ var/light = tgui_input_number(usr, "Range of light pulse.", text("Input"))
if(light == null) return
- var/long = input(usr, "Range of long pulse.", text("Input")) as num|null
+ var/long = tgui_input_number(usr, "Range of long pulse.", text("Input"))
if(long == null) return
if (heavy || med || light || long)
diff --git a/code/modules/admin/verbs/randomverbs_vr.dm b/code/modules/admin/verbs/randomverbs_vr.dm
index e60c518248..d19d67916a 100644
--- a/code/modules/admin/verbs/randomverbs_vr.dm
+++ b/code/modules/admin/verbs/randomverbs_vr.dm
@@ -10,7 +10,7 @@
if(!picked_client)
return
var/list/types = typesof(/mob/living)
- var/mob_type = input(src, "Mob path to spawn as?", "Mob") as text
+ var/mob_type = tgui_input_text(src, "Mob path to spawn as?", "Mob")
if(!mob_type)
return
var/list/matches = new()
@@ -81,7 +81,7 @@
if (!holder)
return
- var/msg = input(usr, "Message:", text("Enter the text you wish to appear to everyone:")) as text
+ var/msg = tgui_input_text(usr, "Message:", text("Enter the text you wish to appear to everyone:"))
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/resize.dm b/code/modules/admin/verbs/resize.dm
index 058955799e..dc34053930 100644
--- a/code/modules/admin/verbs/resize.dm
+++ b/code/modules/admin/verbs/resize.dm
@@ -5,7 +5,7 @@
if(!check_rights(R_ADMIN, R_FUN))
return
- var/size_multiplier = input(usr, "Input size multiplier.", "Resize", 1) as num|null
+ var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1)
if(!size_multiplier)
return //cancelled
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index d7b2c1ffff..7724062a6e 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -43,7 +43,7 @@ var/const/commandos_possible = 6 //if more Commandos are needed in the future
choice = null
while(!choice)
- choice = sanitize(input(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
+ choice = sanitize(tgui_input_text(src, "Please specify which mission the strike team shall undertake.", "Specify Mission", ""))
if(!choice)
if(tgui_alert(usr, "Error, no mission set. Do you want to exit the setup process?","Strike Team",list("Yes","No"))=="Yes")
return
diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm
index 64920cdc9e..f3fb4ea145 100644
--- a/code/modules/admin/view_variables/get_variables.dm
+++ b/code/modules/admin/view_variables/get_variables.dm
@@ -85,19 +85,19 @@
switch(.["class"])
if (VV_TEXT)
- .["value"] = input(usr, "Enter new text:", "Text", current_value) as null|text
+ .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value)
if (.["value"] == null)
.["class"] = null
return
if (VV_MESSAGE)
- .["value"] = input(usr, "Enter new text:", "Text", current_value) as null|message
+ .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, multiline = TRUE)
if (.["value"] == null)
.["class"] = null
return
if (VV_NUM)
- .["value"] = input(usr, "Enter new number:", "Num", current_value) as null|num
+ .["value"] = tgui_input_number(usr, "Enter new number:", "Num", current_value)
if (.["value"] == null)
.["class"] = null
return
@@ -124,7 +124,7 @@
var/type = current_value
var/error = ""
do
- type = input(usr, "Enter type:[error]", "Type", type) as null|text
+ type = tgui_input_text(usr, "Enter type:[error]", "Type", type)
if (!type)
break
type = text2path(type)
@@ -229,7 +229,7 @@
var/type = current_value
var/error = ""
do
- type = input(usr, "Enter type:[error]", "Type", type) as null|text
+ type = tgui_input_text(usr, "Enter type:[error]", "Type", type)
if (!type)
break
type = text2path(type)
diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm
index ddab5464e6..a014544090 100644
--- a/code/modules/admin/view_variables/topic.dm
+++ b/code/modules/admin/view_variables/topic.dm
@@ -475,7 +475,7 @@
var/Text = href_list["adjustDamage"]
- var/amount = input(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
+ var/amount = tgui_input_number(usr, "Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0)
if(!L)
to_chat(usr, "Mob doesn't exist anymore")
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 437da93467..0f5fe03f8a 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(usr, "Enter desired time in seconds", "Time", "5") as num
+ var/ntime = tgui_input_number(usr, "Enter desired time in seconds", "Time", "5", 1000, 0)
if (ntime>0 && ntime<1000)
tmr.time = ntime
name = initial(name) + "([tmr.time] secs)"
diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm
index eeb850f688..ce840ad258 100644
--- a/code/modules/casino/casino.dm
+++ b/code/modules/casino/casino.dm
@@ -259,7 +259,7 @@
if(usr.incapacitated())
return
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot))
- interval = input("Put the desired interval (1-1000)", "Set Interval") as num
+ interval = tgui_input_number(usr, "Put the desired interval (1-1000)", "Set Interval", null, 1000, 1)
if(interval>1000 || interval<1)
usr << "Invalid interval."
return
diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm
index 1469c8d8f2..ccd0d491e3 100644
--- a/code/modules/client/preference_setup/general/01_basic.dm
+++ b/code/modules/client/preference_setup/general/01_basic.dm
@@ -81,7 +81,7 @@
/datum/category_item/player_setup_item/general/basic/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["rename"])
- var/raw_name = input(user, "Choose your character's name:", "Character Name") as text|null
+ var/raw_name = tgui_input_text(user, "Choose your character's name:", "Character Name")
if (!isnull(raw_name) && CanUseTopic(user))
var/new_name = sanitize_name(raw_name, pref.species, is_FBP())
if(new_name)
diff --git a/code/modules/client/preference_setup/global/03_pai.dm b/code/modules/client/preference_setup/global/03_pai.dm
index 01c5f7a850..6993e0dc6d 100644
--- a/code/modules/client/preference_setup/global/03_pai.dm
+++ b/code/modules/client/preference_setup/global/03_pai.dm
@@ -46,15 +46,15 @@
if(t && CanUseTopic(user))
candidate.name = t
if("desc")
- t = input(user, "Enter a description for your pAI", "Global Preference", html_decode(candidate.description)) as message|null
+ t = tgui_input_text(user, "Enter a description for your pAI", "Global Preference", html_decode(candidate.description), multiline = TRUE)
if(!isnull(t) && CanUseTopic(user))
candidate.description = sanitize(t)
if("role")
- t = input(user, "Enter a role for your pAI", "Global Preference", html_decode(candidate.role)) as text|null
+ t = tgui_input_text(user, "Enter a role for your pAI", "Global Preference", html_decode(candidate.role))
if(!isnull(t) && CanUseTopic(user))
candidate.role = sanitize(t)
if("ooc")
- t = input(user, "Enter any OOC comments", "Global Preference", html_decode(candidate.comments)) as message
+ t = tgui_input_text(user, "Enter any OOC comments", "Global Preference", html_decode(candidate.comments), multiline = TRUE)
if(!isnull(t) && CanUseTopic(user))
candidate.comments = sanitize(t)
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/vore/09_misc.dm b/code/modules/client/preference_setup/vore/09_misc.dm
index fff3bb6af4..d8937a30eb 100644
--- a/code/modules/client/preference_setup/vore/09_misc.dm
+++ b/code/modules/client/preference_setup/vore/09_misc.dm
@@ -58,7 +58,7 @@
pref.directory_erptag = new_erptag
return TOPIC_REFRESH
else if(href_list["directory_ad"])
- var/msg = sanitize(input(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad)) as message, extra = 0) //VOREStation Edit: separating out OOC notes
+ var/msg = sanitize(tgui_input_text(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
pref.directory_ad = msg
return TOPIC_REFRESH
else if(href_list["toggle_sensor_setting"])
diff --git a/code/modules/client/ui_style.dm b/code/modules/client/ui_style.dm
index 4b321f2f53..8317d977e3 100644
--- a/code/modules/client/ui_style.dm
+++ b/code/modules/client/ui_style.dm
@@ -48,7 +48,7 @@ var/global/list/all_tooltip_styles = list(
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
+ var/UI_style_alpha_new = tgui_input_number(usr, "Select a new alpha (transparency) parameter for your UI, between 50 and 255", null, null, 255, 50)
if(!UI_style_alpha_new || !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
var/UI_style_color_new = input(usr, "Choose your UI color. Dark colors are not recommended!") as color|null
diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm
index 24f7c67c8f..86a9797f09 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(usr, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200) as num|null
+ var/new_size = tgui_input_number(usr, "Put the desired size (25-200%), or (1-600%) in dormitory areas.", "Set Size", 200, 600, 1)
if(!new_size)
return //cancelled
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index ea4f8d59cd..f5a557835d 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -173,7 +173,7 @@
else if(href_list["back"])
selected_event_container = null
else if(href_list["set_name"])
- var/name = sanitize(input(usr, "Enter event name.", "Set Name") as text|null)
+ var/name = sanitize(tgui_input_text(usr, "Enter event name.", "Set Name"))
if(name)
var/datum/event_meta/EM = locate(href_list["set_name"])
EM.name = name
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index f88e06bce1..f9c454e08a 100644
--- a/code/modules/instruments/songs/editor.dm
+++ b/code/modules/instruments/songs/editor.dm
@@ -130,7 +130,7 @@
else if(href_list["import"])
var/t = ""
do
- t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message)
+ t = html_encode(tgui_input_text(usr, "Please paste the entire song, formatted:", text("[]", name), t, multiline = TRUE))
if(!in_range(parent, usr))
return
@@ -163,7 +163,7 @@
INVOKE_ASYNC(src, .proc/start_playing, usr)
else if(href_list["newline"])
- var/newline = html_encode(input(usr, "Enter your line: ", parent.name) as text|null)
+ var/newline = html_encode(tgui_input_text(usr, "Enter your line: ", parent.name))
if(!newline || !in_range(parent, usr))
return
if(lines.len > MUSIC_MAXLINES)
diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm
index 4020d03a34..a52e626dcc 100644
--- a/code/modules/integrated_electronics/core/pins.dm
+++ b/code/modules/integrated_electronics/core/pins.dm
@@ -154,7 +154,7 @@ list[](
var/new_data = null
switch(type_to_use)
if("string")
- new_data = input(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null) as null|text
+ new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null)
if(istext(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/tools.dm b/code/modules/integrated_electronics/core/tools.dm
index e248ffe545..278ddf0947 100644
--- a/code/modules/integrated_electronics/core/tools.dm
+++ b/code/modules/integrated_electronics/core/tools.dm
@@ -122,7 +122,7 @@
switch(type_to_use)
if("string")
accepting_refs = 0
- new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
+ new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing")
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
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index e53b1397de..2d275e2386 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -72,7 +72,7 @@
power_draw_per_use = 4
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
- var/new_input = input(user, "Enter some words, please.","Number pad", get_pin_data(IC_OUTPUT, 1)) as null|text
+ var/new_input = tgui_input_text(user, "Enter some words, please.","Number pad", get_pin_data(IC_OUTPUT, 1))
if(istext(new_input) && CanInteract(user, GLOB.tgui_physical_state))
set_pin_data(IC_OUTPUT, 1, new_input)
push_data()
diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm
index 2fb6ad4598..98c94f2487 100644
--- a/code/modules/integrated_electronics/subtypes/memory.dm
+++ b/code/modules/integrated_electronics/subtypes/memory.dm
@@ -96,7 +96,7 @@
switch(type_to_use)
if("string")
accepting_refs = 0
- new_data = input(usr, "Now type in a string.","[src] string writing") as null|text
+ new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing")
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)].")
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 85a06cd571..421110c391 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -229,7 +229,7 @@ Book Cart End
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(usr, "Write a new title:")))
+ var/newtitle = reject_bad_text(sanitizeSafe(tgui_input_text(usr, "Write a new title:")))
if(!newtitle)
to_chat(usr, "The title is invalid.")
return
@@ -244,7 +244,7 @@ Book Cart End
else
src.dat += content
if("Author")
- var/newauthor = sanitize(input(usr, "Write the author's name:"))
+ var/newauthor = sanitize(tgui_input_text(usr, "Write the author's name:"))
if(!newauthor)
to_chat(usr, "The name is invalid.")
return
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 41f0c8688e..b4ea291cdb 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -73,7 +73,7 @@
return
if(href_list["settitle"])
- var/newtitle = input(usr, "Enter a title to search for:") as text|null
+ var/newtitle = tgui_input_text(usr, "Enter a title to search for:")
if(newtitle)
title = sanitize(newtitle)
else
@@ -87,7 +87,7 @@
category = "Any"
category = sanitizeSQL(category)
if(href_list["setauthor"])
- var/newauthor = input(usr, "Enter an author to search for:") as text|null
+ var/newauthor = tgui_input_text(usr, "Enter an author to search for:")
if(newauthor)
author = sanitize(newauthor)
else
@@ -365,7 +365,7 @@
if(checkoutperiod < 1)
checkoutperiod = 1
if(href_list["editbook"])
- buffer_book = sanitizeSafe(input(usr, "Enter the book's title:") as text|null)
+ buffer_book = sanitizeSafe(tgui_input_text(usr, "Enter the book's title:"))
if(href_list["editmob"])
buffer_mob = sanitize(input(usr, "Enter the recipient's name:") as text|null, MAX_NAME_LEN)
if(href_list["checkout"])
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index 1b043ec8c1..f3a315827d 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -146,7 +146,7 @@
return
to_chat(user, "The crate is locked with a Deca-code lock.")
- var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text
+ var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "")
if(!Adjacent(user))
return
var/list/sanitised = list()
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 26e5963958..eeee042284 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -438,7 +438,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(usr, "Add Comment:", "Sec. records", null, null) as message)
+ var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Sec. records", null, null, multiline = TRUE))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
@@ -555,7 +555,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(usr, "Add Comment:", "Med. records", null, null) as message)
+ var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Med. records", null, null, multiline = TRUE))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
@@ -587,11 +587,11 @@
src << browse(null, "window=flavor_changes")
return
if("general")
- var/msg = sanitize(input(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0) //VOREStation Edit: separating out OOC notes
+ var/msg = sanitize(tgui_input_text(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
flavor_texts[href_list["flavor_change"]] = msg
return
else
- var/msg = sanitize(input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
+ var/msg = sanitize(tgui_input_text(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE), extra = 0)
flavor_texts[href_list["flavor_change"]] = msg
set_flavor()
return
@@ -807,7 +807,7 @@
if (isnull(target))
return
- var/say = sanitize(input(usr, "What do you wish to say"))
+ var/say = sanitize(tgui_input_text(usr, "What do you wish to say"))
if(mRemotetalk in target.mutations)
target.show_message(" You hear [src.real_name]'s voice: [say]")
else
@@ -1205,7 +1205,7 @@
var/max_length = bloody_hands * 30 //tweeter style
- var/message = sanitize(input(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", ""))
+ var/message = sanitize(tgui_input_text(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)
diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm
index a570ed60db..ee2ecc04d7 100644
--- a/code/modules/mob/living/living_vr.dm
+++ b/code/modules/mob/living/living_vr.dm
@@ -12,13 +12,13 @@
var/sayselect = tgui_alert(src, "Which say-verb do you wish to customize?", "Select Verb", list("Say","Whisper","Ask (?)","Exclaim/Shout/Yell (!)","Cancel"))
if(sayselect == "Say")
- custom_say = lowertext(sanitize(input(usr, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null) as text))
+ custom_say = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null)))
else if(sayselect == "Whisper")
- custom_whisper = lowertext(sanitize(input(usr, "This word or phrase will appear instead of 'whispers': [src] whispers, \"Hi...\"", "Custom Whisper", null) as text))
+ custom_whisper = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'whispers': [src] whispers, \"Hi...\"", "Custom Whisper", null)))
else if(sayselect == "Ask (?)")
- custom_ask = lowertext(sanitize(input(usr, "This word or phrase will appear instead of 'asks': [src] asks, \"Hi?\"", "Custom Ask", null) as text))
+ custom_ask = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'asks': [src] asks, \"Hi?\"", "Custom Ask", null)))
else if(sayselect == "Exclaim/Shout/Yell (!)")
- custom_exclaim = lowertext(sanitize(input(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null) as text))
+ custom_exclaim = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null)))
else
return
@@ -27,7 +27,7 @@
set desc = "Sets OOC notes about yourself or your RP preferences or status."
set category = "OOC"
- var/new_metadata = sanitize(input(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes)) as message, extra = 0)
+ var/new_metadata = sanitize(tgui_input_text(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes), multiline = TRUE), extra = 0)
if(new_metadata && CanUseTopic(usr))
ooc_notes = new_metadata
to_chat(usr, "OOC notes updated.")
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index dd3fc5f064..ea15eaa8c3 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -363,7 +363,7 @@ var/list/ai_verbs_default = list(
if(message_cooldown)
to_chat(src, "Please allow one minute to pass between announcements.")
return
- var/input = input(usr, "Please write a message to announce to the station crew.", "A.I. Announcement")
+ var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "A.I. Announcement")
if(!input)
return
@@ -418,7 +418,7 @@ var/list/ai_verbs_default = list(
if(emergency_message_cooldown)
to_chat(usr, "Arrays recycling. Please stand by.")
return
- 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.", "To abort, send an empty message.", ""))
+ var/input = sanitize(tgui_input_text(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.", "To abort, send an empty message.", ""))
if(!input)
return
CentCom_announce(input, usr)
diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm
index a1dd02b163..5bbab6d160 100644
--- a/code/modules/mob/living/silicon/pai/recruit.dm
+++ b/code/modules/mob/living/silicon/pai/recruit.dm
@@ -73,15 +73,15 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(t)
candidate.name = t
if("desc")
- t = input(usr, "Enter a description for your pAI", "pAI Description", candidate.description) as message
+ t = tgui_input_text(usr, "Enter a description for your pAI", "pAI Description", candidate.description, multiline = TRUE)
if(t)
candidate.description = sanitize(t)
if("role")
- t = input(usr, "Enter a role for your pAI", "pAI Role", candidate.role) as text
+ t = tgui_input_text(usr, "Enter a role for your pAI", "pAI Role", candidate.role)
if(t)
candidate.role = sanitize(t)
if("ooc")
- t = input(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
+ t = tgui_input_text(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments, multiline = TRUE)
if(t)
candidate.comments = sanitize(t)
if("save")
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 7caad30448..d014bf30b4 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -259,14 +259,14 @@
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
- pose = sanitize(input(usr, "This is [src]. It is...", "Pose", null) as text)
+ pose = sanitize(tgui_input_text(usr, "This is [src]. It is...", "Pose", null))
/mob/living/silicon/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
- flavor_text = sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text)
+ flavor_text = sanitize(tgui_input_text(usr, "Please enter your new flavour text.", "Flavour text", null))
/mob/living/silicon/binarycheck()
return 1
diff --git a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm
index e72e30fd38..20fdd42f81 100644
--- a/code/modules/modular_computers/file_system/programs/generic/news_browser.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/news_browser.dm
@@ -106,7 +106,7 @@
if(downloading || !loaded_article)
return
- var/savename = sanitize(input(usr, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename))
+ var/savename = sanitize(tgui_input_text(usr, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename))
if(!savename)
return TRUE
var/obj/item/weapon/computer_hardware/hard_drive/HDD = computer.hard_drive
diff --git a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm
index ea88d3597e..8471288b09 100644
--- a/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/nttransfer.dm
@@ -133,7 +133,7 @@ var/global/nttransfer_uid = 0
if(!remote || !remote.provided_file)
return
if(remote.server_password)
- var/pass = sanitize(input(usr, "Code 401 Unauthorized. Please enter password:", "Password required"))
+ var/pass = sanitize(tgui_input_text(usr, "Code 401 Unauthorized. Please enter password:", "Password required"))
if(pass != remote.server_password)
error = "Incorrect Password"
return
@@ -151,7 +151,7 @@ var/global/nttransfer_uid = 0
provided_file = null
return TRUE
if("PRG_setpassword")
- var/pass = sanitize(input(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none"))
+ var/pass = sanitize(tgui_input_text(usr, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none"))
if(!pass)
return
if(pass == "none")
diff --git a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm
index b22be72d1e..44c5a821ae 100644
--- a/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/wordprocessor.dm
@@ -130,7 +130,7 @@
if(tgui_alert(usr, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
save_file(open_file)
- var/newname = sanitize(input(usr, "Enter file name:", "New File") as text|null)
+ var/newname = sanitize(tgui_input_text(usr, "Enter file name:", "New File"))
if(!newname)
return TRUE
var/datum/computer_file/data/F = create_file(newname)
@@ -143,7 +143,7 @@
return TRUE
if("PRG_saveasfile")
- var/newname = sanitize(input(usr, "Enter file name:", "Save As") as text|null)
+ var/newname = sanitize(tgui_input_text(usr, "Enter file name:", "Save As"))
if(!newname)
return TRUE
var/datum/computer_file/data/F = create_file(newname, loaded_data)
@@ -155,7 +155,7 @@
if("PRG_savefile")
if(!open_file)
- open_file = sanitize(input(usr, "Enter file name:", "Save As") as text|null)
+ open_file = sanitize(tgui_input_text(usr, "Enter file name:", "Save As"))
if(!open_file)
return 0
if(!save_file(open_file))
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 752d6d849e..a9ba1d90c0 100644
--- a/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm
+++ b/code/modules/modular_computers/file_system/programs/security/digitalwarrant.dm
@@ -119,7 +119,7 @@ var/warrant_uid = 0
if("editwarrantnamecustom")
. = TRUE
- var/new_name = sanitize(input(usr, "Please input name") as null|text)
+ var/new_name = sanitize(tgui_input_text(usr, "Please input name"))
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_name)
return
@@ -127,7 +127,7 @@ var/warrant_uid = 0
if("editwarrantcharges")
. = TRUE
- var/new_charges = sanitize(input(usr, "Please input charges", "Charges", activewarrant.fields["charges"]) as null|text)
+ var/new_charges = sanitize(tgui_input_text(usr, "Please input charges", "Charges", activewarrant.fields["charges"]))
if(tgui_status(usr, state) == STATUS_INTERACTIVE)
if (!new_charges)
return
diff --git a/code/modules/news/new_newspaper.dm b/code/modules/news/new_newspaper.dm
index c9759a5a83..3962f80cf4 100644
--- a/code/modules/news/new_newspaper.dm
+++ b/code/modules/news/new_newspaper.dm
@@ -134,7 +134,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user)
if(scribble_page == curr_page)
to_chat(user, "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?")
else
- var/s = sanitize(input(user, "Write something", "Newspaper", ""))
+ var/s = sanitize(tgui_input_text(user, "Write something", "Newspaper", ""))
s = sanitize(s)
if(!s)
return
diff --git a/code/modules/news/newspaper.dm b/code/modules/news/newspaper.dm
index 86a1149169..9eae4b19ee 100644
--- a/code/modules/news/newspaper.dm
+++ b/code/modules/news/newspaper.dm
@@ -135,7 +135,7 @@
if(scribble_page == curr_page)
to_chat(user, "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?")
else
- var/s = sanitize(input(user, "Write something", "Newspaper", ""))
+ var/s = sanitize(tgui_input_text(user, "Write something", "Newspaper", ""))
s = sanitize(s)
if(!s)
return
diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm
index ad1af357f1..64e6772a36 100644
--- a/code/modules/nifsoft/nifsoft.dm
+++ b/code/modules/nifsoft/nifsoft.dm
@@ -263,7 +263,7 @@
..(A,user,flag,params)
/obj/item/weapon/disk/nifsoft/compliance/attack_self(mob/user)
- var/newlaws = input(user,"Please Input Laws","Compliance Laws",laws) as message
+ var/newlaws = tgui_input_text(user, "Please Input Laws", "Compliance Laws", laws, multiline = TRUE)
newlaws = sanitize(newlaws,2048)
if(newlaws)
to_chat(user,"You set the laws to:
[newlaws]")
diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm
index 750f1b7df2..a2da8ecdea 100644
--- a/code/modules/nifsoft/software/13_soulcatcher.dm
+++ b/code/modules/nifsoft/software/13_soulcatcher.dm
@@ -494,7 +494,7 @@
to_chat(src,SPAN_WARNING("You need a loaded mind to use NSay."))
return
if(!message)
- message = input(usr, "Type a message to say.","Speak into Soulcatcher") as text|null
+ message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher")
if(message)
var/sane_message = sanitize(message)
SC.say_into(sane_message,src)
@@ -525,7 +525,7 @@
return
if(!message)
- message = input(usr, "Type an action to perform.","Emote into Soulcatcher") as text|null
+ message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher")
if(message)
var/sane_message = sanitize(message)
SC.emote_into(sane_message,src)
@@ -580,7 +580,7 @@
set category = "Soulcatcher"
if(!message)
- message = input(usr, "Type a message to say.","Speak into Soulcatcher") as text|null
+ message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher")
if(message)
var/sane_message = sanitize(message)
soulcatcher.say_into(sane_message,src,null)
@@ -591,7 +591,7 @@
set category = "Soulcatcher"
if(!message)
- message = input(usr, "Type an action to perform.","Emote into Soulcatcher") as text|null
+ message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher")
if(message)
var/sane_message = sanitize(message)
soulcatcher.emote_into(sane_message,src,null)
diff --git a/code/modules/overmap/champagne.dm b/code/modules/overmap/champagne.dm
index 477f9cc072..0d36766535 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(usr, "Choose a name for the shuttle", "New Shuttle Name") as null|text
+ var/shuttle_name = tgui_input_text(usr, "Choose a name for the shuttle", "New Shuttle Name")
if(!shuttle_name || QDELETED(src) || QDELETED(comp) || comp.shuttle_tag || user.incapacitated())
return // After input() safety re-checks
diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm
index 2c821ef793..a388520ae1 100644
--- a/code/modules/overmap/ships/computers/helm.dm
+++ b/code/modules/overmap/ships/computers/helm.dm
@@ -157,7 +157,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
switch(action)
if("add")
var/datum/computer_file/data/waypoint/R = new()
- var/sec_name = input(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
+ var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]")
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(!sec_name)
diff --git a/code/modules/paperwork/adminpaper.dm b/code/modules/paperwork/adminpaper.dm
index 9cf7f2ddf6..91d3fe241c 100644
--- a/code/modules/paperwork/adminpaper.dm
+++ b/code/modules/paperwork/adminpaper.dm
@@ -158,4 +158,4 @@
return
/obj/item/weapon/paper/admin/get_signature()
- return input(usr, "Enter the name you wish to sign the paper with (will prompt for multiple entries, in order of entry)", "Signature") as text|null
+ return tgui_input_text(usr, "Enter the name you wish to sign the paper with (will prompt for multiple entries, in order of entry)", "Signature")
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 731dfa80d3..96e99e9dbd 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -133,7 +133,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
/obj/machinery/photocopier/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
if(O.is_multitool() && panel_open)
- var/input = sanitize(input(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department))
+ var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this fax machine?", "Multitool-Fax Machine Interface", department))
if(!input)
to_chat(usr, "No input found. Please hang up and try your call again.")
return
diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm
index 03996dc35c..6aa833fd83 100644
--- a/code/modules/pda/messenger.dm
+++ b/code/modules/pda/messenger.dm
@@ -120,7 +120,7 @@
/datum/data/pda/app/messenger/proc/create_message(var/mob/living/U, var/obj/item/device/pda/P)
- var/t = input(U, "Please enter message", name, null) as text|null
+ var/t = tgui_input_text(U, "Please enter message", name, null)
if(!t)
return
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm
index a19552d368..c61624e40b 100644
--- a/code/modules/pda/pda.dm
+++ b/code/modules/pda/pda.dm
@@ -102,7 +102,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(usr, "Please enter new ringtone", name, ttone) as text
+ var/t = tgui_input_text(usr, "Please enter new ringtone", name, ttone)
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/power/breaker_box.dm b/code/modules/power/breaker_box.dm
index 83d81f99a7..f8915e08af 100644
--- a/code/modules/power/breaker_box.dm
+++ b/code/modules/power/breaker_box.dm
@@ -93,7 +93,7 @@
/obj/machinery/power/breakerbox/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
- var/newtag = input(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system") as text
+ var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system")
if(newtag)
RCon_tag = newtag
to_chat(user, "You changed the RCON tag to: [newtag]")
diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm
index 0fb5626a57..308c930783 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(usr, "Enter a new ident tag.", "Fusion Core", id_tag) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fusion Core", id_tag)
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 7f909d4896..ae3af61c9a 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(usr, "Enter a new ident tag.", "Core Control", monitor.core_tag) as null|text)
+ var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Core Control", monitor.core_tag))
if(new_ident && user.Adjacent(src))
monitor.core_tag = new_ident
// id_tag = new_ident
diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm
index 6fd14755af..24394b7973 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(usr, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag)
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 b8df226775..77b703e85e 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(usr, "Enter a new ident tag.", "Fuel Injector", id_tag) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fuel Injector", id_tag)
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 8f7e1f9f52..b2b33ef96b 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(usr, "Enter a new ident tag.", "Gyrotron", id_tag) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron", id_tag)
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 ef4dd1641c..9ff359fd29 100644
--- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm
+++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm
@@ -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(usr, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag)
if(new_ident && user.Adjacent(src))
monitor.gyro_tag = new_ident
return
diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm
index 4f1b4e5dcd..381f6b09f6 100644
--- a/code/modules/power/smes_construction.dm
+++ b/code/modules/power/smes_construction.dm
@@ -312,7 +312,7 @@
// Multitool - change RCON tag
if(istype(W, /obj/item/device/multitool))
- var/newtag = input(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system") as text
+ var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system")
if(newtag)
RCon_tag = newtag
to_chat(user, "You changed the RCON tag to: [newtag]")
diff --git a/code/modules/random_map/random_map_verbs.dm b/code/modules/random_map/random_map_verbs.dm
index ff93b73b09..089f5c6e60 100644
--- a/code/modules/random_map/random_map_verbs.dm
+++ b/code/modules/random_map/random_map_verbs.dm
@@ -42,7 +42,7 @@
var/datum/random_map/M
if(tgui_alert(usr, "Do you wish to customise the map?","Customize",list("Yes","No")) == "Yes")
- var/seed = input(usr, "Seed? (blank for none)") as text|null
+ var/seed = tgui_input_text(usr, "Seed? (blank for none)")
var/lx = input(usr, "X-size? (blank for default)") as num|null
var/ly = input(usr, "Y-size? (blank for default)") as num|null
M = new map_datum(seed,null,null,null,lx,ly,1)
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index a8e23e83e8..4d77ad473e 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -57,7 +57,7 @@
else
nameset = 1
if("Description")
- var/str = sanitize(input(usr,"Label text?","Set label",""))
+ var/str = sanitize(tgui_input_text(usr,"Label text?","Set label",""))
if(!str || !length(str))
to_chat(user, "Invalid text.")
return
@@ -169,7 +169,7 @@
nameset = 1
if("Description")
- var/str = sanitize(input(usr,"Label text?","Set label",""))
+ var/str = sanitize(tgui_input_text(usr,"Label text?","Set label",""))
if(!str || !length(str))
to_chat(user, "Invalid text.")
return
diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm
index b57b067bc3..ce64593b9d 100644
--- a/code/modules/shuttles/shuttle_console.dm
+++ b/code/modules/shuttles/shuttle_console.dm
@@ -111,7 +111,7 @@
return TRUE
if("set_codes")
- var/newcode = input(usr, "Input new docking codes", "Docking codes", shuttle.docking_codes) as text|null
+ var/newcode = tgui_input_text(usr, "Input new docking codes", "Docking codes", shuttle.docking_codes)
if(newcode && !..())
shuttle.set_docking_codes(uppertext(newcode))
return TRUE
diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm
index 935b47ca72..1051ba6c2d 100644
--- a/code/modules/shuttles/shuttles_web.dm
+++ b/code/modules/shuttles/shuttles_web.dm
@@ -149,7 +149,7 @@
if(!can_rename)
to_chat(user, "You can't rename this vessel.")
return
- var/new_name = input(user, "Please enter a new name for this vessel. Note that you can only set its name once, so choose wisely.", "Rename Shuttle", visible_name) as null|text
+ var/new_name = tgui_input_text(user, "Please enter a new name for this vessel. Note that you can only set its name once, so choose wisely.", "Rename Shuttle", visible_name)
var/sanitized_name = sanitizeName(new_name, MAX_NAME_LEN, TRUE)
if(sanitized_name)
//can_rename = FALSE //VOREStation Removal
diff --git a/code/modules/telesci/gps_advanced.dm b/code/modules/telesci/gps_advanced.dm
index bc0d322318..4b67718570 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(usr, "Please enter desired tag.", name, gpstag) as text
+ var/a = tgui_input_text(usr, "Please enter desired tag.", name, gpstag)
a = uppertext(copytext(sanitize(a), 1, 5))
if(src.loc == usr)
gpstag = a
diff --git a/code/modules/tgui/modules/admin/player_notes.dm b/code/modules/tgui/modules/admin/player_notes.dm
index f60e742325..ce17eb043d 100644
--- a/code/modules/tgui/modules/admin/player_notes.dm
+++ b/code/modules/tgui/modules/admin/player_notes.dm
@@ -186,7 +186,7 @@
if (!istype(src,/datum/admins))
to_chat(usr, "Error: you are not an admin!")
return
- var/filter = input(usr, "Filter string (case-insensitive regex)", "Player notes filter") as text|null
+ var/filter = tgui_input_text(usr, "Filter string (case-insensitive regex)", "Player notes filter")
PlayerNotesPageLegacy(1, filter)
/datum/admins/proc/PlayerNotesPageLegacy(page, filter)
@@ -293,7 +293,7 @@
if(href_list["add_player_info_legacy"])
var/key = href_list["add_player_info_legacy"]
- var/add = sanitize(input(usr, "Add Player Info (Legacy)") as null|text)
+ var/add = sanitize(tgui_input_text(usr, "Add Player Info (Legacy)"))
if(!add) return
notes_add(key,add,usr)
diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm
index 1a2ae082ef..bb0771fd98 100644
--- a/code/modules/tgui/modules/communications.dm
+++ b/code/modules/tgui/modules/communications.dm
@@ -337,10 +337,10 @@
if(centcomm_message_cooldown > world.time)
to_chat(usr, "Arrays recycling. Please stand by.")
return
- var/input = sanitize(input(usr, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \
+ var/input = sanitize(tgui_input_text(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)
+ There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging", multiline = TRUE))
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
return
if(length(input) < COMM_CCMSGLEN_MINIMUM)
@@ -358,7 +358,7 @@
if(centcomm_message_cooldown > world.time)
to_chat(usr, "Arrays recycling. Please stand by.")
return
- var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] 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.", "To abort, send an empty message.", ""))
+ var/input = sanitize(tgui_input_text(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] 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.", "To abort, send an empty message.", ""))
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
return
if(length(input) < COMM_CCMSGLEN_MINIMUM)
diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm
index 5aac12d7c1..f1843101c2 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(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]") as text
+ var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]")
if(!sec_name)
sec_name = "Sector #[known_sectors.len]"
R.fields["name"] = sec_name
diff --git a/code/modules/tgui/modules/rustcore_monitor.dm b/code/modules/tgui/modules/rustcore_monitor.dm
index 553363a963..a7ce6edbbb 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(usr, "Enter a new ident tag.", "Core Control", core_tag) as null|text)
+ var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Core Control", core_tag))
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 b7c43b521d..820a937b99 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(usr, "Enter a new ident tag.", "Gyrotron Control", fuel_tag) as null|text)
+ var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", fuel_tag))
if(new_ident)
fuel_tag = new_ident
diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index 471d2fca03..73befbce6e 100644
--- a/code/modules/vore/eating/vorepanel_vr.dm
+++ b/code/modules/vore/eating/vorepanel_vr.dm
@@ -285,7 +285,7 @@
if(host.vore_organs.len >= BELLIES_MAX)
return FALSE
- var/new_name = html_encode(input(usr,"New belly's name:","New Belly") as text|null)
+ var/new_name = html_encode(tgui_input_text(usr,"New belly's name:","New Belly"))
var/failure_msg
if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
@@ -348,7 +348,7 @@
unsaved_changes = FALSE
return TRUE
if("setflavor")
- var/new_flavor = html_encode(input(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste) as text|null)
+ var/new_flavor = html_encode(tgui_input_text(usr,"What your character tastes like (400ch limit). This text will be printed to the pred after 'X tastes of...' so just put something like 'strawberries and cream':","Character Flavor",host.vore_taste))
if(!new_flavor)
return FALSE
@@ -360,7 +360,7 @@
unsaved_changes = TRUE
return TRUE
if("setsmell")
- var/new_smell = html_encode(input(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell) as text|null)
+ var/new_smell = html_encode(tgui_input_text(usr,"What your character smells like (400ch limit). This text will be printed to the pred after 'X smells of...' so just put something like 'strawberries and cream':","Character Smell",host.vore_smell))
if(!new_smell)
return FALSE
@@ -651,7 +651,7 @@
var/attr = params["attribute"]
switch(attr)
if("b_name")
- var/new_name = html_encode(input(usr,"Belly's new name:","New Name") as text|null)
+ var/new_name = html_encode(tgui_input_text(usr,"Belly's new name:","New Name"))
var/failure_msg
if(length(new_name) > BELLIES_NAME_MAX || length(new_name) < BELLIES_NAME_MIN)
@@ -728,7 +728,7 @@
host.vore_selected.egg_type = new_egg_type
. = TRUE
if("b_desc")
- var/new_desc = html_encode(input(usr,"Belly Description, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null)
+ var/new_desc = html_encode(tgui_input_text(usr,"Belly Description, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc, multiline = TRUE))
if(new_desc)
new_desc = readd_quotes(new_desc)
@@ -738,7 +738,7 @@
host.vore_selected.desc = new_desc
. = TRUE
if("b_absorbed_desc")
- var/new_desc = html_encode(input(usr,"Belly Description for absorbed prey, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.absorbed_desc) as message|null)
+ var/new_desc = html_encode(tgui_input_text(usr,"Belly Description for absorbed prey, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.absorbed_desc, multiline = TRUE))
if(new_desc)
new_desc = readd_quotes(new_desc)
@@ -752,117 +752,117 @@
var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly. '%countprey' will be replaced with the number of living prey in your belly."
switch(params["msgtype"])
if("dmp")
- var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"dmp")
if("dmo")
- var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) as message
+ var/new_message = tgui_input_text(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"dmo")
if("amp")
- var/new_message = input(user,"These are sent to prey when their absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("amp")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey when their absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("amp"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"amp")
if("amo")
- var/new_message = input(user,"These are sent to you when prey's absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("amo")) as message
+ var/new_message = tgui_input_text(user,"These are sent to you when prey's absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("amo"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"amo")
if("uamp")
- var/new_message = input(user,"These are sent to prey when their unnabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("uamp")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey when their unnabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("uamp"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"uamp")
if("uamo")
- var/new_message = input(user,"These are sent to you when prey's unabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("uamo")) as message
+ var/new_message = tgui_input_text(user,"These are sent to you when prey's unabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("uamo"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"uamo")
if("smo")
- var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) as message
+ var/new_message = tgui_input_text(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"smo")
if("smi")
- var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"smi")
if("asmo")
- var/new_message = input(user,"These are sent to those nearby when absorbed prey struggles. Write them in 3rd person ('X's Y bulges'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (outside)",host.vore_selected.get_messages("asmo")) as message
+ var/new_message = tgui_input_text(user,"These are sent to those nearby when absorbed prey struggles. Write them in 3rd person ('X's Y bulges'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (outside)",host.vore_selected.get_messages("asmo"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"asmo")
if("asmi")
- var/new_message = input(user,"These are sent to absorbed prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (inside)",host.vore_selected.get_messages("asmi")) as message
+ var/new_message = tgui_input_text(user,"These are sent to absorbed prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (inside)",host.vore_selected.get_messages("asmi"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"asmi")
if("em")
- var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) as message
+ var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"em")
if("ema")
- var/new_message = input(user,"These are sent to people who examine you when this belly has absorbed victims. Write them in 3rd person ('Their %belly is larger'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Examine Message (with absorbed victims)",host.vore_selected.get_messages("ema")) as message
+ var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has absorbed victims. Write them in 3rd person ('Their %belly is larger'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Examine Message (with absorbed victims)",host.vore_selected.get_messages("ema"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"ema")
if("im_digest")
- var/new_message = input(user,"These are sent to prey every minute when you are on Digest mode. Write them in 2nd person ('%pred's %belly squishes down on you.')."+help,"Idle Message (Digest)",host.vore_selected.get_messages("im_digest")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Digest mode. Write them in 2nd person ('%pred's %belly squishes down on you.')."+help,"Idle Message (Digest)",host.vore_selected.get_messages("im_digest"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_digest")
if("im_hold")
- var/new_message = input(user,"These are sent to prey every minute when you are on Hold mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Hold)",host.vore_selected.get_messages("im_hold")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Hold mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Hold)",host.vore_selected.get_messages("im_hold"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_hold")
if("im_holdabsorbed")
- var/new_message = input(user,"These are sent to prey every minute when you are absorbed. Write them in 2nd person ('%pred's %belly squishes down on you.') %count will not work for this type, and %countprey will only count absorbed victims."+help,"Idle Message (Hold Absorbed)",host.vore_selected.get_messages("im_holdabsorbed")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are absorbed. Write them in 2nd person ('%pred's %belly squishes down on you.') %count will not work for this type, and %countprey will only count absorbed victims."+help,"Idle Message (Hold Absorbed)",host.vore_selected.get_messages("im_holdabsorbed"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_holdabsorbed")
if("im_absorb")
- var/new_message = input(user,"These are sent to prey every minute when you are on Absorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Absorb)",host.vore_selected.get_messages("im_absorb")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Absorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Absorb)",host.vore_selected.get_messages("im_absorb"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_absorb")
if("im_heal")
- var/new_message = input(user,"These are sent to prey every minute when you are on Heal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Heal)",host.vore_selected.get_messages("im_heal")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Heal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Heal)",host.vore_selected.get_messages("im_heal"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_heal")
if("im_drain")
- var/new_message = input(user,"These are sent to prey every minute when you are on Drain mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Drain)",host.vore_selected.get_messages("im_drain")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Drain mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Drain)",host.vore_selected.get_messages("im_drain"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_drain")
if("im_steal")
- var/new_message = input(user,"These are sent to prey every minute when you are on Size Steal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Size Steal)",host.vore_selected.get_messages("im_steal")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Size Steal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Size Steal)",host.vore_selected.get_messages("im_steal"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_steal")
if("im_egg")
- var/new_message = input(user,"These are sent to prey every minute when you are on Encase In Egg mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Encase In Egg)",host.vore_selected.get_messages("im_egg")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Encase In Egg mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Encase In Egg)",host.vore_selected.get_messages("im_egg"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_egg")
if("im_shrink")
- var/new_message = input(user,"These are sent to prey every minute when you are on Shrink mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Shrink)",host.vore_selected.get_messages("im_shrink")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Shrink mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Shrink)",host.vore_selected.get_messages("im_shrink"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_shrink")
if("im_grow")
- var/new_message = input(user,"These are sent to prey every minute when you are on Grow mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Grow)",host.vore_selected.get_messages("im_grow")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Grow mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Grow)",host.vore_selected.get_messages("im_grow"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_grow")
if("im_unabsorb")
- var/new_message = input(user,"These are sent to prey every minute when you are on Unabsorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Unabsorb)",host.vore_selected.get_messages("im_unabsorb")) as message
+ var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Unabsorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Unabsorb)",host.vore_selected.get_messages("im_unabsorb"), multiline = TRUE)
if(new_message)
host.vore_selected.set_messages(new_message,"im_unabsorb")
@@ -884,7 +884,7 @@
host.vore_selected.emote_lists = initial(host.vore_selected.emote_lists)
. = TRUE
if("b_verb")
- var/new_verb = html_encode(input(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb") as text|null)
+ var/new_verb = html_encode(tgui_input_text(usr,"New verb when eating (infinitive tense, e.g. nom or swallow):","New Verb"))
if(length(new_verb) > BELLIES_NAME_MAX || length(new_verb) < BELLIES_NAME_MIN)
tgui_alert_async(usr, "Entered verb length invalid (must be longer than [BELLIES_NAME_MIN], no longer than [BELLIES_NAME_MAX]).","Error")
@@ -945,7 +945,7 @@
host.vore_selected.can_taste = !host.vore_selected.can_taste
. = TRUE
if("b_bulge_size")
- var/new_bulge = input(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.") as num|null
+ var/new_bulge = tgui_input_number(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.", max_value = 200, min_value = 25)
if(new_bulge == null)
return FALSE
if(new_bulge == 0) //Disable.
@@ -961,7 +961,7 @@
host.vore_selected.display_absorbed_examine = !host.vore_selected.display_absorbed_examine
. = TRUE
if("b_grow_shrink")
- var/new_grow = input(user, "Choose the size that prey will be grown/shrunk to, ranging from 25% to 200%", "Set Growth Shrink Size.", host.vore_selected.shrink_grow_size) as num|null
+ var/new_grow = tgui_input_number(user, "Choose the size that prey will be grown/shrunk to, ranging from 25% to 200%", "Set Growth Shrink Size.", host.vore_selected.shrink_grow_size, 200, 25)
if (new_grow == null)
return FALSE
if (!ISINRANGE(new_grow,25,200))
@@ -971,28 +971,28 @@
host.vore_selected.shrink_grow_size = (new_grow*0.01)
. = TRUE
if("b_nutritionpercent")
- var/new_nutrition = input(user, "Choose the nutrition gain percentage you will recieve per tick from prey. Ranges from 0.01 to 100.", "Set Nutrition Gain Percentage.", host.vore_selected.nutrition_percent) as num|null
+ var/new_nutrition = tgui_input_number(user, "Choose the nutrition gain percentage you will recieve per tick from prey. Ranges from 0.01 to 100.", "Set Nutrition Gain Percentage.", host.vore_selected.nutrition_percent, 100, 0.01)
if(new_nutrition == null)
return FALSE
var/new_new_nutrition = CLAMP(new_nutrition, 0.01, 100)
host.vore_selected.nutrition_percent = new_new_nutrition
. = TRUE
if("b_burn_dmg")
- var/new_damage = input(user, "Choose the amount of burn damage prey will take per tick. Ranges from 0 to 6.", "Set Belly Burn Damage.", host.vore_selected.digest_burn) as num|null
+ var/new_damage = tgui_input_number(user, "Choose the amount of burn damage prey will take per tick. Ranges from 0 to 6.", "Set Belly Burn Damage.", host.vore_selected.digest_burn, 6, 0)
if(new_damage == null)
return FALSE
var/new_new_damage = CLAMP(new_damage, 0, 6)
host.vore_selected.digest_burn = new_new_damage
. = TRUE
if("b_brute_dmg")
- var/new_damage = input(user, "Choose the amount of brute damage prey will take per tick. Ranges from 0 to 6", "Set Belly Brute Damage.", host.vore_selected.digest_brute) as num|null
+ var/new_damage = tgui_input_number(user, "Choose the amount of brute damage prey will take per tick. Ranges from 0 to 6", "Set Belly Brute Damage.", host.vore_selected.digest_brute, 6, 0)
if(new_damage == null)
return FALSE
var/new_new_damage = CLAMP(new_damage, 0, 6)
host.vore_selected.digest_brute = new_new_damage
. = TRUE
if("b_oxy_dmg")
- var/new_damage = input(user, "Choose the amount of suffocation damage prey will take per tick. Ranges from 0 to 12.", "Set Belly Suffocation Damage.", host.vore_selected.digest_oxy) as num|null
+ var/new_damage = tgui_input_number(user, "Choose the amount of suffocation damage prey will take per tick. Ranges from 0 to 12.", "Set Belly Suffocation Damage.", host.vore_selected.digest_oxy, 12, 0)
if(new_damage == null)
return FALSE
var/new_new_damage = CLAMP(new_damage, 0, 12)
@@ -1002,7 +1002,7 @@
host.vore_selected.emote_active = !host.vore_selected.emote_active
. = TRUE
if("b_emotetime")
- var/new_time = input(user, "Choose the period it takes for idle belly emotes to be shown to prey. Measured in seconds, Minimum 1 minute, Maximum 10 minutes.", "Set Belly Emote Delay.", host.vore_selected.digest_brute)
+ var/new_time = tgui_input_number(user, "Choose the period it takes for idle belly emotes to be shown to prey. Measured in seconds, Minimum 1 minute, Maximum 10 minutes.", "Set Belly Emote Delay.", host.vore_selected.digest_brute, 10, 1)
if(new_time == null)
return FALSE
var/new_new_time = CLAMP(new_time, 60, 600)
@@ -1020,7 +1020,7 @@
host.vore_selected.escapable = 0
. = TRUE
if("b_escapechance")
- var/escape_chance_input = input(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance") as num|null
+ var/escape_chance_input = tgui_input_number(user, "Set prey escape chance on resist (as %)", "Prey Escape Chance", null, 100, 0)
if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance))
. = TRUE
@@ -1030,7 +1030,7 @@
host.vore_selected.escapetime = sanitize_integer(escape_time_input*10, 10, 600, initial(host.vore_selected.escapetime))
. = TRUE
if("b_transferchance")
- var/transfer_chance_input = input(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null
+ var/transfer_chance_input = tgui_input_number(user, "Set belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time", null, 100, 0)
if(!isnull(transfer_chance_input))
host.vore_selected.transferchance = sanitize_integer(transfer_chance_input, 0, 100, initial(host.vore_selected.transferchance))
. = TRUE
@@ -1045,7 +1045,7 @@
host.vore_selected.transferlocation = choice.name
. = TRUE
if("b_transferchance_secondary")
- var/transfer_secondary_chance_input = input(user, "Set secondary belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time") as num|null
+ var/transfer_secondary_chance_input = tgui_input_number(user, "Set secondary belly transfer chance on resist (as %). You must also set the location for this to have any effect.", "Prey Escape Time", null, 100, 0)
if(!isnull(transfer_secondary_chance_input))
host.vore_selected.transferchance_secondary = sanitize_integer(transfer_secondary_chance_input, 0, 100, initial(host.vore_selected.transferchance_secondary))
. = TRUE
@@ -1060,12 +1060,12 @@
host.vore_selected.transferlocation_secondary = choice_secondary.name
. = TRUE
if("b_absorbchance")
- var/absorb_chance_input = input(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance") as num|null
+ var/absorb_chance_input = tgui_input_number(user, "Set belly absorb mode chance on resist (as %)", "Prey Absorb Chance", null, 100, 0)
if(!isnull(absorb_chance_input))
host.vore_selected.absorbchance = sanitize_integer(absorb_chance_input, 0, 100, initial(host.vore_selected.absorbchance))
. = TRUE
if("b_digestchance")
- var/digest_chance_input = input(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance") as num|null
+ var/digest_chance_input = tgui_input_number(user, "Set belly digest mode chance on resist (as %)", "Prey Digest Chance", null, 100, 0)
if(!isnull(digest_chance_input))
host.vore_selected.digestchance = sanitize_integer(digest_chance_input, 0, 100, initial(host.vore_selected.digestchance))
. = TRUE
diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm
index dd131ffca3..af4a2e063d 100644
--- a/code/modules/vore/resizing/resize_vr.dm
+++ b/code/modules/vore/resizing/resize_vr.dm
@@ -140,7 +140,7 @@
return
var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)"
- var/new_size = input(nagmessage, "Pick a Size") as num|null
+ var/new_size = tgui_input_number(nagmessage, "Pick a Size")
if(size_range_check(new_size))
resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE)
// I'm not entirely convinced that `src ? ADMIN_JMP(src) : "null"` here does anything
diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm
index 1f8eb6f207..949eed7eb3 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(usr, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100) as num|null
+ var/size_select = tgui_input_number(usr, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100, 600, 1)
if(!size_select)
return //cancelled
//We do valid resize testing in actual firings because people move after setting these things.
@@ -115,7 +115,7 @@
set category = "Object"
set src in view(1)
- var/size_select = input(usr, "Put the desired size (1-600%)", "Set Size", size_set_to * 100) as num|null
+ var/size_select = tgui_input_number(usr, "Put the desired size (1-600%)", "Set Size", size_set_to * 100, 600, 1)
if(!size_select)
return //cancelled
size_set_to = clamp((size_select/100), 0, 1000) //eheh
diff --git a/code/modules/xenoarcheaology/finds/fossils.dm b/code/modules/xenoarcheaology/finds/fossils.dm
index 5448db97f2..19516f47cc 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(usr, "What would you like to write on the plaque:","Skeleton plaque",""))
+ plaque_contents = sanitize(tgui_input_text(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 ddca8b6fe5..c7015c2c29 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(usr, "Put the desired depth (1-30 centimeters).", "Set Depth", 30) as num
+ var/depth = tgui_input_number(usr, "Put the desired depth (1-30 centimeters).", "Set Depth", 30, 30, 1)
if(depth>30 || depth<1)
to_chat(user, "Invalid depth.")
return
diff --git a/code/modules/xenobio2/mob/slime/slime_monkey.dm b/code/modules/xenobio2/mob/slime/slime_monkey.dm
index 39660b1728..8915e58e9b 100644
--- a/code/modules/xenobio2/mob/slime/slime_monkey.dm
+++ b/code/modules/xenobio2/mob/slime/slime_monkey.dm
@@ -44,7 +44,7 @@ Slime cube lives here.
S.shapeshifter_set_colour("#05FF9B")
for(var/mob/M in viewers(get_turf_or_move(loc)))
M.show_message("The monkey cube suddenly takes the shape of a humanoid!")
- var/newname = sanitize(input(S, "You are a Promethean. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
+ var/newname = sanitize(tgui_input_text(S, "You are a Promethean. Would you like to change your name to something else?", "Name change"), MAX_NAME_LEN)
if(newname)
S.real_name = newname
S.name = S.real_name