mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
remove old inputs (#17008)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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]
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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), "."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]'."))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 <font color='[new_data]'>new color</font> into the pin."))
|
||||
write_data_to_pin(new_data)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
usr << ftp(RunningOutputCut, "CutUpDmiWithCriteria.dmi")
|
||||
|
||||
Reference in New Issue
Block a user