diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 077e4702e4..ea3923965d 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -27,7 +27,7 @@ * Text sanitization */ // Can be used almost the same way as normal input for text -/proc/clean_input(Message, Title, Default, mob/user=usr) +/proc/clean_input(Message, Title, Default, mob/user) var/txt = input(user, Message, Title, Default) as text | null if(txt) return html_encode(txt) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 9fd1e731d7..c9820e5915 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -345,7 +345,7 @@ Turf and target are seperate in case you want to teleport some distance from a t for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name. //newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) - newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) + newname = tgui_input_text(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname, MAX_NAME_LEN) 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. diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 165748c64b..dd29ca8bc8 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -97,7 +97,7 @@ options["LEGACY: transfer_controller"] = transfer_controller options["LEGACY: gas_data"] = gas_data - var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options // Leaving as input() due to debug tool + var/pick = tgui_input_list(mob, "Choose a controller to debug/view variables of.", "VV controller:", options) if(!pick) return var/datum/D = options[pick] diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 3b39e8450f..7d5534aaba 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -189,7 +189,7 @@ if(antag) antag.place_mob(src.current) else if (href_list["role_edit"]) - var/new_role = input("Select new role", "Assigned role", assigned_role) as null|anything in joblist + var/new_role = tgui_input_list(usr, "Select new role", "Assigned role", assigned_role, joblist) if (!new_role) return assigned_role = new_role diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 81b5bba11e..8d6c4c144b 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -447,7 +447,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if (!istype(user.loc,/turf)) to_chat(user, span_notice("You do not have enough space to write a proper rune.")) var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun") - r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking + r = tgui_input_list(user, "Choose a rune to scribe", "Rune Scribing", runes, timeout=30 SECONDS) var/obj/effect/rune/R = new /obj/effect/rune if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -460,7 +460,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") var/beacon if(user) - beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", words, timeout=30 SECONDS) R.word1=cultwords["travel"] R.word2=cultwords["self"] R.word3=beacon @@ -470,7 +470,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") var/beacon if(user) - beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", words, timeout=30 SECONDS) R.word1=cultwords["travel"] R.word2=cultwords["other"] R.word3=beacon diff --git a/code/game/gamemodes/technomancer/spells/chroma.dm b/code/game/gamemodes/technomancer/spells/chroma.dm index 9e51ef4e1e..a1d89ed253 100644 --- a/code/game/gamemodes/technomancer/spells/chroma.dm +++ b/code/game/gamemodes/technomancer/spells/chroma.dm @@ -36,7 +36,7 @@ qdel(src) /obj/item/spell/chroma/on_use_cast(mob/user) - var/new_color = input(user, "Choose the color you want your light to be.", "Color selection") as null|color + var/new_color = tgui_color_picker(user, "Choose the color you want your light to be.", "Color selection") if(new_color) color_to_use = new_color set_light(6, 5, l_color = new_color) diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index a980fd2325..d3d0112474 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -60,7 +60,7 @@ /datum/job/chaplain/proc/religion_prompts(mob/living/carbon/human/H, obj/item/storage/bible/B, obj/item/card/id/I) var/religion_name = "Unitarianism" - var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Unitarianism", "Name change", religion_name), MAX_NAME_LEN) + var/new_religion = sanitize(tgui_input_text(H, "You are the crew services officer. Would you like to change your religion? Default is Unitarianism", "Name change", religion_name, MAX_NAME_LEN)) if(!new_religion) new_religion = religion_name @@ -101,12 +101,12 @@ B.name = "The Holy Book of [new_religion]" var/deity_name = "Hashem" - var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Hashem", "Name change", deity_name), MAX_NAME_LEN) + var/new_deity = sanitize(tgui_input_text(H, "Would you like to change your deity? Default is Hashem", "Name change", deity_name, MAX_NAME_LEN)) if((length(new_deity) == 0) || (new_deity == "Hashem")) new_deity = deity_name - var/new_title = sanitize(input(H, "Would you like to change your title?", "Title Change", I.assignment), MAX_NAME_LEN) + var/new_title = sanitize(tgui_input_text(H, "Would you like to change your title?", "Title Change", I.assignment, MAX_NAME_LEN)) var/list/all_jobs = get_job_datums() diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index aedbb035f3..0563918e14 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -36,7 +36,7 @@ if(O.has_tool_quality(TOOL_WIRECUTTER)) if(cable && cable.get_amount()) - var/m = round(input(user, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1) + var/m = tgui_input_number(user, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) m = min(m, cable.get_amount()) m = min(m, 30) if(m) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 3f196e998d..4b79b5cd1d 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -361,7 +361,7 @@ /datum/data/function/proc/reset() return -/datum/data/function/proc/r_input(href, href_list, mob/user as mob) +/datum/data/function/proc/r_input(href, href_list, mob/user) return /datum/data/function/proc/display() diff --git a/code/game/machinery/petrification.dm b/code/game/machinery/petrification.dm index e7d8a9d51e..402a2e9cc3 100644 --- a/code/game/machinery/petrification.dm +++ b/code/game/machinery/petrification.dm @@ -202,7 +202,7 @@ if (!length(targets)) popup_msg(user, "No targets within range. Make sure there is a humanoid being within a 3x3 metre square in front of the interface.") return - var/selected = input(user, "Choose the target.", "Petrification Target") as null|anything in targets + var/selected = tgui_input_list(user, "Choose the target.", "Petrification Target", targets) if (selected && ishuman(targets[selected]) && is_valid_target(targets[selected])) var/confirmation = tgui_alert(targets[selected], "You have been selected as a petrification target. If you press confirm, you will possibly be turned into a statue, and if the option is selected, possibly one that cannot be reverted back from a statue at all.","Petrification Target",list("Confirm", "Cancel")) if (confirmation != "Confirm") diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index dbb8a3a01e..cc5b823360 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -217,7 +217,7 @@ switch(action) if("change_freq") . = TRUE - var/newfreq = input(ui.user, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num + var/newfreq = tgui_input_number(ui.user, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network, round_value=FALSE) if(canAccess(ui.user)) if(newfreq) if(findtext(num2text(newfreq), ".")) diff --git a/code/game/mecha/equipment/tools/cable_layer.dm b/code/game/mecha/equipment/tools/cable_layer.dm index 7439792c23..54516bb5ef 100644 --- a/code/game/mecha/equipment/tools/cable_layer.dm +++ b/code/game/mecha/equipment/tools/cable_layer.dm @@ -38,7 +38,7 @@ return if(href_list["cut"]) if(cable && cable.get_amount()) - var/m = round(input(chassis.occupant, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1) + var/m = tgui_input_number(chassis.occupant, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) m = min(m, cable.get_amount()) if(m) use_cable(m) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index da33428642..9495daeacb 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -60,12 +60,16 @@ colourName = "rainbow" uses = 0 -/obj/item/pen/crayon/rainbow/attack_self(mob/living/user as mob) - colour = input(user, "Please select the main colour.", "Crayon colour") as color - shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color +/obj/item/pen/crayon/rainbow/attack_self(mob/living/user) + var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Crayon colour", colour) + if(new_colour) + colour = new_colour + new_colour = tgui_color_picker(user, "Please select the shade colour.", "Crayon shade colour", shadeColour) + if(new_colour) + shadeColour = new_colour return -/obj/item/pen/crayon/afterattack(atom/target, mob/user as mob, proximity) +/obj/item/pen/crayon/afterattack(atom/target, mob/user, proximity) if(!proximity) return if(istype(target,/turf/simulated/floor)) var/drawtype = tgui_input_list(user, "Choose what you'd like to draw.", "Crayon scribbles", list("graffiti","rune","letter","arrow")) @@ -174,7 +178,7 @@ colourName = "mime" uses = 0 -/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user as mob) //inversion +/obj/item/pen/crayon/marker/mime/attack_self(mob/living/user) //inversion if(colour != "#FFFFFF" && shadeColour != "#000000") colour = "#FFFFFF" shadeColour = "#000000" @@ -192,12 +196,16 @@ colourName = "rainbow" uses = 0 -/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user as mob) - colour = input(user, "Please select the main colour.", "Marker colour") as color - shadeColour = input(user, "Please select the shade colour.", "Marker colour") as color +/obj/item/pen/crayon/marker/rainbow/attack_self(mob/living/user) + var/new_colour = tgui_color_picker(user, "Please select the main colour.", "Marker colour", colour) + if(new_colour) + colour = new_colour + new_colour = tgui_color_picker(user, "Please select the shade colour.", "Marker colour", shadeColour) + if(new_colour) + shadeColour = new_colour return -/obj/item/pen/crayon/marker/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/pen/crayon/marker/attack(mob/living/M, mob/living/user) if(M == user) to_chat(user, "You take a bite of the marker and swallow it.") user.nutrition += 1 diff --git a/code/game/objects/items/devices/text_to_speech.dm b/code/game/objects/items/devices/text_to_speech.dm index 572ee939a7..38fa0aefb4 100644 --- a/code/game/objects/items/devices/text_to_speech.dm +++ b/code/game/objects/items/devices/text_to_speech.dm @@ -17,7 +17,9 @@ desc = "[initial(desc)] This one is assigned to [user.real_name]." named = 1 /* //Another way of naming the device. Gives more freedom, but could lead to issues. - device_name = copytext(sanitize(input(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "") as null|text),1,MAX_NAME_LEN) + device_name = sanitize(tgui_input_text(user, "What would you like to name your device? You must input a name before the device can be used.", "Name your device", "", MAX_NAME_LEN)) + if(!device_name) + return name = "[initial(name)] - [device_name]" named = 1 */ diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 8fd2723c55..ee9170953a 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -105,7 +105,7 @@ var/choice = tgui_alert(user, "Adjusting the base color of this canvas will replace ALL pixels with the selected color. Are you sure?", "Confirm Color Fill", list("Yes", "No")) if(choice != "Yes") return - var/basecolor = input(user, "Select a base color for the canvas:", "Base Color", canvas_color) as null|color + var/basecolor = tgui_color_picker(user, "Select a base color for the canvas:", "Base Color", canvas_color) if(basecolor && Adjacent(user) && user.get_active_hand() == I) canvas_color = basecolor reset_grid() @@ -214,7 +214,7 @@ return canvas_color /obj/item/canvas/proc/try_rename(mob/user) - var/new_name = stripped_input(user,"What do you want to name the painting?", max_length = 250) + var/new_name = tgui_input_text(user,"What do you want to name the painting?", max_length = 250, encode=TRUE) if(new_name != painting_name && new_name && CanUseTopic(user, GLOB.tgui_physical_state)) painting_name = new_name SStgui.update_uis(src) @@ -305,7 +305,7 @@ /obj/item/paint_palette/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/paint_brush)) var/obj/item/paint_brush/P = W - var/newcolor = input(user, "Select a new paint color:", "Paint Palette", P.selected_color) as null|color + var/newcolor = tgui_color_picker(user, "Select a new paint color:", "Paint Palette", P.selected_color) if(newcolor && Adjacent(user, P) && Adjacent(user, src)) P.update_paint(newcolor) else diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 16599ababc..977906fd85 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -614,7 +614,7 @@ // Otherwise fall back to asking them... and remind them what the current ID is. if(id) to_chat(user, "The window's current ID is [id].") - var/t = sanitizeSafe(input(user, "Enter the new ID for the window.", src.name, null), MAX_NAME_LEN) + var/t = sanitizeSafe(tgui_input_text(user, "Enter the new ID for the window.", src.name, id), MAX_NAME_LEN) if(t && in_range(src, user)) src.id = t to_chat(user, span_notice("The new ID of \the [src] is '[id]'.")) diff --git a/code/modules/admin/admin_verbs_vr.dm b/code/modules/admin/admin_verbs_vr.dm index 149eed75a5..7dceed71f7 100644 --- a/code/modules/admin/admin_verbs_vr.dm +++ b/code/modules/admin/admin_verbs_vr.dm @@ -26,10 +26,10 @@ if(isobj(T)) possible_things |= T if(!center) - center = input(usr, "What should act as the center of the orbit?", "Center") as anything in possible_things + center = tgui_input_list(src, "What should act as the center of the orbit?", "Center", possible_things) possible_things -= center if(!orbiter) - orbiter = input(usr, "What should act as the orbiter of the orbit?", "Orbiter") as anything in possible_things + orbiter = tgui_input_list(src, "What should act as the orbiter of the orbit?", "Orbiter", possible_things) if(!center || !orbiter) to_chat(usr, span_warning("A center of orbit and an orbiter must be configured. You can also do this by marking a target.")) return diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index f1bb2833fb..a7be3c50c5 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -171,7 +171,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) //var/list/named_args = list() //Named arguments are removed, due to them making proccalling take too long. while(argnum--) /* //Named arguments are removed, due to them making proccalling take too long. - var/named_arg = input(usr,"Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null + var/named_arg = tgui_input_text(usr,"Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") if(isnull(named_arg)) return null //Cancel */ diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 2ec08a92a6..0c0bc4b9fc 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -324,7 +324,7 @@ if(input) new_light_intensity = input if("Color") - var/input = input(usr, "New light color.","Light Maker",3) as null|color + var/input = tgui_color_picker(usr, "New light color.","Light Maker",new_light_color) if(input) new_light_color = input if(BUILDMODE_DROP) diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm index 8210e3fb12..29834f079d 100644 --- a/code/modules/admin/verbs/change_appearance.dm +++ b/code/modules/admin/verbs/change_appearance.dm @@ -48,26 +48,26 @@ return if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes") return - var/new_facial = input(usr, "Please select facial hair color.", "Character Generation") as color + var/new_facial = tgui_color_picker(usr, "Please select facial hair color.", "Character Generation") if(new_facial) M.r_facial = hex2num(copytext(new_facial, 2, 4)) M.g_facial = hex2num(copytext(new_facial, 4, 6)) M.b_facial = hex2num(copytext(new_facial, 6, 8)) - var/new_hair = input(usr, "Please select hair color.", "Character Generation") as color + var/new_hair = tgui_color_picker(usr, "Please select hair color.", "Character Generation") if(new_facial) M.r_hair = hex2num(copytext(new_hair, 2, 4)) M.g_hair = hex2num(copytext(new_hair, 4, 6)) M.b_hair = hex2num(copytext(new_hair, 6, 8)) - var/new_eyes = input(usr, "Please select eye color.", "Character Generation") as color + var/new_eyes = tgui_color_picker(usr, "Please select eye color.", "Character Generation") if(new_eyes) M.r_eyes = hex2num(copytext(new_eyes, 2, 4)) M.g_eyes = hex2num(copytext(new_eyes, 4, 6)) M.b_eyes = hex2num(copytext(new_eyes, 6, 8)) M.update_eyes() - var/new_skin = input(usr, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color + var/new_skin = tgui_color_picker(usr, "Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") if(new_skin) M.r_skin = hex2num(copytext(new_skin, 2, 4)) M.g_skin = hex2num(copytext(new_skin, 4, 6)) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0ffbf44ca2..e721f66c37 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -813,11 +813,11 @@ Traitors and the like can also be revived with the previous role mostly intact. switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No"))) if("Yes") - var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num + var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440) as num if(!mins) return if(mins >= 525600) mins = 525599 - var/reason = input(usr,"Reason?","reason","Griefer") as text + var/reason = tgui_input_text(usr,"Reason?","reason","Griefer") if(!reason) return if(M) @@ -833,7 +833,7 @@ Traitors and the like can also be revived with the previous role mostly intact. else if("No") - var/reason = input(usr,"Reason?","reason","Griefer") as text + var/reason = tgui_input_text(usr,"Reason?","reason","Griefer") if(!reason) return AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0) diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index a22bfdf028..336c280b85 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -383,7 +383,7 @@ if(user.incapacitated()) return if(ishuman(user) || isrobot(user)) - switch(input(user,"Choose what to do","Wheel Of Fortune") in list("Spin the Wheel! (Not Lottery)", "Set the interval", "Cancel")) + switch(tgui_input_list(user,"Choose what to do","Wheel Of Fortune", list("Spin the Wheel! (Not Lottery)", "Set the interval", "Cancel"))) if("Cancel") return if("Spin the Wheel! (Not Lottery)") @@ -412,7 +412,7 @@ else to_chat(user, span_warning("Proper access, allowed staff controls.")) if(ishuman(user) || isrobot(user)) - switch(input(user,"Choose what to do (Management)","Wheel Of Fortune (Management)") in list("Spin the Lottery Wheel!", "Toggle Lottery Sales", "Toggle Public Spins", "Reset Lottery", "Cancel")) + switch(tgui_input_list(user,"Choose what to do (Management)","Wheel Of Fortune (Management)", list("Spin the Lottery Wheel!", "Toggle Lottery Sales", "Toggle Public Spins", "Reset Lottery", "Cancel"))) if("Cancel") return if("Spin the Lottery Wheel!") @@ -560,7 +560,7 @@ return if(ishuman(user) || isrobot(user)) - switch(input(user,"Choose what to do","SPASM") in list("Show selected Prize", "Select Prize", "Become Prize (Please examine yourself first)", "Cancel")) + switch(tgui_input_list(user,"Choose what to do","SPASM", list("Show selected Prize", "Select Prize", "Become Prize (Please examine yourself first)", "Cancel"))) if("Cancel") return if("Show selected Prize") @@ -667,7 +667,7 @@ else to_chat(user, span_warning("Proper access, allowed staff controls.")) if(ishuman(user) || isrobot(user)) - switch(input(user,"Choose what to do (Management)","SPASM (Management)") in list("Toggle Sentient Prize Sales", "Wipe Selected Prize Entry", "Change Prize Value", "Cancel")) + switch(tgui_input_list(user,"Choose what to do (Management)","SPASM (Management)", list("Toggle Sentient Prize Sales", "Wipe Selected Prize Entry", "Change Prize Value", "Cancel"))) if("Cancel") return diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index f91e53592d..122b58f95d 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -367,7 +367,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ return TOPIC_REFRESH_UPDATE_PREVIEW else if(href_list["blood_color"]) - var/color_choice = input(user, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color + var/color_choice = tgui_color_picker(user, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) if(color_choice) pref.blood_color = sanitize_hexcolor(color_choice, default="#A10808") return TOPIC_REFRESH diff --git a/code/modules/clothing/accessories/hands.dm b/code/modules/clothing/accessories/hands.dm index 085df20126..29ef92b761 100644 --- a/code/modules/clothing/accessories/hands.dm +++ b/code/modules/clothing/accessories/hands.dm @@ -41,7 +41,7 @@ if(!M.mind) return 0 - var/input = sanitizeSafe(input(M, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M, "Who do you want to dedicate the bracelet to?","Friendship Bracelet" ,"", MAX_NAME_LEN), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) desc = "A beautiful friendship bracelet in all the colors of the rainbow. It's dedicated to [input]." diff --git a/code/modules/clothing/accessories/rings.dm b/code/modules/clothing/accessories/rings.dm index 828402da13..9cdba62cf6 100644 --- a/code/modules/clothing/accessories/rings.dm +++ b/code/modules/clothing/accessories/rings.dm @@ -119,7 +119,10 @@ var/partnername = "" /obj/item/clothing/accessory/ring/wedding/attack_self(mob/user) - partnername = copytext(sanitize(input(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae") as null|text),1,MAX_NAME_LEN) + var/input = tgui_input_text(user, "Would you like to change the holoengraving on the ring?", "Name your spouse", "Bae", MAX_NAME_LEN) + if(!input) + return + partnername = sanitize(input) name = "[initial(name)] - [partnername]" /obj/item/clothing/accessory/ring/wedding/silver diff --git a/code/modules/clothing/head/pilot_helmet.dm b/code/modules/clothing/head/pilot_helmet.dm index 90b17a89ab..79f20e04a8 100644 --- a/code/modules/clothing/head/pilot_helmet.dm +++ b/code/modules/clothing/head/pilot_helmet.dm @@ -159,7 +159,7 @@ set category = "Object" set src in usr - var/newcolor = input(usr,"Pick a color!","HUD Color") as null|color + var/newcolor = tgui_color_picker(usr,"Pick a color!","HUD Color") if(newcolor) for(var/img in list("top_words","left_bar","right_bar","flyboxes")) var/image/I = images[img] diff --git a/code/modules/clothing/spacesuits/rig/modules/protean.dm b/code/modules/clothing/spacesuits/rig/modules/protean.dm index 85b45e0c46..f6a31c4774 100644 --- a/code/modules/clothing/spacesuits/rig/modules/protean.dm +++ b/code/modules/clothing/spacesuits/rig/modules/protean.dm @@ -73,7 +73,7 @@ These should come standard with the Protean rigsuit, unless you want them to wor var/armor_weight_ratio = 0.01 //This amount of slowdown per 1% of armour. 3 slowdown at the max armour. /obj/item/rig_module/protean/armor/engage() - var/armor_chosen = input(usr, "Which armor to adjust?", "Protean Armor") as null|anything in armor_settings + var/armor_chosen = tgui_input_list(usr, "Which armor to adjust?", "Protean Armor", armor_settings) if(armor_chosen) var/armorvalue = tgui_input_number(usr, "Set armour reduction value (Max of 60%)", "Protean Armor",0,60) if(isnum(armorvalue)) diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm b/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm index 5f32f15c41..aeea41514a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/voice.dm @@ -44,7 +44,7 @@ voice_holder.active = 0 to_chat(usr, span_blue("You disable the speech synthesiser.")) if("Set Name") - var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(usr, "Please enter a new name.", voice_holder.voice, MAX_NAME_LEN)) if(!raw_choice) return 0 voice_holder.voice = raw_choice diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index 2bf7344c97..0183ce2e0e 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -336,7 +336,7 @@ voice_holder.active = 0 to_chat(usr, span_blue("You disable the speech synthesiser.")) if("Set Name") - var/raw_choice = sanitize(input(usr, "Please enter a new name.") as text|null, MAX_NAME_LEN) + var/raw_choice = sanitize(tgui_input_text(usr, "Please enter a new name.", max_length=MAX_NAME_LEN)) if(!raw_choice) return 0 voice_holder.voice = raw_choice diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 2f32c0182a..4101cd4f17 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -158,9 +158,9 @@ else to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Incorrect code entered.")) if("change_id") - var/attempt_code = text2num(input(usr, "Re-enter the current EFTPOS access code", "Confirm EFTPOS code")) + var/attempt_code = tgui_input_number(usr, "Re-enter the current EFTPOS access code", "Confirm EFTPOS code") if(attempt_code == access_code) - eftpos_name = sanitize(input(usr, "Enter a new terminal ID for this device", "Enter new EFTPOS ID"), MAX_NAME_LEN) + " EFTPOS scanner" + eftpos_name = sanitize(tgui_input_text(usr, "Enter a new terminal ID for this device", "Enter new EFTPOS ID",max_length=MAX_NAME_LEN), MAX_NAME_LEN) + " EFTPOS scanner" print_reference() else to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Incorrect code entered.")) @@ -175,8 +175,9 @@ else to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Account not found.")) if("trans_purpose") - var/choice = sanitize(input(usr, "Enter reason for EFTPOS transaction", "Transaction purpose")) - if(choice) transaction_purpose = choice + var/choice = sanitize(tgui_input_text(usr, "Enter reason for EFTPOS transaction", "Transaction purpose")) + if(choice) + transaction_purpose = choice if("trans_value") var/try_num = tgui_input_number(usr, "Enter amount for EFTPOS transaction", "Transaction amount") if(try_num < 0) diff --git a/code/modules/food/food.dm b/code/modules/food/food.dm index a4ad8d9930..ea56a5922c 100644 --- a/code/modules/food/food.dm +++ b/code/modules/food/food.dm @@ -26,7 +26,7 @@ if(user.stat == DEAD || !(ishuman(user) || isrobot(user))) to_chat(user, span_warning("You can't cook!")) return - var/n_name = sanitizeSafe(input(user, "What would you like to name \the [src]? Leave blank to reset.", "Food Naming", null) as text, MAX_NAME_LEN) + var/n_name = sanitizeSafe(tgui_input_text(user, "What would you like to name \the [src]? Leave blank to reset.", "Food Naming", initial(name), MAX_NAME_LEN)) if(!n_name) n_name = initial(name) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index b3f1b5a82c..cfc1200d5f 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -3982,7 +3982,7 @@ if( src.open ) return - var/t = sanitize(input(user, "Enter what you want to add to the tag:", "Write", null, null) as text, 30) + var/t = sanitize(tgui_input_text(user, "Enter what you want to add to the tag:", "Write", "", 30)) var/obj/item/pizzabox/boxtotagto = src if( boxes.len > 0 ) diff --git a/code/modules/games/dice.dm b/code/modules/games/dice.dm index fddae8306f..017295511c 100644 --- a/code/modules/games/dice.dm +++ b/code/modules/games/dice.dm @@ -22,7 +22,7 @@ else if(tamper_proof) to_chat(user, span_warning("This [name] is proofed against tampering!")) else - var/to_weight = input("What should the [name] be weighted towards? You can't undo this later, only change the number!","Set the desired result") as null|num + var/to_weight = tgui_input_number(user, "What should the [name] be weighted towards? You can't undo this later, only change the number!","Set the desired result", 1, 6, 1) if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides)) //You must input a number higher than 0 and no greater than the number of sides return 0 else @@ -34,7 +34,7 @@ ..() if(cheater) if(!loaded) - var/to_weight = input("What should the [name] be weighted towards?","Set the desired result") as null|num + var/to_weight = tgui_input_number(user, "What should the [name] be weighted towards?","Set the desired result", 1, 6, 1) if(isnull(to_weight) || (to_weight < 1) || (to_weight > sides) ) //You must input a number higher than 0 and no greater than the number of sides return 0 else diff --git a/code/modules/instruments/songs/editor.dm b/code/modules/instruments/songs/editor.dm index 695cd8bfee..7280365573 100644 --- a/code/modules/instruments/songs/editor.dm +++ b/code/modules/instruments/songs/editor.dm @@ -180,7 +180,7 @@ else if(href_list["modifyline"]) var/num = round(text2num(href_list["modifyline"]),1) - var/content = stripped_input(usr, "Enter your line: ", parent.name, lines[num], MUSIC_MAXLINECHARS) + var/content = tgui_input_text(usr, "Enter your line: ", parent.name, lines[num], MUSIC_MAXLINECHARS, encode=TRUE) if(!content || !in_range(parent, usr)) return if(num > lines.len || num < 1) diff --git a/code/modules/integrated_electronics/core/special_pins/color_pin.dm b/code/modules/integrated_electronics/core/special_pins/color_pin.dm index 628999b001..b254bd4b37 100644 --- a/code/modules/integrated_electronics/core/special_pins/color_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/color_pin.dm @@ -3,7 +3,7 @@ name = "color pin" /datum/integrated_io/color/ask_for_pin_data(mob/user) - var/new_data = input(user, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color + var/new_data = tgui_color_picker(user, "Please select a color.","[src] color writing", data ? data : "#000000") if(holder.check_interactivity(user) ) to_chat(user, span_notice("You input a new color into the pin.")) write_data_to_pin(new_data) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index f455d50ead..1fb58f96ee 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -242,7 +242,7 @@ Book Cart End src.name = newtitle src.title = newtitle if("Contents") - var/content = sanitize(input(user, "Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN) + var/content = sanitize(tgui_input_text(user, "Write your book's contents (HTML NOT allowed):", max_length=MAX_BOOK_MESSAGE_LEN, multiline=TRUE), MAX_BOOK_MESSAGE_LEN) if(!content) to_chat(user, "The content is invalid.") return diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index 73ac2aa9d3..0717fb639a 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -62,7 +62,7 @@ if(QDELETED(src.media) || !istype(src.media)) to_chat(user, span_warning("You have no media datum to change, if you're not in the lobby tell an admin.")) return - var/value = input(user, "Choose your Jukebox volume.", "Jukebox volume", media.volume) + var/value = tgui_input_number(user, "Choose your Jukebox volume.", "Jukebox volume", media.volume, 100, 0) value = round(max(0, min(100, value))) media.update_volume(value) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7243432053..3884977791 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -880,19 +880,19 @@ remove_verb(src, /mob/living/carbon/human/proc/morph) return - var/new_facial = input(src, "Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color + var/new_facial = tgui_color_picker(src, "Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) if(new_facial) r_facial = hex2num(copytext(new_facial, 2, 4)) g_facial = hex2num(copytext(new_facial, 4, 6)) b_facial = hex2num(copytext(new_facial, 6, 8)) - var/new_hair = input(src, "Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color + var/new_hair = tgui_color_picker(src, "Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) if(new_facial) r_hair = hex2num(copytext(new_hair, 2, 4)) g_hair = hex2num(copytext(new_hair, 4, 6)) b_hair = hex2num(copytext(new_hair, 6, 8)) - var/new_eyes = input(src, "Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color + var/new_eyes = tgui_color_picker(src, "Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) if(new_eyes) r_eyes = hex2num(copytext(new_eyes, 2, 4)) g_eyes = hex2num(copytext(new_eyes, 4, 6)) @@ -1078,7 +1078,7 @@ set name = "sim" set background = 1 - var/damage = input(src, "Wound damage","Wound damage") as num + var/damage = tgui_input_number(src, "Wound damage","Wound damage") var/germs = 0 var/tdamage = 0 diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm index e0b87525b1..d7eb5257c6 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm @@ -73,7 +73,7 @@ last_special = world.time + 50 - var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color + var/new_skin = tgui_color_picker(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) if(!new_skin) return lleill_set_colour(new_skin) diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index ae7b7297c8..69ff16c26b 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -179,7 +179,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color + var/new_skin = tgui_color_picker(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) if(!new_skin) return shapeshifter_set_colour(new_skin) @@ -217,15 +217,15 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/new_hair = input(src, "Please select a new hair color.", "Hair Colour") as color + var/new_hair = tgui_color_picker(src, "Please select a new hair color.", "Hair Colour") if(!new_hair) return shapeshifter_set_hair_color(new_hair) - var/new_grad = input(src, "Please select a new hair gradient color.", "Hair Gradient Colour") as color + var/new_grad = tgui_color_picker(src, "Please select a new hair gradient color.", "Hair Gradient Colour") if(!new_grad) return shapeshifter_set_grad_color(new_grad) - var/new_fhair = input(src, "Please select a new facial hair color.", "Facial Hair Color") as color + var/new_fhair = tgui_color_picker(src, "Please select a new facial hair color.", "Facial Hair Color") if(!new_fhair) return shapeshifter_set_facial_color(new_fhair) @@ -317,7 +317,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 var/current_color = rgb(r_eyes,g_eyes,b_eyes) - var/new_eyes = input(src, "Pick a new color for your eyes.","Eye Color", current_color) as null|color + var/new_eyes = tgui_color_picker(src, "Pick a new color for your eyes.","Eye Color", current_color) if(!new_eyes) return diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm index bd1ece1752..9c55b9769e 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm @@ -28,7 +28,7 @@ //Allow color picks var/current_pri_color = rgb(r_ears,g_ears,b_ears) - var/new_pri_color = input(src, "Pick primary ear color:","Ear Color (Pri)", current_pri_color) as null|color + var/new_pri_color = tgui_color_picker(src, "Pick primary ear color:","Ear Color (Pri)", current_pri_color) if(new_pri_color) var/list/new_color_rgb_list = hex2rgb(new_pri_color) r_ears = new_color_rgb_list[1] @@ -38,7 +38,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_ears2,g_ears2,b_ears2) - var/new_sec_color = input(src, "Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) as null|color + var/new_sec_color = tgui_color_picker(src, "Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_ears2 = new_color_rgb_list[1] @@ -47,7 +47,7 @@ var/current_ter_color = rgb(r_ears3,g_ears3,b_ears3) - var/new_ter_color = input(src, "Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) as null|color + var/new_ter_color = tgui_color_picker(src, "Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) if(new_ter_color) new_color_rgb_list = hex2rgb(new_sec_color) r_ears3 = new_color_rgb_list[1] @@ -114,7 +114,7 @@ //Allow color picks var/current_pri_color = rgb(r_tail,g_tail,b_tail) - var/new_pri_color = input(src, "Pick primary tail color:","Tail Color (Pri)", current_pri_color) as null|color + var/new_pri_color = tgui_color_picker(src, "Pick primary tail color:","Tail Color (Pri)", current_pri_color) if(new_pri_color) var/list/new_color_rgb_list = hex2rgb(new_pri_color) r_tail = new_color_rgb_list[1] @@ -124,7 +124,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_tail2,g_tail2,b_tail2) - var/new_sec_color = input(src, "Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) as null|color + var/new_sec_color = tgui_color_picker(src, "Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_tail2 = new_color_rgb_list[1] @@ -133,7 +133,7 @@ var/current_ter_color = rgb(r_tail3,g_tail3,b_tail3) - var/new_ter_color = input(src, "Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) as null|color + var/new_ter_color = tgui_color_picker(src, "Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) if(new_ter_color) new_color_rgb_list = hex2rgb(new_ter_color) r_tail3 = new_color_rgb_list[1] @@ -168,7 +168,7 @@ //Allow color picks var/current_color = rgb(r_wing,g_wing,b_wing) - var/new_color = input(src, "Pick wing color:","Wing Color", current_color) as null|color + var/new_color = tgui_color_picker(src, "Pick wing color:","Wing Color", current_color) if(new_color) var/list/new_color_rgb_list = hex2rgb(new_color) r_wing = new_color_rgb_list[1] @@ -178,7 +178,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_wing2,g_wing2,b_wing2) - var/new_sec_color = input(src, "Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color + var/new_sec_color = tgui_color_picker(src, "Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_wing2 = new_color_rgb_list[1] @@ -187,7 +187,7 @@ var/current_ter_color = rgb(r_wing3,g_wing3,b_wing3) - var/new_ter_color = input(src, "Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) as null|color + var/new_ter_color = tgui_color_picker(src, "Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) if(new_ter_color) new_color_rgb_list = hex2rgb(new_ter_color) r_wing3 = new_color_rgb_list[1] diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index ad51161bc9..5624efc148 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -309,7 +309,7 @@ last_special = world.time + 25 - var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", color) as null|color + var/new_skin = tgui_color_picker(src, "Please select a new body color.", "Shapeshifter Colour", color) if(!new_skin) return color = new_skin 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 65179e9fb1..f142029928 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 @@ -457,7 +457,7 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick underbelly color:","Underbelly Color", S.dragon_overlays[1]) as null|color + var/new_color = tgui_color_picker(protie, "Pick underbelly color:","Underbelly Color", S.dragon_overlays[1]) if(!new_color) return 0 S.dragon_overlays[1] = choice @@ -470,7 +470,7 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick body color:","Body Color", S.dragon_overlays[2]) as null|color + var/new_color = tgui_color_picker(protie, "Pick body color:","Body Color", S.dragon_overlays[2]) if(!new_color) return 0 S.dragon_overlays[2] = choice @@ -483,7 +483,7 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick ear color:","Ear Color", S.dragon_overlays[3]) as null|color + var/new_color = tgui_color_picker(protie, "Pick ear color:","Ear Color", S.dragon_overlays[3]) if(!new_color) return 0 S.dragon_overlays[3] = choice @@ -496,7 +496,7 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick mane color:","Mane Color", S.dragon_overlays[4]) as null|color + var/new_color = tgui_color_picker(protie, "Pick mane color:","Mane Color", S.dragon_overlays[4]) if(!new_color) return 0 S.dragon_overlays[4] = choice @@ -509,7 +509,7 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick horn color:","Horn Color", S.dragon_overlays[5]) as null|color + var/new_color = tgui_color_picker(protie, "Pick horn color:","Horn Color", S.dragon_overlays[5]) if(!new_color) return 0 S.dragon_overlays[5] = choice @@ -522,19 +522,19 @@ choice = show_radial_menu(protie, protie, options, radius = 90) if(!choice || QDELETED(protie) || protie.incapacitated()) return 0 - var/new_color = input("Pick eye color:","Eye Color", S.dragon_overlays[6]) as null|color + var/new_color = tgui_color_picker(protie, "Pick eye color:","Eye Color", S.dragon_overlays[6]) if(!new_color) return 0 S.dragon_overlays[6] = choice S.dragon_overlays[S.dragon_overlays[6]] = new_color S.blob_appearance = "dragon" if("Primary") - var/new_color = input("Pick primary color:","Protean Primary", "#FF0000") as null|color + var/new_color = tgui_color_picker(protie, "Pick primary color:","Protean Primary", "#FF0000") if(!new_color) return S.blob_color_1 = new_color if("Highlight") - var/new_color = input("Pick highlight color:","Protean Highlight", "#FF0000") as null|color + var/new_color = tgui_color_picker(protie, "Pick highlight color:","Protean Highlight", "#FF0000") if(!new_color) return S.blob_color_2 = new_color diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index 485b16b95c..7288710e4a 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -1112,7 +1112,7 @@ to_chat(src, span_warning("You are not a weaver! How are you doing this? Tell a developer!")) return - var/new_silk_color = input(src, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color + var/new_silk_color = tgui_color_picker(src, "Pick a color for your woven products:","Silk Color", species.silk_color) if(new_silk_color) species.silk_color = new_silk_color diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index c33f119eb2..b9cfd7f586 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -151,7 +151,7 @@ qdel(M) - var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN) + var/newname = sanitize(tgui_input_text(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime", MAX_NAME_LEN)) if (!newname) newname = "pet slime" @@ -203,7 +203,7 @@ pet.colour = "[M.colour]" to_chat(user, "You feed the slime the potion, removing it's powers and calming it.") qdel(M) - var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN) + var/newname = sanitize(tgui_input_text(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime", MAX_NAME_LEN)) if (!newname) newname = "pet slime" diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm index 836e4b7041..f2a693660d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/animal.dm @@ -34,7 +34,7 @@ set category = "IC.Settings" set desc = "Set your flavour text." set src = usr - var/new_flavour_text = sanitize((input("Please describe yourself.", "Flavour Text", flavor_text) as message|null), MAX_MESSAGE_LEN) + var/new_flavour_text = sanitize((tgui_input_text(src, "Please describe yourself.", "Flavour Text", flavor_text, MAX_MESSAGE_LEN, TRUE))) if(length(new_flavour_text) && !QDELETED(src)) flavor_text = new_flavour_text to_chat(src, span_notice("Your flavour text has been updated.")) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm b/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm index c638283a6d..10058076a8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm @@ -426,7 +426,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick underbelly color:","Underbelly Color", overlay_colors["Underbelly"]) as null|color + var/new_color = tgui_color_picker(src, "Pick underbelly color:","Underbelly Color", overlay_colors["Underbelly"]) if(!new_color) return 0 under = choice @@ -439,7 +439,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick body color:","Body Color", overlay_colors["Body"]) as null|color + var/new_color = tgui_color_picker(src, "Pick body color:","Body Color", overlay_colors["Body"]) if(!new_color) return 0 body = choice @@ -452,7 +452,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick ear color:","Ear Color", overlay_colors["Ears"]) as null|color + var/new_color = tgui_color_picker(src, "Pick ear color:","Ear Color", overlay_colors["Ears"]) if(!new_color) return 0 ears = choice @@ -465,7 +465,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick mane color:","Mane Color", overlay_colors["Mane"]) as null|color + var/new_color = tgui_color_picker(src, "Pick mane color:","Mane Color", overlay_colors["Mane"]) if(!new_color) return 0 mane = choice @@ -478,7 +478,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick horn color:","Horn Color", overlay_colors["Horns"]) as null|color + var/new_color = tgui_color_picker(src, "Pick horn color:","Horn Color", overlay_colors["Horns"]) if(!new_color) return 0 horns = choice @@ -491,7 +491,7 @@ I think I covered everything. choice = show_radial_menu(src, src, options, radius = 90) if(!choice || QDELETED(src) || src.incapacitated()) return 0 - var/new_color = input("Pick eye color:","Eye Color", overlay_colors["Eyes"]) as null|color + var/new_color = tgui_color_picker(src, "Pick eye color:","Eye Color", overlay_colors["Eyes"]) if(!new_color) return 0 eyes = choice diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm index d3b0feb67f..b1a6578f03 100644 --- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm +++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm @@ -101,7 +101,7 @@ if("PRG_savelog") if(!channel) return - var/logname = stripped_input(params["log_name"]) + var/logname = sanitize(params["log_name"]) if(!logname) return var/datum/computer_file/data/logfile = new /datum/computer_file/data/logfile() diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index efabcfdfb4..47441d3d89 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -37,7 +37,7 @@ set src in usr var/current_color = rgb(eye_colour[1],eye_colour[2],eye_colour[3]) - var/new_color = input(src, "Pick a new color for your eyes.","Eye Color", current_color) as null|color + var/new_color = tgui_color_picker(src, "Pick a new color for your eyes.","Eye Color", current_color) if(new_color && owner) // input() supplies us with a hex color, which we can't use, so we convert it to rbg values. var/list/new_color_rgb_list = hex2rgb(new_color) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index eadc6db4a2..e9c1ebd2ac 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -425,7 +425,7 @@ if(href_list["write"]) var/id = href_list["write"] - //var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message + //var/t = strip_html_simple(tgui_input_text(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null, multiline=TRUE),8192) if(free_space <= 0) to_chat(usr, span_info("There isn't enough space left on \the [src] to write anything.")) diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index cb62b84472..5fe97ac69c 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -23,9 +23,9 @@ if("alert") post_status("alert", params["alert"]) if("setmsg1") - message1 = clean_input("Line 1", "Enter Message Text", message1) + message1 = tgui_input_text(ui.user,"Line 1", "Enter Message Text", message1, encode=TRUE) if("setmsg2") - message2 = clean_input("Line 2", "Enter Message Text", message2) + message2 = tgui_input_text(ui.user, "Line 2", "Enter Message Text", message2, encode=TRUE) else post_status(params["statdisp"]) return TRUE diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm index eff9634137..ffd9c479b2 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm @@ -90,7 +90,7 @@ return if(href_list["modifypower"]) - var/new_val = input(usr, "Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num + var/new_val = tgui_input_number(usr, "Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy, 50, 1) if(!new_val) to_chat(usr, span_warning("That's not a valid number.")) return 1 @@ -100,7 +100,7 @@ return 1 if(href_list["modifyrate"]) - var/new_val = input(usr, "Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num + var/new_val = tgui_input_number(usr, "Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate, 10, 1) if(!new_val) to_chat(usr, span_warning("That's not a valid number.")) return 1 diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 7f3fbb25b0..f9f484a81f 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -152,7 +152,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input("What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M,"What do you want to name the gun?","Rename Gun" ,"",MAX_NAME_LEN)) if(src && input && !M.stat && in_range(M,src)) name = input @@ -173,7 +173,7 @@ options["Lawson Arms LTX1020 (Stainless)"] = "stainstunrevolver" options["Lawson Arms LTX1020 (Ace)"] = "snubstunrevolver" options["Lawson Arms LTX1020 (Gold)"] = "goldstunrevolver" - var/choice = input(M,"Choose your sprite!","Resprite Gun") in options + var/choice = tgui_input_list(M,"Choose your sprite!","Resprite Gun", options) if(src && choice && !M.stat && in_range(M,src)) icon_state = options[choice] unique_reskin = options[choice] diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 9d45202ffd..28dc04f659 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -44,7 +44,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M, "What do you want to name the gun?","Rename Gun" ,"",MAX_NAME_LEN)) if(src && input && !M.stat && in_range(M,src)) name = input diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index e5797318c1..ffaa9150d8 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -67,7 +67,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M, "What do you want to name the gun?","Rename Revolver" ,"",MAX_NAME_LEN)) if(src && input && !M.stat && in_range(M,src)) name = input @@ -95,7 +95,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M, "What do you want to name the gun?","Rename Revolver" ,"", MAX_NAME_LEN), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) name = input diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 16b401b454..0a018ebf1d 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -138,7 +138,7 @@ set category = "Object" set desc = "Rename your gun." - var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the gun?","Rename Shotgun" ,"",MAX_NAME_LEN)) var/mob/M = usr if(src && input && !M.stat && in_range(M,src)) diff --git a/code/modules/spells/general/rune_write.dm b/code/modules/spells/general/rune_write.dm index 71f9ca8c46..6f09c9ed2e 100644 --- a/code/modules/spells/general/rune_write.dm +++ b/code/modules/spells/general/rune_write.dm @@ -20,7 +20,7 @@ if(!cultwords["travel"]) runerandom() var/list/runes = list("Teleport", "Teleport Other", "Spawn a Tome", "Change Construct Type", "Convert", "EMP", "Drain Blood", "See Invisible", "Resurrect", "Hide Runes", "Reveal Runes", "Astral Journey", "Manifest a Ghost", "Imbue Talisman", "Sacrifice", "Wall", "Free Cultist", "Summon Cultist", "Deafen", "Blind", "BloodBoil", "Communicate", "Stun") - var/r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes //not cancellable. + var/r = tgui_input_list(user, "Choose a rune to scribe", "Rune Scribing", runes, timeout=30 SECONDS) var/obj/effect/rune/R = new /obj/effect/rune(user.loc) if(istype(user.loc,/turf)) var/area/A = get_area(user) @@ -30,7 +30,7 @@ if(cast_check(1)) var/beacon if(user) - beacon = input(user, "Select the last rune", "Rune Scribing") in rnwords + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", rnwords, timeout=30 SECONDS) R.word1=cultwords["travel"] R.word2=cultwords["self"] R.word3=beacon @@ -39,7 +39,7 @@ if(cast_check(1)) var/beacon if(user) - beacon = input(user, "Select the last rune", "Rune Scribing") in rnwords + beacon = tgui_input_list(user, "Select the last rune", "Rune Scribing", rnwords, timeout=30 SECONDS) R.word1=cultwords["travel"] R.word2=cultwords["other"] R.word3=beacon @@ -171,5 +171,5 @@ R.word3=cultwords["technology"] R.check_icon() else - to_chat(user, span_warning(" You do not have enough space to write a proper rune.")) + to_chat(user, span_warning("You do not have enough space to write a proper rune.")) return diff --git a/code/modules/tgui/modules/admin/player_notes.dm b/code/modules/tgui/modules/admin/player_notes.dm index 2632585d5d..d7e9ccb90e 100644 --- a/code/modules/tgui/modules/admin/player_notes.dm +++ b/code/modules/tgui/modules/admin/player_notes.dm @@ -191,7 +191,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") + var/filter = tgui_input_text(usr, "Filter string (case-insensitive regex)", "Player notes filter") PlayerNotesPageLegacy(1, filter) /datum/admins/proc/PlayerNotesPageLegacy(page, filter) @@ -296,7 +296,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)")) + var/add = sanitize(tgui_input_text(usr, "Add Player Info (Legacy)", multiline=TRUE)) if(!add) return notes_add(key,add,usr) diff --git a/code/modules/tgui/modules/rcon.dm b/code/modules/tgui/modules/rcon.dm index 0cecc4c5ee..fe1f57349b 100644 --- a/code/modules/tgui/modules/rcon.dm +++ b/code/modules/tgui/modules/rcon.dm @@ -78,15 +78,21 @@ var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(params["smes"]) if(SMES) SMES.tgui_set_io(SMES_TGUI_INPUT, params["target"], text2num(params["adjust"])) - // var/inputset = (input(ui.user, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000) as num) * 1000 - // SMES.set_input(inputset) + /* var/inputset = (tgui_input_number(ui.user, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000)) + if(inputset) + inputset *= 1000 + SMES.set_input(inputset) + */ . = TRUE if("smes_out_set") var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(params["smes"]) if(SMES) SMES.tgui_set_io(SMES_TGUI_OUTPUT, params["target"], text2num(params["adjust"])) - // var/outputset = (input(ui.user, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Output Power Control", SMES.output_level/1000) as num) * 1000 - // SMES.set_output(outputset) + /* var/outputset = (tgui_input_number(ui.user, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Output Power Control", SMES.output_level/1000)) + if(outputset) + outputset *= 1000 + SMES.set_input(outputset) + SMES.set_output(outputset) */ . = TRUE if("toggle_breaker") var/obj/machinery/power/breakerbox/toggle = null diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 38f766bf09..5406f720c4 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -850,7 +850,7 @@ //Again, no real need for a check on this. I'm unsure how it could be somehow abused. //Even if they open the box 900 times, who cares, they get the wrong color and do it again. - var/new_color = input(src,"Select a new color","Body Glow",glow_color) as color + var/new_color = tgui_color_picker(src,"Select a new color","Body Glow",glow_color) if(new_color) glow_color = new_color diff --git a/code/modules/vote/vote_verb.dm b/code/modules/vote/vote_verb.dm index b8479cbe95..8775b16382 100644 --- a/code/modules/vote/vote_verb.dm +++ b/code/modules/vote/vote_verb.dm @@ -48,7 +48,7 @@ choices |= option var/c2 = tgui_alert(usr, "Show counts while vote is happening?", "Counts", list("Yes", "No")) - var/c3 = input(usr, "Select a result calculation type", "Vote", VOTE_RESULT_TYPE_MAJORITY) as anything in list(VOTE_RESULT_TYPE_MAJORITY) + var/c3 = tgui_input_list(usr, "Select a result calculation type", "Vote", list(VOTE_RESULT_TYPE_MAJORITY)) var/datum/vote/V = new /datum/vote(usr.ckey, question, choices, TRUE) V.show_counts = (c2 == "Yes") diff --git a/code/modules/xenoarcheaology/effect_master.dm b/code/modules/xenoarcheaology/effect_master.dm index 1416cf77e9..169ec50081 100644 --- a/code/modules/xenoarcheaology/effect_master.dm +++ b/code/modules/xenoarcheaology/effect_master.dm @@ -125,7 +125,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) return effects /datum/component/artifact_master/proc/add_effect() - var/effect_type = input(usr, "What type do you want?", "Effect Type") as null|anything in subtypesof(/datum/artifact_effect) + var/effect_type = tgui_input_list(usr, "What type do you want?", "Effect Type", subtypesof(/datum/artifact_effect)) if(effect_type) var/datum/artifact_effect/my_effect = new effect_type(src) if(istype(holder, my_effect.req_type)) @@ -136,7 +136,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) qdel(my_effect) /datum/component/artifact_master/proc/remove_effect() - var/to_remove_effect = input(usr, "What effect do you want to remove?", "Remove Effect") as null|anything in my_effects + var/to_remove_effect = tgui_input_list(usr, "What effect do you want to remove?", "Remove Effect", my_effects) if(to_remove_effect) var/datum/artifact_effect/AE = to_remove_effect diff --git a/tools/IconSplitter/IconSplitter.dm b/tools/IconSplitter/IconSplitter.dm index cf7389aacd..dd2d5c6bce 100644 --- a/tools/IconSplitter/IconSplitter.dm +++ b/tools/IconSplitter/IconSplitter.dm @@ -32,7 +32,7 @@ obj var/user_input while(!user_input) - user_input = input(usr, "Enter the criteria for the icon_states you wish to be split. For example, doing _d_s will remove all rolled down jumpsuits.","Split Criteria", "") + user_input = tgui_input_text(usr, "Enter the criteria for the icon_states you wish to be split. For example, doing _d_s will remove all rolled down jumpsuits.","Split Criteria", "") to_world("Your split criteria is [user_input]") for(var/OriginalState in icon_states(DMIToSplit)) @@ -46,4 +46,4 @@ obj RunningOutput.Insert(ToAdd, OriginalState) usr << ftp(RunningOutput,"CutUpDmi.dmi") - usr << ftp(RunningOutputCut, "CutUpDmiWithCriteria.dmi") \ No newline at end of file + usr << ftp(RunningOutputCut, "CutUpDmiWithCriteria.dmi")