More Input Conversion

This commit is contained in:
ItsSelis
2022-06-19 12:21:51 +02:00
parent a0e2db25bf
commit af64bcf406
98 changed files with 145 additions and 145 deletions
+1 -1
View File
@@ -69,7 +69,7 @@
to_chat(user, "<span class='notice'>You put the [W] into \the [src].</span>")
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = sanitizeSafe(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text, MAX_NAME_LEN)
var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the folder?", "Folder Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN)
if((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return
+1 -1
View File
@@ -73,7 +73,7 @@
if(mode)
to_chat(user, SPAN_NOTICE("You turn on \the [src]."))
//Now let them chose the text.
var/str = sanitizeSafe(input(user,"Label text?","Set label",""), MAX_NAME_LEN)
var/str = sanitizeSafe(tgui_input_text(user,"Label text?","Set label","",MAX_NAME_LEN), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(user, SPAN_WARNING("Invalid text."))
return
+2 -2
View File
@@ -180,7 +180,7 @@
if((CLUMSY in usr.mutations) && prob(50))
to_chat(usr, "<span class='warning'>You cut yourself on the paper.</span>")
return
var/n_name = sanitizeSafe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN)
var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN)
// We check loc one level up, so we can rename in clipboards and such. See also: /obj/item/weapon/photo/rename()
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0 && n_name)
@@ -431,7 +431,7 @@
to_chat(usr, "<span class='info'>There isn't enough space left on \the [src] to write anything.</span>")
return
var/raw = input(usr, "Enter what you want to write:", "Write") as null|message
var/raw = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE)
if(!raw)
return
+1 -1
View File
@@ -192,7 +192,7 @@
set category = "Object"
set src in usr
var/n_name = sanitizeSafe(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text, MAX_NAME_LEN)
var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the bundle?", "Bundle Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN)
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0)
name = "[(n_name ? text("[n_name]") : "paper")]"
add_fingerprint(usr)
+1 -1
View File
@@ -34,7 +34,7 @@
if(writing_space <= 0)
to_chat(user, SPAN_WARNING("There is no room left on \the [src]."))
return
var/text = sanitizeSafe(input(usr, "What would you like to write?") as text, writing_space)
var/text = sanitizeSafe(tgui_input_text(usr, "What would you like to write?", null, null, writing_space), writing_space)
if(!text || thing.loc != user || (!Adjacent(user) && loc != user) || user.incapacitated())
return
user.visible_message("<b>\The [user]</b> jots a note down on \the [src].")
+2 -2
View File
@@ -47,7 +47,7 @@ var/global/photo_count = 0
/obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/pen))
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text, 128)
var/txt = sanitize(tgui_input_text(user, "What would you like to write on the back?", "Photo Writing", null, 128), 128)
if(loc == user && user.stat == 0)
scribble = txt
..()
@@ -75,7 +75,7 @@ var/global/photo_count = 0
set category = "Object"
set src in usr
var/n_name = sanitizeSafe(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text, MAX_NAME_LEN)
var/n_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the photo?", "Photo Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0))
name = "[(n_name ? text("[n_name]") : "photo")]"