Input Conversion Part 2

This commit is contained in:
ItsSelis
2022-06-19 03:40:24 +02:00
parent 12611af1ee
commit 2d7b081a55
80 changed files with 160 additions and 160 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
/obj/structure/closet/body_bag/attackby(var/obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != W)
return
if (!in_range(src, user) && src.loc != user)
@@ -322,7 +322,7 @@
. = TRUE
switch(action)
if("rename")
var/new_name = sanitizeSafe(input(usr,"Please enter your name.","Communicator",usr.name) )
var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) )
if(new_name)
register_device(new_name)
+1 -1
View File
@@ -229,7 +229,7 @@
to_chat(user, "<span class='warning'>The MMI must go in after everything else!</span>")
if (istype(W, /obj/item/weapon/pen))
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
+1 -1
View File
@@ -399,7 +399,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/N = input(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1) as num|null
var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
if(N)
var/obj/item/stack/F = src.split(N)
if (F)
+1 -1
View File
@@ -843,7 +843,7 @@
if(!M.mind)
return 0
var/input = sanitizeSafe(input(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
if(src && input && !M.stat && in_range(M,src))
name = input
@@ -74,7 +74,7 @@
to_chat(user, "<span class='warning'>Circuit controls are locked.</span>")
return
var/existing_networks = jointext(network,",")
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
return
@@ -39,7 +39,7 @@
..()
/obj/item/weapon/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10)
if(user.get_active_hand() == src)
newtime = CLAMP(newtime, 10, 60000)
timer = newtime
@@ -288,7 +288,7 @@ Implant Specifics:<BR>"}
/obj/item/weapon/implant/explosive/post_implant(mob/source as mob)
elevel = tgui_alert(usr, "What sort of explosion would you prefer?", "Implant Intent", list("Localized Limb", "Destroy Body", "Full Explosion"))
phrase = input(usr, "Choose activation phrase:") as text
phrase = tgui_input_text(usr, "Choose activation phrase:")
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
@@ -21,7 +21,7 @@
/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob)
..()
if (istype(I, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
if (user.get_active_hand() != I)
return
if((!in_range(src, usr) && src.loc != user))