diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 7b8b7155f64..686efa65089 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -261,7 +261,7 @@
if("max")
target_pressure = max_pressure_setting
if("set")
- var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure) as num
+ var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
if("set_flow_rate")
@@ -272,7 +272,7 @@
if("max")
set_flow_rate = air1.volume
if("set")
- var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate) as num
+ var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0)
src.set_flow_rate = between(0, new_flow_rate, air1.volume)
update_icon()
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 665d912b00e..514216e7faf 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -225,7 +225,7 @@ Thus, the two variables affect pump operation are set in New():
if("max")
target_pressure = max_pressure_setting
if("set")
- var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure) as num
+ var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
. = TRUE
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index dae46487906..1b51693389b 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -170,7 +170,7 @@
if("set_flow_rate")
if(!configuring || use_power)
return
- var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
+ var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
. = TRUE
if("switch_mode")
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 077be63b30b..3487482be3c 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -183,7 +183,7 @@
. = TRUE
if(!configuring || use_power)
return
- var/new_flow_rate = input(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate) as num
+ var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
if("switch_mode")
. = TRUE
@@ -265,7 +265,7 @@
if(non_locked < 1)
return
- var/new_con = (input(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100) as num) / 100
+ var/new_con = (tgui_input_number(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100
//cap it between 0 and the max remaining concentration
new_con = between(0, new_con, remain_con)
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 067fc6d1d8e..c4643632dce 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 94914550b3a..286b5f66931 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 40e5977c83e..39d36738aa0 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 06a60602273..5315a3dbe8a 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 53805bcbec2..58fd0ec858f 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 af096c33a81..c30d559e4ba 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 61ba792151f..352550a9a56 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 75c3c64c7f2..8da8bab272d 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 b380018bea6..da7a028240a 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 895bd36fae4..02360363384 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 736fdff0214..34b4105e86d 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/supplypacks/materials.dm b/code/datums/supplypacks/materials.dm
index 45951c516d5..3268d05a46c 100644
--- a/code/datums/supplypacks/materials.dm
+++ b/code/datums/supplypacks/materials.dm
@@ -74,7 +74,8 @@
contains = list(
/obj/fiftyspawner/geocarpet,
/obj/fiftyspawner/retrocarpet,
- /obj/fiftyspawner/retrocarpet_red
+ /obj/fiftyspawner/retrocarpet_red,
+ /obj/fiftyspawner/happycarpet
)
/datum/supply_pack/materials/linoleum
diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm
index f1db67a6474..f6742fb815c 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 c2c56c7be1b..223db7dda83 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 3f78c6fba48..238015d6ed6 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/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm
index cee83656cb9..a95200adb7b 100644
--- a/code/game/gamemodes/events/holidays/Holidays.dm
+++ b/code/game/gamemodes/events/holidays/Holidays.dm
@@ -214,8 +214,8 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
Holiday = list()
- var/H = input(src,"What holiday is it today?","Set Holiday") as text
- var/B = input(src,"Now explain what the holiday is about","Set Holiday") as message
+ var/H = tgui_input_text(src,"What holiday is it today?","Set Holiday")
+ var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE)
Holiday[H] = B
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 88efd6154e6..7af06d8d33d 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -59,23 +59,23 @@ var/global/list/additional_antag_types = list()
var/choice = ""
switch(href_list["set"])
if("shuttle_delay")
- choice = input(usr, "Enter a new shuttle delay multiplier") as num
+ choice = tgui_input_number(usr, "Enter a new shuttle delay multiplier", null, null, 20, 1)
if(!choice || choice < 1 || choice > 20)
return
shuttle_delay = choice
if("antag_scaling")
- choice = input(usr, "Enter a new antagonist cap scaling coefficient.") as num
+ choice = tgui_input_number(usr, "Enter a new antagonist cap scaling coefficient.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
antag_scaling_coeff = choice
if("event_modifier_moderate")
- choice = input(usr, "Enter a new moderate event time modifier.") as num
+ choice = tgui_input_number(usr, "Enter a new moderate event time modifier.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_moderate = choice
refresh_event_modifiers()
if("event_modifier_severe")
- choice = input(usr, "Enter a new moderate event time modifier.") as num
+ choice = tgui_input_number(usr, "Enter a new moderate event time modifier.", null, null, 100, 0)
if(isnull(choice) || choice < 0 || choice > 100)
return
event_delay_mod_major = choice
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 d8229e1562a..2ee412194ef 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 aec6442f8d1..7c51611bf2d 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -124,10 +124,10 @@
if("Location")
mode = 1
- var/locationx = input(usr, "Please input the x coordinate to search for.", "Location?" , "") as num
+ var/locationx = tgui_input_number(usr, "Please input the x coordinate to search for.", "Location?" , "")
if(!locationx || !(usr in view(1,src)))
return
- var/locationy = input(usr, "Please input the y coordinate to search for.", "Location?" , "") as num
+ var/locationy = tgui_input_number(usr, "Please input the y coordinate to search for.", "Location?" , "")
if(!locationy || !(usr in view(1,src)))
return
@@ -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 cb2a3fcb4b7..9b6b532f964 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 dcadf53ffb1..ab83319bc59 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 dd653d746af..ca40f0dc530 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 f9a14370419..364d4bf3771 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/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 783ee16225b..cb11dce0b50 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -332,7 +332,7 @@ update_flag
pressure = 10*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
- pressure = input(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure) as num|null
+ pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index bc8a8081d0c..3e8cf00207a 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/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 0660bff7591..a73eb6fe917 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -80,7 +80,7 @@
if(W.is_screwdriver())
playsound(src, W.usesound, 50, 1)
- var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
+ var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
@@ -92,7 +92,7 @@
var/area/camera_area = get_area(src)
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
- input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
+ input = sanitizeSafe(tgui_input_text(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
state = 4
var/obj/machinery/camera/C = new(src.loc)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 1e6cc6030a1..5bc0272997f 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/card.dm b/code/game/machinery/computer/card.dm
index c15a9d15243..75b860330dd 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -205,7 +205,7 @@
if(is_authenticated() && modify)
var/t1 = params["assign_target"]
if(t1 == "Custom")
- var/temp_t = sanitize(input(usr, "Enter a custom job assignment.","Assignment"), 45)
+ var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index f95e864c4f4..24b97e20994 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 5962f9aa8f6..ec5a1f5fcd9 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 fa0a2ebce01..4f2b4fd4e8f 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 e805e151bd5..ce345e429e6 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 d2f6074c784..7412f6b4641 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 70c97af29d7..315b56e8479 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 955b99009a9..0e184683ec0 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 f713cea2d0c..e2b76f3632a 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 7e6721f109d..1002e3fa213 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 90a623d0b9a..1e1fff180ed 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 68ac2e2a3f7..f19b80befc7 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 a8c4e21dbc9..7350ca0c1e5 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 ba63655b9c5..461a2004817 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/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index c91881f0c32..41bb3e65fec 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -295,7 +295,7 @@
. = TRUE
if("network")
- var/newnet = input(usr, "Specify the new network for this machine. This will break all current links.", src, network) as null|text
+ var/newnet = tgui_input_text(usr, "Specify the new network for this machine. This will break all current links.", src, network)
if(newnet && canAccess(usr))
if(length(newnet) > 15)
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index 384790e60d6..3014474b8ea 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 4565ab1668d..cf7f9946aae 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/magic/archived_book.dm b/code/game/magic/archived_book.dm
index ed77f3c90b6..1aab354815a 100644
--- a/code/game/magic/archived_book.dm
+++ b/code/game/magic/archived_book.dm
@@ -40,7 +40,7 @@ var/global/datum/book_manager/book_mgr = new()
to_chat(src, "Only administrators may use this command.")
return
- var/isbn = input(usr, "ISBN number?", "Delete Book") as num | null
+ var/isbn = tgui_input_number(usr, "ISBN number?", "Delete Book")
if(!isbn)
return
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index aa5226c172f..1c5003ac95d 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -48,7 +48,7 @@
if("send_message")
var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["mt"])
if(istype(MT))
- var/message = sanitize(input(usr, "Input message", "Transmit message") as text)
+ var/message = sanitize(tgui_input_text(usr, "Input message", "Transmit message"))
var/obj/mecha/M = MT.in_mecha()
if(message && M)
M.occupant_message(message)
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index b3b22fc082c..c7fc6962ba1 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -7,13 +7,13 @@
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
- var/p = input(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
+ var/p = tgui_input_number(usr, "Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt))
if(p == null) return
- var/o = input(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
+ var/o = tgui_input_number(usr, "Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt))
if(o == null) return
- var/c = input(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
+ var/c = tgui_input_number(usr, "Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt))
if(c == null) return
new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c)
diff --git a/code/game/objects/explosion_recursive.dm b/code/game/objects/explosion_recursive.dm
index 400820f49fa..a8067805a25 100644
--- a/code/game/objects/explosion_recursive.dm
+++ b/code/game/objects/explosion_recursive.dm
@@ -1,5 +1,5 @@
/client/proc/kaboom()
- var/power = input(src, "power?", "power?") as num
+ var/power = tgui_input_number(src, "power?", "power?")
var/turf/T = get_turf(src.mob)
explosion_rec(T, power)
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index 70f5155b82d..862d4e6cdaf 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -33,7 +33,7 @@
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
- var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
+ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != W)
return
if (!in_range(src, user) && src.loc != user)
diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm
index d9c4e3b7cec..03048abd6f9 100644
--- a/code/game/objects/items/devices/communicator/UI_tgui.dm
+++ b/code/game/objects/items/devices/communicator/UI_tgui.dm
@@ -322,7 +322,7 @@
. = TRUE
switch(action)
if("rename")
- var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) )
+ var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) )
if(new_name)
register_device(new_name)
@@ -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 a9bc3afe6db..d56ed07c2e3 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 4fb99a9fc06..21ec2ea3b66 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 55f92f0cc87..26d58082b6f 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 0a73ea74c64..1e0183499b6 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 a4ba173aed8..88701319cdb 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 54510fb9a44..330ca97d732 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 b7d7933a883..78f5a381c70 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 54ed5404757..846fae358da 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/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index ff9bbad2160..28c89140d00 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -229,7 +229,7 @@
to_chat(user, "The MMI must go in after everything else!")
if (istype(W, /obj/item/weapon/pen))
- var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
+ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index b6ad543e6af..aa3cca9b903 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -399,7 +399,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
- var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
+ var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
diff --git a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm
index d827289e325..0ac18b8ae15 100644
--- a/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm
+++ b/code/game/objects/items/stacks/tiles/fifty_spawner_tiles.dm
@@ -32,6 +32,10 @@
name = "stack of red retro carpet"
type_to_spawn = /obj/item/stack/tile/carpet/retro_red
+/obj/fiftyspawner/happycarpet
+ name = "stack of happy carpet"
+ type_to_spawn = /obj/item/stack/tile/carpet/happy
+
/obj/fiftyspawner/floor
name = "stack of floor tiles"
type_to_spawn = /obj/item/stack/tile/floor
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index c6289c31474..07add4d7f17 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -131,6 +131,10 @@
icon_state = "tile-carpet-retro-red"
desc = "A piece of carpet with red-ical space patterns. It is the same size as a normal floor tile!"
+/obj/item/stack/tile/carpet/happy
+ icon_state = "tile-carpet-happy"
+ desc = "A piece of carpet with happy patterns. It is the same size as a normal floor tile!"
+
// TODO - Add descriptions to these
/obj/item/stack/tile/carpet/bcarpet
icon_state = "tile-carpet"
diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm
index 0b1343d63e6..2331485fd17 100644
--- a/code/game/objects/items/toys/toys.dm
+++ b/code/game/objects/items/toys/toys.dm
@@ -843,7 +843,7 @@
if(!M.mind)
return 0
- var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
+ var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index e366a3e8ee9..2eec58b1361 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/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
index 9d47a962e7a..05ef9a7428c 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
@@ -74,7 +74,7 @@
to_chat(user, "Circuit controls are locked.")
return
var/existing_networks = jointext(network,",")
- var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
+ var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index d81e6e444e3..5e1d7006028 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -39,7 +39,7 @@
..()
/obj/item/weapon/plastique/attack_self(mob/user as mob)
- var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
+ var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10)
if(user.get_active_hand() == src)
newtime = CLAMP(newtime, 10, 60000)
timer = newtime
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 8de1fb7f807..52ebd29e7c3 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -288,7 +288,7 @@ Implant Specifics:
"}
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
- phrase = input(usr, "Choose activation phrase:") as text
+ phrase = tgui_input_text(usr, "Choose activation phrase:")
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', say [src.phrase] to attempt to activate.", 0, 0)
diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm
index 9162be15eb5..1517e2ada31 100644
--- a/code/game/objects/items/weapons/implants/implantcase.dm
+++ b/code/game/objects/items/weapons/implants/implantcase.dm
@@ -21,7 +21,7 @@
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
if (istype(I, /obj/item/weapon/pen))
- var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
+ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != I)
return
if((!in_range(src, usr) && src.loc != user))
diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm
index 6f487f109d4..f9b89f0a564 100644
--- a/code/game/turfs/flooring/flooring.dm
+++ b/code/game/turfs/flooring/flooring.dm
@@ -338,6 +338,12 @@ var/list/flooring_types
build_type = /obj/item/stack/tile/carpet/retro_red
flags = TURF_REMOVE_CROWBAR | TURF_CAN_BURN
+/decl/flooring/carpet/happy
+ name = "happy carpet"
+ icon_base = "happycarpet"
+ build_type = /obj/item/stack/tile/carpet/happy
+ flags = TURF_REMOVE_CROWBAR | TURF_CAN_BURN
+
/decl/flooring/tiling
name = "floor"
desc = "Scuffed from the passage of countless greyshirts."
diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm
index a8e25b2e63d..969ffea17c4 100644
--- a/code/game/turfs/flooring/flooring_premade.dm
+++ b/code/game/turfs/flooring/flooring_premade.dm
@@ -23,7 +23,7 @@
name = "deco carpet"
icon_state = "decocarpet"
initial_flooring = /decl/flooring/carpet/geo
-
+
/turf/simulated/floor/carpet/retro
name = "retro carpet"
icon_state = "retrocarpet"
@@ -75,6 +75,11 @@
icon_state = "retrocarpet_red"
initial_flooring = /decl/flooring/carpet/retro_red
+/turf/simulated/floor/carpet/happy
+ name = "happy carpet"
+ icon_state = "happycarpet"
+ initial_flooring = /decl/flooring/carpet/happy
+
/turf/simulated/floor/bluegrid
name = "mainframe floor"
icon = 'icons/turf/flooring/circuit.dmi'
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 10f0c8c0a70..ee0ee93a41e 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 4171ea6a377..dfe4ba88e23 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 c78614ca436..67df19e9438 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 57f3fe31973..ba15e99c2d2 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 6a6a5d241e5..db87c39c716 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 db51bd4ed33..81a3e795760 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 6d92fde40bb..994d12a4ea5 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 4a0d3c496f4..58e90122771 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 179391987c5..3a518bdef0e 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 594b3c34d27..942ff60d77c 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 3b4b817c006..b7d90021abf 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]")
@@ -338,17 +338,17 @@
var/mins = 0
if(minutes > CMinutes)
mins = minutes - CMinutes
- mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
+ mins = tgui_input_number(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440)
if(!mins) return
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,11 +1863,11 @@
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"])
- src.admincaster_feed_message.body = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
+ src.admincaster_feed_message.body = sanitize(tgui_input_text(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
src.access_news_network()
else if(href_list["ac_submit_wanted"])
@@ -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 2f6cfc3a217..cad1c9fb15c 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 c108bbf14b1..ee127136da9 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 a25fac29e92..592b20b358d 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 290b04bdde1..28649fe3b56 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 717a8ce5bd7..2cafd14ee4e 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 51f0364843a..477f2f032c7 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 40635bb7feb..c2e4b671f7b 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 b70a0919804..ce39bbb0b8a 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 2aa6f91a667..cc21521859d 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 4b357a704d9..c3b9999afbc 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 66d1e6c74e6..fea37f2931a 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 fcf5d64e7ea..850f4f6e25d 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 e60c5182486..d19d67916a0 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 058955799e0..dc340539307 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 d7b2c1ffff2..7724062a6ed 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 64920cdc9e9..f3fb4ea145e 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 ddab5464e64..a014544090d 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 437da934673..0f5fe03f8a6 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 eeb850f6880..224e457ee98 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
@@ -478,7 +478,7 @@
if(usr.incapacitated())
return
if(ishuman(usr) || istype(usr, /mob/living/silicon/robot))
- casinoslave_price = input("Select the desired price (1-1000)", "Set Price") as num
+ casinoslave_price = tgui_input_number("Select the desired price (1-1000)", "Set Price", null, null, 1000, 1)
if(casinoslave_price>1000 || casinoslave_price<1)
to_chat(user,"Invalid price. ")
return
diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm
index 1469c8d8f20..1bf1a03bd26 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)
@@ -125,7 +125,7 @@
else if(href_list["age"])
var/min_age = get_min_age()
var/max_age = get_max_age()
- var/new_age = input(user, "Choose your character's age:\n([min_age]-[max_age])", "Character Preference", pref.age) as num|null
+ var/new_age = tgui_input_number(user, "Choose your character's age:\n([min_age]-[max_age])", "Character Preference", pref.age, max_age, min_age)
if(new_age && CanUseTopic(user))
pref.age = max(min(round(text2num(new_age)), max_age), min_age)
return TOPIC_REFRESH
diff --git a/code/modules/client/preference_setup/general/02_language.dm b/code/modules/client/preference_setup/general/02_language.dm
index 21214895355..28e599a2cd0 100644
--- a/code/modules/client/preference_setup/general/02_language.dm
+++ b/code/modules/client/preference_setup/general/02_language.dm
@@ -94,7 +94,7 @@
var/char
var/keys[0]
do
- char = input(usr, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") as null|text
+ char = tgui_input_text(usr, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining")
if(char)
if(length(char) > 1)
tgui_alert_async(user, "Only single characters allowed.", "Error")
diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm
index 6cdfa38f138..2e1066dc0b0 100644
--- a/code/modules/client/preference_setup/general/03_body.dm
+++ b/code/modules/client/preference_setup/general/03_body.dm
@@ -777,7 +777,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["skin_tone"])
if(!has_flag(mob_species, HAS_SKIN_TONE))
return TOPIC_NOACTION
- var/new_s_tone = input(user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Character Preference", (-pref.s_tone) + 35) as num|null
+ var/new_s_tone = tgui_input_number(user, "Choose your character's skin-tone:\n(Light 1 - 220 Dark)", "Character Preference", (-pref.s_tone) + 35, 220, 1)
if(new_s_tone && has_flag(mob_species, HAS_SKIN_TONE) && CanUseTopic(user))
pref.s_tone = 35 - max(min( round(new_s_tone), 220),1)
return TOPIC_REFRESH_UPDATE_PREVIEW
diff --git a/code/modules/client/preference_setup/general/06_flavor.dm b/code/modules/client/preference_setup/general/06_flavor.dm
index ac1c42d5d04..7f5e95f69ba 100644
--- a/code/modules/client/preference_setup/general/06_flavor.dm
+++ b/code/modules/client/preference_setup/general/06_flavor.dm
@@ -59,11 +59,11 @@
switch(href_list["flavor_text"])
if("open")
if("general")
- var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothings.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]])) as message, extra = 0) //VOREStation Edit: separating out OOC notes
+ var/msg = sanitize(tgui_input_text(usr,"Give a general description of your character. This will be shown regardless of clothings.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
if(CanUseTopic(user))
pref.flavor_texts[href_list["flavor_text"]] = msg
else
- var/msg = sanitize(input(usr,"Set the flavor text for your [href_list["flavor_text"]].","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]])) as message, extra = 0)
+ var/msg = sanitize(tgui_input_text(usr,"Set the flavor text for your [href_list["flavor_text"]].","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE), extra = 0)
if(CanUseTopic(user))
pref.flavor_texts[href_list["flavor_text"]] = msg
SetFlavorText(user)
@@ -73,11 +73,11 @@
switch(href_list["flavour_text_robot"])
if("open")
if("Default")
- var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"])) as message, extra = 0)
+ var/msg = sanitize(tgui_input_text(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE), extra = 0)
if(CanUseTopic(user))
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
else
- var/msg = sanitize(input(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]])) as message, extra = 0)
+ var/msg = sanitize(tgui_input_text(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE), extra = 0)
if(CanUseTopic(user))
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
SetFlavourTextRobot(user)
diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm
index 2875c443b6f..fbe54b00cd5 100644
--- a/code/modules/client/preference_setup/global/01_ui.dm
+++ b/code/modules/client/preference_setup/global/01_ui.dm
@@ -82,7 +82,7 @@
return TOPIC_REFRESH
else if(href_list["select_alpha"])
- var/UI_style_alpha_new = input(user, "Select UI alpha (transparency) level, between 50 and 255.", "Global Preference", pref.UI_style_alpha) as num|null
+ var/UI_style_alpha_new = tgui_input_number(user, "Select UI alpha (transparency) level, between 50 and 255.", "Global Preference", pref.UI_style_alpha, 255, 50)
if(isnull(UI_style_alpha_new) || (UI_style_alpha_new < 50 || UI_style_alpha_new > 255) || !CanUseTopic(user)) return TOPIC_NOACTION
pref.UI_style_alpha = UI_style_alpha_new
return TOPIC_REFRESH
@@ -100,7 +100,7 @@
return TOPIC_REFRESH
else if(href_list["select_client_fps"])
- var/fps_new = input(user, "Input Client FPS (1-200, 0 uses server FPS)", "Global Preference", pref.client_fps) as null|num
+ var/fps_new = tgui_input_number(user, "Input Client FPS (1-200, 0 uses server FPS)", "Global Preference", pref.client_fps, 200, 1)
if(isnull(fps_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(fps_new < 0 || fps_new > MAX_CLIENT_FPS) return TOPIC_NOACTION
pref.client_fps = fps_new
@@ -109,14 +109,14 @@
return TOPIC_REFRESH
else if(href_list["select_ambience_freq"])
- var/ambience_new = input(user, "Input how often you wish to hear ambience repeated! (1-60 MINUTES, 0 for disabled)", "Global Preference", pref.ambience_freq) as null|num
+ var/ambience_new = tgui_input_number(user, "Input how often you wish to hear ambience repeated! (1-60 MINUTES, 0 for disabled)", "Global Preference", pref.ambience_freq, 60, 0)
if(isnull(ambience_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(ambience_new < 0 || ambience_new > 60) return TOPIC_NOACTION
pref.ambience_freq = ambience_new
return TOPIC_REFRESH
else if(href_list["select_ambience_chance"])
- var/ambience_chance_new = input(user, "Input the chance you'd like to hear ambience played to you (On area change, or by random ambience). 35 means a 35% chance to play ambience. This is a range from 0-100. 0 disables ambience playing entirely. This is also affected by Ambience Frequency.", "Global Preference", pref.ambience_freq) as null|num
+ var/ambience_chance_new = tgui_input_number(user, "Input the chance you'd like to hear ambience played to you (On area change, or by random ambience). 35 means a 35% chance to play ambience. This is a range from 0-100. 0 disables ambience playing entirely. This is also affected by Ambience Frequency.", "Global Preference", pref.ambience_freq, 100, 0)
if(isnull(ambience_chance_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(ambience_chance_new < 0 || ambience_chance_new > 100) return TOPIC_NOACTION
pref.ambience_chance = ambience_chance_new
diff --git a/code/modules/client/preference_setup/global/03_pai.dm b/code/modules/client/preference_setup/global/03_pai.dm
index 01c5f7a8509..6993e0dc6db 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/volume_sliders/01_volume.dm b/code/modules/client/preference_setup/volume_sliders/01_volume.dm
index 90c0b227c08..7dea5d2053e 100644
--- a/code/modules/client/preference_setup/volume_sliders/01_volume.dm
+++ b/code/modules/client/preference_setup/volume_sliders/01_volume.dm
@@ -40,7 +40,7 @@
var/channel = href_list["change_volume"]
if(!(channel in pref.volume_channels))
pref.volume_channels["[channel]"] = 1
- var/value = input(usr, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100))
+ var/value = tgui_input_number(usr, "Choose your volume for [channel] (0-200%)", "[channel] volume", (pref.volume_channels[channel] * 100), 200, 0)
if(isnum(value))
value = CLAMP(value, 0, 200)
pref.volume_channels["[channel]"] = (value / 100)
diff --git a/code/modules/client/preference_setup/volume_sliders/02_media.dm b/code/modules/client/preference_setup/volume_sliders/02_media.dm
index 3fbb972ad2c..98f7bb4cfed 100644
--- a/code/modules/client/preference_setup/volume_sliders/02_media.dm
+++ b/code/modules/client/preference_setup/volume_sliders/02_media.dm
@@ -33,7 +33,7 @@
/datum/category_item/player_setup_item/volume_sliders/media/OnTopic(var/href, var/list/href_list, var/mob/user)
if(href_list["change_media_volume"])
if(CanUseTopic(user))
- var/value = input(usr, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100))
+ var/value = tgui_input_number(usr, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100), 100, 0)
if(isnum(value))
value = CLAMP(value, 0, 100)
pref.media_volume = value/100.0
diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm
index 6624abb1e07..37a71587b13 100644
--- a/code/modules/client/preference_setup/vore/02_size.dm
+++ b/code/modules/client/preference_setup/vore/02_size.dm
@@ -58,7 +58,7 @@
/datum/category_item/player_setup_item/vore/size/OnTopic(var/href, var/list/href_list, var/mob/user)
if(href_list["size_multiplier"])
- var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Set Size") as num|null
+ var/new_size = tgui_input_number(user, "Choose your character's size, ranging from 25% to 200%", "Set Size", null, 200, 25)
if (!ISINRANGE(new_size,25,200))
pref.size_multiplier = 1
to_chat(user, "Invalid size.")
@@ -72,11 +72,11 @@
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["weight"])
- var/new_weight = input(user, "Choose your character's relative body weight.\n\
+ var/new_weight = tgui_input_number(user, "Choose your character's relative body weight.\n\
This measurement should be set relative to a normal 5'10'' person's body and not the actual size of your character.\n\
If you set your weight to 500 because you're a naga or have metal implants then complain that you're a blob I\n\
swear to god I will find you and I will punch you for not reading these directions!\n\
- ([WEIGHT_MIN]-[WEIGHT_MAX])", "Character Preference") as num|null
+ ([WEIGHT_MIN]-[WEIGHT_MAX])", "Character Preference", null, WEIGHT_MAX, WEIGHT_MIN)
if(new_weight)
var/unit_of_measurement = tgui_alert(user, "Is that number in pounds (lb) or kilograms (kg)?", "Confirmation", list("Pounds", "Kilograms"))
if(unit_of_measurement == "Pounds")
diff --git a/code/modules/client/preference_setup/vore/09_misc.dm b/code/modules/client/preference_setup/vore/09_misc.dm
index fff3bb6af48..d8937a30ebe 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 4b321f2f534..8317d977e3a 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 24f7c67c8f7..86a9797f092 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/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm
index 237f1206cb7..8fa9fe73e4b 100644
--- a/code/modules/economy/Accounts_DB.dm
+++ b/code/modules/economy/Accounts_DB.dm
@@ -127,12 +127,12 @@
creating_new_account = 1
if("add_funds")
- var/amount = input(usr, "Enter the amount you wish to add", "Silently add funds") as num
+ var/amount = tgui_input_number(usr, "Enter the amount you wish to add", "Silently add funds")
if(detailed_account_view)
detailed_account_view.money = min(detailed_account_view.money + amount, fund_cap)
if("remove_funds")
- var/amount = input(usr, "Enter the amount you wish to remove", "Silently remove funds") as num
+ var/amount = tgui_input_number(usr, "Enter the amount you wish to remove", "Silently remove funds")
if(detailed_account_view)
detailed_account_view.money = max(detailed_account_view.money - amount, -fund_cap)
diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm
index 1517af0cc0b..beae04ee7ce 100644
--- a/code/modules/economy/EFTPOS.dm
+++ b/code/modules/economy/EFTPOS.dm
@@ -145,9 +145,9 @@
if(href_list["choice"])
switch(href_list["choice"])
if("change_code")
- var/attempt_code = input(usr, "Re-enter the current EFTPOS access code", "Confirm old EFTPOS code") as num
+ var/attempt_code = tgui_input_number(usr, "Re-enter the current EFTPOS access code", "Confirm old EFTPOS code")
if(attempt_code == access_code)
- var/trycode = input(usr, "Enter a new access code for this device (4-6 digits, numbers only)", "Enter new EFTPOS code") as num
+ var/trycode = tgui_input_number(usr, "Enter a new access code for this device (4-6 digits, numbers only)", "Enter new EFTPOS code", null, 999999, 1000)
if(trycode >= 1000 && trycode <= 999999)
access_code = trycode
else
@@ -163,8 +163,8 @@
else
to_chat(usr, "[bicon(src)]Incorrect code entered.")
if("link_account")
- var/attempt_account_num = input(usr, "Enter account number to pay EFTPOS charges into", "New account number") as num
- var/attempt_pin = input(usr, "Enter pin code", "Account pin") as num
+ var/attempt_account_num = tgui_input_number(usr, "Enter account number to pay EFTPOS charges into", "New account number")
+ var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Account pin")
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -176,7 +176,7 @@
var/choice = sanitize(input(usr, "Enter reason for EFTPOS transaction", "Transaction purpose"))
if(choice) transaction_purpose = choice
if("trans_value")
- var/try_num = input(usr, "Enter amount for EFTPOS transaction", "Transaction amount") as num
+ var/try_num = tgui_input_number(usr, "Enter amount for EFTPOS transaction", "Transaction amount")
if(try_num < 0)
tgui_alert_async(usr, "That is not a valid amount!")
else
@@ -187,7 +187,7 @@
transaction_locked = 0
transaction_paid = 0
else
- var/attempt_code = input(usr, "Enter EFTPOS access code", "Reset Transaction") as num
+ var/attempt_code = tgui_input_number(usr, "Enter EFTPOS access code", "Reset Transaction")
if(attempt_code == access_code)
transaction_locked = 0
transaction_paid = 0
@@ -229,7 +229,7 @@
var/attempt_pin = ""
var/datum/money_account/D = get_account(C.associated_account_number)
if(D.security_level)
- attempt_pin = input(usr, "Enter pin code", "EFTPOS transaction") as num
+ attempt_pin = tgui_input_number(usr, "Enter pin code", "EFTPOS transaction")
D = null
D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm
index ec2ad51dcab..e5a539f5e87 100644
--- a/code/modules/economy/cash.dm
+++ b/code/modules/economy/cash.dm
@@ -80,7 +80,7 @@
return worth
/obj/item/weapon/spacecash/attack_self()
- var/amount = input(usr, "How many [initial_name]s do you want to take? (0 to [src.worth])", "Take Money", 20) as num
+ var/amount = tgui_input_number(usr, "How many [initial_name]s do you want to take? (0 to [src.worth])", "Take Money", 20)
if(!src || QDELETED(src))
return
amount = round(CLAMP(amount, 0, src.worth))
diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm
index 9286401aaeb..08d4ab66d8b 100644
--- a/code/modules/economy/cash_register.dm
+++ b/code/modules/economy/cash_register.dm
@@ -107,8 +107,8 @@
if("toggle_cash_lock")
cash_locked = !cash_locked
if("link_account")
- var/attempt_account_num = input(usr, "Enter account number", "New account number") as num
- var/attempt_pin = input(usr, "Enter PIN", "Account PIN") as num
+ var/attempt_account_num = tgui_input_number(usr, "Enter account number", "New account number")
+ var/attempt_pin = tgui_input_number(usr, "Enter PIN", "Account PIN")
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -117,11 +117,11 @@
else
to_chat(usr, "[bicon(src)]Account not found.")
if("custom_order")
- var/t_purpose = sanitize(input(usr, "Enter purpose", "New purpose") as text)
+ var/t_purpose = sanitize(tgui_input_text(usr, "Enter purpose", "New purpose"))
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
- var/t_amount = round(input(usr, "Enter price", "New price") as num)
+ var/t_amount = round(tgui_input_number(usr, "Enter price", "New price"))
if (!t_amount || !Adjacent(usr) || t_amount < 0) return
transaction_amount += t_amount
price_list += t_amount
@@ -129,7 +129,7 @@
src.visible_message("[bicon(src)][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
- var/n_amount = round(input(usr, "Enter amount", "New amount") as num)
+ var/n_amount = round(tgui_input_number(usr, "Enter amount", "New amount"))
n_amount = CLAMP(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
@@ -234,7 +234,7 @@
var/datum/money_account/D = get_account(I.associated_account_number)
var/attempt_pin = ""
if(D && D.security_level)
- attempt_pin = input(usr, "Enter PIN", "Transaction") as num
+ attempt_pin = tgui_input_number(usr, "Enter PIN", "Transaction")
D = null
D = attempt_account_access(I.associated_account_number, attempt_pin, 2)
diff --git a/code/modules/economy/casinocash.dm b/code/modules/economy/casinocash.dm
index 25486c33f83..201c6147dbd 100644
--- a/code/modules/economy/casinocash.dm
+++ b/code/modules/economy/casinocash.dm
@@ -112,7 +112,7 @@
return worth
/obj/item/weapon/spacecasinocash/attack_self()
- var/amount = input(usr, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20) as num
+ var/amount = tgui_input_number(usr, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20)
if(!src || QDELETED(src))
return
amount = round(CLAMP(amount, 0, src.worth))
diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm
index 6e68b644aa7..d9755b50419 100644
--- a/code/modules/economy/retail_scanner.dm
+++ b/code/modules/economy/retail_scanner.dm
@@ -101,8 +101,8 @@
else
to_chat(usr, "[bicon(src)]Insufficient access.")
if("link_account")
- var/attempt_account_num = input(usr, "Enter account number", "New account number") as num
- var/attempt_pin = input(usr, "Enter PIN", "Account PIN") as num
+ var/attempt_account_num = tgui_input_number(usr, "Enter account number", "New account number")
+ var/attempt_pin = tgui_input_number(usr, "Enter PIN", "Account PIN")
linked_account = attempt_account_access(attempt_account_num, attempt_pin, 1)
if(linked_account)
if(linked_account.suspended)
@@ -111,11 +111,11 @@
else
to_chat(usr, "[bicon(src)]Account not found.")
if("custom_order")
- var/t_purpose = sanitize(input(usr, "Enter purpose", "New purpose") as text)
+ var/t_purpose = sanitize(tgui_input_text(usr, "Enter purpose", "New purpose"))
if (!t_purpose || !Adjacent(usr)) return
transaction_purpose = t_purpose
item_list += t_purpose
- var/t_amount = round(input(usr, "Enter price", "New price") as num)
+ var/t_amount = round(tgui_input_number(usr, "Enter price", "New price"))
if (!t_amount || !Adjacent(usr)) return
transaction_amount += t_amount
price_list += t_amount
@@ -123,7 +123,7 @@
src.visible_message("[bicon(src)][transaction_purpose]: [t_amount] Thaler\s.")
if("set_amount")
var/item_name = locate(href_list["item"])
- var/n_amount = round(input(usr, "Enter amount", "New amount") as num)
+ var/n_amount = round(tgui_input_number(usr, "Enter amount", "New amount"))
n_amount = CLAMP(n_amount, 0, 20)
if (!item_list[item_name] || !Adjacent(usr)) return
transaction_amount += (n_amount - item_list[item_name]) * price_list[item_name]
@@ -211,7 +211,7 @@
var/datum/money_account/D = get_account(I.associated_account_number)
var/attempt_pin = ""
if(D && D.security_level)
- attempt_pin = input(usr, "Enter PIN", "Transaction") as num
+ attempt_pin = tgui_input_number(usr, "Enter PIN", "Transaction")
D = null
D = attempt_account_access(I.associated_account_number, attempt_pin, 2)
diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm
index f073f3f3969..55c726539a2 100644
--- a/code/modules/economy/vending.dm
+++ b/code/modules/economy/vending.dm
@@ -327,7 +327,7 @@ GLOBAL_LIST_EMPTY(vending_products)
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = input(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/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index ea4f8d59cde..f8dca1824ba 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -156,7 +156,7 @@
config.allow_random_events = text2num(href_list["pause_all"])
log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
else if(href_list["interval"])
- var/delay = input(usr, "Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
+ var/delay = tgui_input_number(usr, "Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier")
if(delay && delay > 0)
var/datum/event_container/EC = locate(href_list["interval"])
EC.delay_modifier = delay
@@ -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
@@ -183,7 +183,7 @@
var/datum/event_meta/EM = locate(href_list["set_type"])
EM.event_type = type
else if(href_list["set_weight"])
- var/weight = input(usr, "Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
+ var/weight = tgui_input_number(usr, "Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight")
if(weight && weight > 0)
var/datum/event_meta/EM = locate(href_list["set_weight"])
EM.weight = weight
diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm
index f98da20f8c2..11ce0e461ec 100644
--- a/code/modules/food/kitchen/smartfridge/smartfridge.dm
+++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm
@@ -216,7 +216,7 @@
if(params["amount"])
amount = params["amount"]
else
- amount = input(usr, "How many items?", "How many items would you like to take out?", 1) as num|null
+ amount = tgui_input_number(usr, "How many items?", "How many items would you like to take out?", 1)
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src))
return FALSE
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index 8c333aaf10e..58df571a498 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -157,7 +157,7 @@
players += player
//players -= usr
var/maxcards = max(min(cards.len,10),1)
- var/dcard = input(usr, "How many card(s) do you wish to deal? You may deal up to [maxcards] cards.") as num
+ var/dcard = tgui_input_number(usr, "How many card(s) do you wish to deal? You may deal up to [maxcards] cards.", null, null, maxcards)
if(dcard > maxcards)
return
var/mob/living/M = tgui_input_list(usr, "Who do you wish to deal [dcard] card(s)?", "Deal to whom?", players)
@@ -321,7 +321,7 @@
var/i
var/maxcards = min(cards.len,5) // Maximum of 5 cards at once
- var/discards = input(usr, "How many cards do you want to discard? You may discard up to [maxcards] card(s)") as num
+ var/discards = tgui_input_number(usr, "How many cards do you want to discard? You may discard up to [maxcards] card(s)", null, null, maxcards, 0)
if(discards > maxcards)
return
for (i = 0;i < discards;i++)
diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm
index f88e06bce11..af884bf2d3a 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)
@@ -191,22 +191,22 @@
stop_playing()
else if(href_list["setlinearfalloff"])
- var/amount = input(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration") as null|num
+ var/amount = tgui_input_number(usr, "Set linear sustain duration in seconds", "Linear Sustain Duration")
if(!isnull(amount))
set_linear_falloff_duration(round(amount * 10, world.tick_lag))
else if(href_list["setexpfalloff"])
- var/amount = input(usr, "Set exponential sustain factor", "Exponential sustain factor") as null|num
+ var/amount = tgui_input_number(usr, "Set exponential sustain factor", "Exponential sustain factor")
if(!isnull(amount))
set_exponential_drop_rate(round(amount, 0.00001))
else if(href_list["setvolume"])
- var/amount = input(usr, "Set volume", "Volume") as null|num
+ var/amount = tgui_input_number(usr, "Set volume", "Volume")
if(!isnull(amount))
set_volume(round(amount, 1))
else if(href_list["setdropoffvolume"])
- var/amount = input(usr, "Set dropoff threshold", "Dropoff Threshold Volume") as null|num
+ var/amount = tgui_input_number(usr, "Set dropoff threshold", "Dropoff Threshold Volume")
if(!isnull(amount))
set_dropoff_volume(round(amount, 0.01))
@@ -233,7 +233,7 @@
set_instrument(choice)
else if(href_list["setnoteshift"])
- var/amount = input(usr, "Set note shift", "Note Shift") as null|num
+ var/amount = tgui_input_number(usr, "Set note shift", "Note Shift")
if(!isnull(amount))
note_shift = clamp(amount, note_shift_min, note_shift_max)
diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm
index 4020d03a34a..a52e626dcce 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/special_pins/string_pin.dm b/code/modules/integrated_electronics/core/special_pins/string_pin.dm
index a0428a12de0..db9bc31944f 100644
--- a/code/modules/integrated_electronics/core/special_pins/string_pin.dm
+++ b/code/modules/integrated_electronics/core/special_pins/string_pin.dm
@@ -3,7 +3,7 @@
name = "string pin"
/datum/integrated_io/string/ask_for_pin_data(mob/user)
- var/new_data = input(usr, "Please type in a string.","[src] string writing") as null|text
+ var/new_data = tgui_input_text(usr, "Please type in a string.","[src] string writing")
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(new_data && holder.check_interactivity(user) )
diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm
index e248ffe5454..278ddf09473 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 e53b1397de3..2d275e2386c 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 2fb6ad45982..0148c01c05e 100644
--- a/code/modules/integrated_electronics/subtypes/memory.dm
+++ b/code/modules/integrated_electronics/subtypes/memory.dm
@@ -96,13 +96,13 @@
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)].")
if("number")
accepting_refs = 0
- new_data = input(usr, "Now type in a number.","[src] number writing") as null|num
+ new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing")
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "You set \the [src]'s memory to [O.display_data(O.data)].")
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 85a06cd5714..421110c3911 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 41f0c8688ea..b4ea291cdb1 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 1b043ec8c11..f3a315827d5 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/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index f6421312784..1a78de6558e 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -928,7 +928,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/mob/living/M = tgui_input_list(src, "Select who to whisper to:", "Whisper to?", options)
if(!M)
return 0
- var/msg = sanitize(input(src, "Message:", "Spectral Whisper") as text|null)
+ var/msg = sanitize(tgui_input_text(src, "Message:", "Spectral Whisper"))
if(msg)
log_say("(SPECWHISP to [key_name(M)]): [msg]", src)
to_chat(M, " You hear a strange, unidentifiable voice in your head... [msg]")
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 028fc518e23..bac825919a6 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -297,7 +297,7 @@ var/list/_simple_mob_default_emotes = list(
var/datum/gender/T = gender_datums[get_visible_gender()]
- pose = sanitize(input(usr, "This is [src]. [T.he]...", "Pose", null) as text)
+ pose = sanitize(tgui_input_text(usr, "This is [src]. [T.he]...", "Pose", null))
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 9c1c64d1053..692a3cb42fb 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
@@ -1217,7 +1217,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/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index 74dfba1b369..f8d49b046ad 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -94,7 +94,7 @@
if(!target) return
- text = input(usr, "What would you like to say?", "Speak to creature", null, null)
+ text = tgui_input_text(usr, "What would you like to say?", "Speak to creature", null, null)
text = sanitize(text)
@@ -134,7 +134,7 @@
set desc = "Whisper silently to someone over a distance."
set category = "Abilities"
- var/msg = sanitize(input(usr, "Message:", "Psychic Whisper") as text|null)
+ var/msg = sanitize(tgui_input_text(usr, "Message:", "Psychic Whisper"))
if(msg)
log_say("(PWHISPER to [key_name(M)]) [msg]", src)
to_chat(M, "You hear a strange, alien voice in your head... [msg]")
diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
index c6b353281b3..6967b1b5c78 100644
--- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm
@@ -295,7 +295,7 @@
return
var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or between 1 to 600% in dorms area). Up-sizing consumes metal, downsizing returns metal."
- var/new_size = input(user, nagmessage, "Pick a Size", user.size_multiplier*100) as num|null
+ var/new_size = tgui_input_number(user, nagmessage, "Pick a Size", user.size_multiplier*100, 600, 1)
if(!new_size || !size_range_check(new_size))
return
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
index acd1b8f5405..f627a191fec 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
@@ -67,7 +67,7 @@
to_chat(src, "Their plasma vessel is missing.")
return
- var/amount = input(usr, "Amount:", "Transfer Plasma to [M]") as num
+ var/amount = tgui_input_number(usr, "Amount:", "Transfer Plasma to [M]")
if (amount)
amount = abs(round(amount))
if(check_alien_ability(amount,0,O_PLASMA))
diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm
index a570ed60dbe..ee2ecc04d74 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 dd3fc5f0640..ea15eaa8c3e 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 a1dd02b1635..5bbab6d160c 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 7caad30448b..d014bf30b46 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/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index b3a1f39454d..25347558735 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -9,7 +9,7 @@
return
if(!new_type)
- new_type = input(usr, "Mob type path:", "Mob type") as text|null
+ new_type = tgui_input_text(usr, "Mob type path:", "Mob type")
if(istext(new_type))
new_type = text2path(new_type)
diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm
index 703aac2813f..f10ce85b863 100644
--- a/code/modules/mob/say_vr.dm
+++ b/code/modules/mob/say_vr.dm
@@ -42,7 +42,7 @@
var/input
if(!message)
- input = sanitize_or_reflect(input(src,"Choose an emote to display.") as text|null, src)
+ input = sanitize_or_reflect(tgui_input_text(src,"Choose an emote to display."), src)
else
input = message
@@ -123,7 +123,7 @@
to_chat(src, "You cannot speak in IC (muted).")
return
if (!message)
- message = input(usr, "Type a message to say.","Psay") as text|null
+ message = tgui_input_text(usr, "Type a message to say.","Psay")
message = sanitize_or_reflect(message,src)
if (!message)
return
@@ -204,7 +204,7 @@
to_chat(src, "You cannot speak in IC (muted).")
return
if (!message)
- message = input(usr, "Type a message to emote.","Pme") as text|null
+ message = tgui_input_text(usr, "Type a message to emote.","Pme")
message = sanitize_or_reflect(message,src)
if (!message)
return
diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm
index b3827e507c1..e37e994f43c 100644
--- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm
@@ -28,7 +28,7 @@
if("PRG_newtextfile")
if(!HDD)
return
- var/newname = sanitize(input(usr, "Enter file name or leave blank to cancel:", "File rename"))
+ var/newname = sanitize(tgui_input_text(usr, "Enter file name or leave blank to cancel:", "File rename"))
if(!newname)
return
var/datum/computer_file/data/F = new/datum/computer_file/data()
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 e72e30fd388..20fdd42f814 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 ea88d3597e0..8471288b09e 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 b22be72d1eb..44c5a821aeb 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/research/ntmonitor.dm b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm
index d1aa9b78336..8814e2a16bf 100644
--- a/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm
+++ b/code/modules/modular_computers/file_system/programs/research/ntmonitor.dm
@@ -80,14 +80,14 @@
if("ban_nid")
if(!ntnet_global)
return
- var/nid = input(usr,"Enter NID of device which you want to block from the network:", "Enter NID") as null|num
+ var/nid = tgui_input_number(usr,"Enter NID of device which you want to block from the network:", "Enter NID")
if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE)
ntnet_global.banned_nids |= nid
return TRUE
if("unban_nid")
if(!ntnet_global)
return
- var/nid = input(usr,"Enter NID of device which you want to unblock from the network:", "Enter NID") as null|num
+ var/nid = tgui_input_number(usr,"Enter NID of device which you want to unblock from the network:", "Enter NID")
if(nid && tgui_status(usr, state) == STATUS_INTERACTIVE)
ntnet_global.banned_nids -= nid
return TRUE
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 752d6d849ef..a9ba1d90c07 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/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm
index f673e060ef6..0242ad2a1f1 100644
--- a/code/modules/modular_computers/laptop_vendor.dm
+++ b/code/modules/modular_computers/laptop_vendor.dm
@@ -285,7 +285,7 @@
return 0
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = input(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/modules/news/new_newspaper.dm b/code/modules/news/new_newspaper.dm
index c9759a5a837..3962f80cf4e 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 86a11491691..9eae4b19eef 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 ad1af357f16..64e6772a362 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 750f1b7df25..a2da8ecdea9 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/nifsoft/software/15_misc.dm b/code/modules/nifsoft/software/15_misc.dm
index 46db84c235f..8e7101395f7 100644
--- a/code/modules/nifsoft/software/15_misc.dm
+++ b/code/modules/nifsoft/software/15_misc.dm
@@ -127,7 +127,7 @@
/datum/nifsoft/sizechange/activate()
if((. = ..()))
- var/new_size = input(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 (!nif.human.size_range_check(new_size))
if(new_size)
diff --git a/code/modules/overmap/champagne.dm b/code/modules/overmap/champagne.dm
index 477f9cc0722..0d36766535b 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/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm
index 789d768e6bc..d67bb87c5cf 100644
--- a/code/modules/overmap/disperser/disperser_console.dm
+++ b/code/modules/overmap/disperser/disperser_console.dm
@@ -177,7 +177,7 @@
. = TRUE
if("calibration")
- var/input = input(usr, "0-9", "disperser calibration", 0) as num|null
+ var/input = tgui_input_number(usr, "0-9", "disperser calibration", 0, 9, 0)
if(!isnull(input)) //can be zero so we explicitly check for null
var/calnum = sanitize_integer(text2num(params["calibration"]), 0, caldigit)//sanitiiiiize
calibration[calnum + 1] = sanitize_integer(input, 0, 9, 0)//must add 1 because js indexes from 0
@@ -189,14 +189,14 @@
. = TRUE
if("strength")
- var/input = input(usr, "1-5", "disperser strength", 1) as num|null
+ var/input = tgui_input_number(usr, "1-5", "disperser strength", 1, 5, 1)
if(input && tgui_status(usr, state) == STATUS_INTERACTIVE)
strength = sanitize_integer(input, 1, 5, 1)
middle.update_idle_power_usage(strength * range * 100)
. = TRUE
if("range")
- var/input = input(usr, "1-5", "disperser radius", 1) as num|null
+ var/input = tgui_input_number(usr, "1-5", "disperser radius", 1, 5, 1)
if(input && tgui_status(usr, state) == STATUS_INTERACTIVE)
range = sanitize_integer(input, 1, 5, 1)
middle.update_idle_power_usage(strength * range * 100)
diff --git a/code/modules/overmap/ships/computers/engine_control.dm b/code/modules/overmap/ships/computers/engine_control.dm
index 1110f6b2469..ab1bb61b746 100644
--- a/code/modules/overmap/ships/computers/engine_control.dm
+++ b/code/modules/overmap/ships/computers/engine_control.dm
@@ -62,7 +62,7 @@
. = TRUE
if("set_global_limit")
- var/newlim = input(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
+ var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
linked.thrust_limit = clamp(newlim/100, 0, 1)
@@ -78,7 +78,7 @@
if("set_limit")
var/datum/ship_engine/E = locate(params["engine"])
- var/newlim = input(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
+ var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
var/limit = clamp(newlim/100, 0, 1)
diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm
index 2c821ef793a..64212fd3601 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)
@@ -171,10 +171,10 @@ GLOBAL_LIST_EMPTY(all_waypoints)
R.fields["x"] = linked.x
R.fields["y"] = linked.y
if("new")
- var/newx = input(usr, "Input new entry x coordinate", "Coordinate input", linked.x) as num
+ var/newx = tgui_input_number(usr, "Input new entry x coordinate", "Coordinate input", linked.x)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return TRUE
- var/newy = input(usr, "Input new entry y coordinate", "Coordinate input", linked.y) as num
+ var/newy = tgui_input_number(usr, "Input new entry y coordinate", "Coordinate input", linked.y)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
R.fields["x"] = CLAMP(newx, 1, world.maxx)
@@ -191,14 +191,14 @@ GLOBAL_LIST_EMPTY(all_waypoints)
if("setcoord")
if(params["setx"])
- var/newx = input(usr, "Input new destiniation x coordinate", "Coordinate input", dx) as num|null
+ var/newx = tgui_input_number(usr, "Input new destiniation x coordinate", "Coordinate input", dx)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newx)
dx = CLAMP(newx, 1, world.maxx)
if(params["sety"])
- var/newy = input(usr, "Input new destiniation y coordinate", "Coordinate input", dy) as num|null
+ var/newy = tgui_input_number(usr, "Input new destiniation y coordinate", "Coordinate input", dy)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return
if(newy)
@@ -216,13 +216,13 @@ GLOBAL_LIST_EMPTY(all_waypoints)
. = TRUE
if("speedlimit")
- var/newlimit = input(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
+ var/newlimit = tgui_input_number(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000)
if(newlimit)
speedlimit = CLAMP(newlimit/1000, 0, 100)
. = TRUE
if("accellimit")
- var/newlimit = input(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
+ var/newlimit = tgui_input_number(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000)
if(newlimit)
accellimit = max(newlimit/1000, 0)
. = TRUE
diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm
index e09678f9b0f..21cd9654ee8 100644
--- a/code/modules/overmap/ships/computers/sensors.dm
+++ b/code/modules/overmap/ships/computers/sensors.dm
@@ -106,7 +106,7 @@
if(sensors)
switch(action)
if("range")
- var/nrange = input(usr, "Set new sensors range", "Sensor range", sensors.range) as num|null
+ var/nrange = tgui_input_number(usr, "Set new sensors range", "Sensor range", sensors.range)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(nrange)
diff --git a/code/modules/paperwork/adminpaper.dm b/code/modules/paperwork/adminpaper.dm
index 9cf7f2ddf67..91d3fe241ca 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 731dfa80d3f..96e99e9dbdd 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/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 9fcf6c33acc..bcc0d0abc4d 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -282,7 +282,7 @@
if(new_signature)
signature = new_signature
*/
- signature = sanitize(input(usr, "Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature))
+ signature = sanitize(tgui_input_text(usr, "Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature))
/obj/item/weapon/pen/proc/get_signature(var/mob/user)
return (user && user.real_name) ? user.real_name : "Anonymous"
diff --git a/code/modules/pda/core_apps.dm b/code/modules/pda/core_apps.dm
index 141f41a8fb9..f15c07bfff8 100644
--- a/code/modules/pda/core_apps.dm
+++ b/code/modules/pda/core_apps.dm
@@ -62,7 +62,7 @@
return TRUE
switch(action)
if("Edit")
- var/n = input(usr, "Please enter message", name, notehtml) as message
+ var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
if(pda.loc == usr)
note = adminscrub(n)
notehtml = html_decode(note)
diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm
index 03996dc35cf..6aa833fd831 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 a19552d3681..c61624e40b0 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 83d81f99a72..f8915e08afe 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/cable.dm b/code/modules/power/cable.dm
index a4efe1336c4..c850085bbd5 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -978,7 +978,7 @@ var/list/possible_cable_coil_colours = list(
/obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
- var/N = input(usr, "How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1) as num|null
+ var/N = tgui_input_number(usr, "How many units of wire do you want to take from [src]? You can only take up to [amount] at a time.", "Split stacks", 1)
if(N && N <= amount)
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = N
diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm
index 0fb5626a57c..308c9307839 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 7f909d48969..ae3af61c9a3 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 6fd14755af1..24394b79733 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 b8df2267751..77b703e85e7 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 8f7e1f9f52a..b2b33ef96bd 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 ef4dd1641c2..9ff359fd290 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 4f1b4e5dcde..381f6b09f69 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/power/turbine.dm b/code/modules/power/turbine.dm
index 297a749aa7d..77a5659cdda 100644
--- a/code/modules/power/turbine.dm
+++ b/code/modules/power/turbine.dm
@@ -124,7 +124,7 @@
if(default_deconstruction_crowbar(user, W))
return
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input(usr, "Enter a new ident tag.", name, comp_id) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", name, comp_id)
if(new_ident && user.Adjacent(src))
comp_id = new_ident
return
@@ -337,7 +337,7 @@
/obj/machinery/computer/turbine_computer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/device/multitool))
- var/new_ident = input(usr, "Enter a new ident tag.", name, id) as null|text
+ var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", name, id)
if(new_ident && user.Adjacent(src))
id = new_ident
return
diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm
index 2b1cda09a8f..e842772f4a5 100644
--- a/code/modules/random_map/drop/droppod.dm
+++ b/code/modules/random_map/drop/droppod.dm
@@ -164,7 +164,7 @@
return
if(tgui_alert(usr, "Do you wish the mob to have a player?","Assign Player?",list("No","Yes")) == "No")
- var/spawn_count = input(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null) as num
+ var/spawn_count = tgui_input_number(usr, "How many mobs do you wish the pod to contain?", "Drop Pod Selection", null)
if(spawn_count <= 0)
return
for(var/i=0;iInvalid 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/resleeving/designer.dm b/code/modules/resleeving/designer.dm
index a2d50cf6438..3bc4cf64bb7 100644
--- a/code/modules/resleeving/designer.dm
+++ b/code/modules/resleeving/designer.dm
@@ -369,7 +369,7 @@
return
if(params["target_href"] == "size_multiplier")
- var/new_size = input(user, "Choose your character's size, ranging from 25% to 200%", "Character Preference") as num|null
+ var/new_size = tgui_input_number(user, "Choose your character's size, ranging from 25% to 200%", "Character Preference", null, 200, 25)
if(new_size && ISINRANGE(new_size,25,200))
active_br.sizemult = (new_size/100)
update_preview_icon()
diff --git a/code/modules/shieldgen/shield_generator.dm b/code/modules/shieldgen/shield_generator.dm
index 48d712bf537..2158a53d02f 100644
--- a/code/modules/shieldgen/shield_generator.dm
+++ b/code/modules/shieldgen/shield_generator.dm
@@ -505,14 +505,14 @@
switch(action)
if("set_range")
- var/new_range = input(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius) as num
+ var/new_range = tgui_input_number(usr, "Enter new field range (1-[world.maxx]). Leave blank to cancel.", "Field Radius Control", field_radius, world.maxx, 1)
if(!new_range)
return TRUE
target_radius = between(1, new_range, world.maxx)
return TRUE
if("set_input_cap")
- var/new_cap = round(input(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)) as num)
+ var/new_cap = round(tgui_input_number(usr, "Enter new input cap (in kW). Enter 0 or nothing to disable input cap.", "Generator Power Control", round(input_cap / 1000)))
if(!new_cap)
input_cap = 0
return
diff --git a/code/modules/shuttles/shuttle_console.dm b/code/modules/shuttles/shuttle_console.dm
index b57b067bc37..ce64593b9da 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 935b47ca722..1051ba6c2d9 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/stockmarket/computer.dm b/code/modules/stockmarket/computer.dm
index ffa09437c5f..4252d86cfeb 100644
--- a/code/modules/stockmarket/computer.dm
+++ b/code/modules/stockmarket/computer.dm
@@ -274,7 +274,7 @@
to_chat(user, "This account does not own any shares of [S.name]!")
return
var/price = S.current_value
- var/amt = round(input(user, "How many shares? \n(Have: [avail], unit price: [price])", "Sell shares in [S.name]", 0) as num|null)
+ var/amt = round(tgui_input_number(user, "How many shares? \n(Have: [avail], unit price: [price])", "Sell shares in [S.name]", 0))
amt = min(amt, S.shareholders[logged_in])
if (!user || (!(user in range(1, src)) && iscarbon(user)))
@@ -309,7 +309,7 @@
var/avail = S.available_shares
var/price = S.current_value
var/canbuy = round(b / price)
- var/amt = round(input(user, "How many shares? \n(Available: [avail], unit price: [price], can buy: [canbuy])", "Buy shares in [S.name]", 0) as num|null)
+ var/amt = round(tgui_input_number(user, "How many shares? \n(Available: [avail], unit price: [price], can buy: [canbuy])", "Buy shares in [S.name]", 0))
if (!user || (!(user in range(1, src)) && iscarbon(user)))
return
if (li != logged_in)
diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm
index 9c210652c2a..b424852ad91 100644
--- a/code/modules/surgery/robotics.dm
+++ b/code/modules/surgery/robotics.dm
@@ -470,7 +470,7 @@
var/new_name = target.real_name
while(target.client)
if(!target) return
- var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name)
+ var/try_name = tgui_input_text(target,"Pick a name for your new form!", "New Name", target.name)
var/clean_name = sanitizeName(try_name, allow_numbers = TRUE)
if(clean_name)
var/okay = tgui_alert(target,"New name will be '[clean_name]', ok?", "Confirmation",list("Cancel","Ok"))
@@ -562,7 +562,7 @@
var/new_name = ""
while(!new_name)
if(!target) return
- var/try_name = input(target,"Pick a name for your new form!", "New Name", target.name)
+ var/try_name = tgui_input_text(target,"Pick a name for your new form!", "New Name", target.name)
var/clean_name = sanitizeName(try_name, allow_numbers = TRUE)
if(clean_name)
var/okay = tgui_alert(target,"New name will be '[clean_name]', ok?", "Confirmation",list("Cancel","Ok"))
diff --git a/code/modules/telesci/gps_advanced.dm b/code/modules/telesci/gps_advanced.dm
index bc0d3223184..4b67718570e 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 f60e7423258..ce17eb043d8 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/agentcard.dm b/code/modules/tgui/modules/agentcard.dm
index 30460214369..012438dda69 100644
--- a/code/modules/tgui/modules/agentcard.dm
+++ b/code/modules/tgui/modules/agentcard.dm
@@ -75,7 +75,7 @@
var/mob/living/carbon/human/H = usr
if(H.dna)
default = H.dna.b_type
- var/new_blood_type = sanitize(input(usr,"What blood type would you like to be written on this card?","Agent Card Blood Type",default) as null|text)
+ var/new_blood_type = sanitize(tgui_input_text(usr,"What blood type would you like to be written on this card?","Agent Card Blood Type",default))
if(!isnull(new_blood_type) && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.blood_type = new_blood_type
to_chat(usr, "Blood type changed to '[new_blood_type]'.")
@@ -86,7 +86,7 @@
var/mob/living/carbon/human/H = usr
if(H.dna)
default = H.dna.unique_enzymes
- var/new_dna_hash = sanitize(input(usr,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default) as null|text)
+ var/new_dna_hash = sanitize(tgui_input_text(usr,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default))
if(!isnull(new_dna_hash) && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.dna_hash = new_dna_hash
to_chat(usr, "DNA hash changed to '[new_dna_hash]'.")
@@ -103,7 +103,7 @@
to_chat(usr, "Fingerprint hash changed to '[new_fingerprint_hash]'.")
. = TRUE
if("name")
- var/new_name = sanitizeName(input(usr,"What name would you like to put on this card?","Agent Card Name", S.registered_name) as null|text)
+ var/new_name = sanitizeName(tgui_input_text(usr,"What name would you like to put on this card?","Agent Card Name", S.registered_name))
if(!isnull(new_name) && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.registered_name = new_name
S.update_name()
@@ -114,7 +114,7 @@
to_chat(usr, "Photo changed.")
. = TRUE
if("sex")
- var/new_sex = sanitize(input(usr,"What sex would you like to put on this card?","Agent Card Sex", S.sex) as null|text)
+ var/new_sex = sanitize(tgui_input_text(usr,"What sex would you like to put on this card?","Agent Card Sex", S.sex))
if(!isnull(new_sex) && tgui_status(usr, state) == STATUS_INTERACTIVE)
S.sex = new_sex
to_chat(usr, "Sex changed to '[new_sex]'.")
diff --git a/code/modules/tgui/modules/communications.dm b/code/modules/tgui/modules/communications.dm
index 1a2ae082ef3..050c366cafc 100644
--- a/code/modules/tgui/modules/communications.dm
+++ b/code/modules/tgui/modules/communications.dm
@@ -260,7 +260,7 @@
if(message_cooldown > world.time)
to_chat(usr, "Please allow at least one minute to pass between announcements.")
return
- var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|message
+ var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "Priority Announcement", multiline = TRUE)
if(!input || message_cooldown > world.time || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
return
if(length(input) < COMM_MSGLEN_MINIMUM)
@@ -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/gyrotron_control.dm b/code/modules/tgui/modules/gyrotron_control.dm
index ee6f5af9b6f..e0c47758498 100644
--- a/code/modules/tgui/modules/gyrotron_control.dm
+++ b/code/modules/tgui/modules/gyrotron_control.dm
@@ -18,7 +18,7 @@
switch(action)
if("set_tag")
- var/new_ident = sanitize_text(input(usr, "Enter a new ident tag.", "Gyrotron Control", gyro_tag) as null|text)
+ var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", gyro_tag))
if(new_ident)
gyro_tag = new_ident
return TRUE
diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm
index 5aac12d7c16..a9fff0e6d40 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
@@ -319,8 +319,8 @@
R.fields["x"] = linked.x
R.fields["y"] = linked.y
if("new")
- var/newx = input(usr, "Input new entry x coordinate", "Coordinate input", linked.x) as num
- var/newy = input(usr, "Input new entry y coordinate", "Coordinate input", linked.y) as num
+ var/newx = tgui_input_number(usr, "Input new entry x coordinate", "Coordinate input", linked.x)
+ var/newy = tgui_input_number(usr, "Input new entry y coordinate", "Coordinate input", linked.y)
R.fields["x"] = CLAMP(newx, 1, world.maxx)
R.fields["y"] = CLAMP(newy, 1, world.maxy)
known_sectors[sec_name] = R
@@ -335,12 +335,12 @@
if("setcoord")
if(params["setx"])
- var/newx = input(usr, "Input new destiniation x coordinate", "Coordinate input", dx) as num|null
+ var/newx = tgui_input_number(usr, "Input new destiniation x coordinate", "Coordinate input", dx)
if(newx)
dx = CLAMP(newx, 1, world.maxx)
if(params["sety"])
- var/newy = input(usr, "Input new destiniation y coordinate", "Coordinate input", dy) as num|null
+ var/newy = tgui_input_number(usr, "Input new destiniation y coordinate", "Coordinate input", dy)
if(newy)
dy = CLAMP(newy, 1, world.maxy)
. = TRUE
@@ -356,13 +356,13 @@
. = TRUE
if("speedlimit")
- var/newlimit = input(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000) as num|null
+ var/newlimit = tgui_input_number(usr, "Input new speed limit for autopilot (0 to brake)", "Autopilot speed limit", speedlimit*1000)
if(newlimit)
speedlimit = CLAMP(newlimit/1000, 0, 100)
. = TRUE
if("accellimit")
- var/newlimit = input(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000) as num|null
+ var/newlimit = tgui_input_number(usr, "Input new acceleration limit", "Acceleration limit", accellimit*1000)
if(newlimit)
accellimit = max(newlimit/1000, 0)
. = TRUE
@@ -402,7 +402,7 @@
. = TRUE
if("set_global_limit")
- var/newlim = input(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100) as num
+ var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100%)", "Thrust limit", linked.thrust_limit*100, 100, 0)
linked.thrust_limit = clamp(newlim/100, 0, 1)
for(var/datum/ship_engine/E in linked.engines)
E.set_thrust_limit(linked.thrust_limit)
@@ -416,7 +416,7 @@
if("set_limit")
var/datum/ship_engine/E = locate(params["engine"])
- var/newlim = input(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit()) as num
+ var/newlim = tgui_input_number(usr, "Input new thrust limit (0..100)", "Thrust limit", E.get_thrust_limit(), 100, 0)
var/limit = clamp(newlim/100, 0, 1)
if(istype(E))
E.set_thrust_limit(limit)
@@ -437,7 +437,7 @@
/* END ENGINES */
/* SENSORS */
if("range")
- var/nrange = input(usr, "Set new sensors range", "Sensor range", sensors.range) as num|null
+ var/nrange = tgui_input_number(usr, "Set new sensors range", "Sensor range", sensors.range)
if(nrange)
sensors.set_range(CLAMP(nrange, 1, world.view))
. = TRUE
diff --git a/code/modules/tgui/modules/rustcore_monitor.dm b/code/modules/tgui/modules/rustcore_monitor.dm
index 553363a9633..a7ce6edbbb0 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 b7c43b521d2..820a937b992 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/virus2/admin.dm b/code/modules/virus2/admin.dm
index dd9ae7ead77..5ca289bd2ab 100644
--- a/code/modules/virus2/admin.dm
+++ b/code/modules/virus2/admin.dm
@@ -129,12 +129,12 @@
s_multiplier[stage] = max(1, round(initial(E.maxm)/2))
else if(href_list["chance"])
var/datum/disease2/effect/Eff = s[stage]
- var/I = input(usr, "Chance, per tick, of this effect happening (min 0, max [initial(Eff.chance_maxm)])", "Effect Chance", s_chance[stage]) as null|num
+ var/I = tgui_input_number(usr, "Chance, per tick, of this effect happening (min 0, max [initial(Eff.chance_maxm)])", "Effect Chance", s_chance[stage], initial(Eff.chance_maxm), 0)
if(I == null || I < 0 || I > initial(Eff.chance_maxm)) return
s_chance[stage] = I
else if(href_list["multiplier"])
var/datum/disease2/effect/Eff = s[stage]
- var/I = input(usr, "Multiplier for this effect (min 1, max [initial(Eff.maxm)])", "Effect Multiplier", s_multiplier[stage]) as null|num
+ var/I = tgui_input_number(usr, "Multiplier for this effect (min 1, max [initial(Eff.maxm)])", "Effect Multiplier", s_multiplier[stage], initial(Eff.maxm), 1)
if(I == null || I < 1 || I > initial(Eff.maxm)) return
s_multiplier[stage] = I
if("species")
@@ -150,7 +150,7 @@
if(!infectee.species || !(infectee.species.get_bodytype() in species))
infectee = null
if("ichance")
- var/I = input(usr, "Input infection chance", "Infection Chance", infectionchance) as null|num
+ var/I = tgui_input_number(usr, "Input infection chance", "Infection Chance", infectionchance)
if(!I) return
infectionchance = I
if("stype")
@@ -158,7 +158,7 @@
if(!S) return
spreadtype = S
if("speed")
- var/S = input(usr, "Input speed", "Speed", speed) as null|num
+ var/S = tgui_input_number(usr, "Input speed", "Speed", speed)
if(!S) return
speed = S
if("antigen")
@@ -172,7 +172,7 @@
else if(href_list["reset"])
antigens = list()
if("resistance")
- var/S = input(usr, "Input % resistance to antibiotics", "Resistance", resistance) as null|num
+ var/S = tgui_input_number(usr, "Input % resistance to antibiotics", "Resistance", resistance)
if(!S) return
resistance = S
if("infectee")
diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm
index 471d2fca036..c8ffea49cf4 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,17 +1020,17 @@
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
if("b_escapetime")
- var/escape_time_input = input(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time") as num|null
+ var/escape_time_input = tgui_input_number(user, "Set number of seconds for prey to escape on resist (1-60)", "Prey Escape Time", null, 60, 1)
if(!isnull(escape_time_input))
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 dd131ffca34..af4a2e063d4 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 1f8eb6f2077..949eed7eb36 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 5448db97f2e..19516f47cc7 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 ddca8b6fe51..c7015c2c292 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 39660b17280..8915e58e9b0 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
diff --git a/icons/obj/stacks.dmi b/icons/obj/stacks.dmi
index 67a370b2197..b08f3b086aa 100644
Binary files a/icons/obj/stacks.dmi and b/icons/obj/stacks.dmi differ
diff --git a/icons/turf/flooring/carpet.dmi b/icons/turf/flooring/carpet.dmi
index a66db7af48b..f7dcf3c0463 100644
Binary files a/icons/turf/flooring/carpet.dmi and b/icons/turf/flooring/carpet.dmi differ