Input Conversion Part 1

This commit is contained in:
ItsSelis
2022-06-19 03:05:03 +02:00
parent 37daa28920
commit 06c9b26252
134 changed files with 342 additions and 342 deletions
@@ -376,7 +376,7 @@
to_chat(usr, "<span class='danger'>Error: Cannot connect to Exonet node.</span>")
return FALSE
var/their_address = params["message"]
var/text = sanitizeSafe(input(usr,"Enter your message.","Text Message"))
var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message"))
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
@@ -424,7 +424,7 @@
selected_tab = params["switch_tab"]
if("edit")
var/n = input(usr, "Please enter message", name, notehtml) as message|null
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
n = sanitizeSafe(n, extra = 0)
if(n)
note = html_decode(n)
@@ -102,7 +102,7 @@
switch(href_list["action"])
if("Reply")
var/obj/item/device/communicator/comm = locate(href_list["target"])
var/message = input(usr, "Enter your message below.", "Reply")
var/message = tgui_input_text(usr, "Enter your message below.", "Reply")
if(message)
exonet.send_message(comm.exonet.address, "text", message)
@@ -153,7 +153,7 @@
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
var/text_message = sanitize(input(src, "What do you want the message to say?") as message)
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", multiline = TRUE))
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
+1 -1
View File
@@ -323,7 +323,7 @@ var/list/GPS_list = list()
. = TRUE
if(href_list["tag"])
var/a = input(usr, "Please enter desired tag.", name, gps_tag) as text
var/a = tgui_input_text(usr, "Please enter desired tag.", name, gps_tag)
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
+1 -1
View File
@@ -40,7 +40,7 @@
user.audible_message("<B>[user.GetVoice()]</B>[user.GetAltName()] broadcasts, <FONT size=3>\"[message]\"</FONT>", runemessage = message)
/obj/item/device/megaphone/attack_self(var/mob/living/user)
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
var/message = sanitize(tgui_input_text(user, "Shout a message?", "Megaphone", null))
if(!message)
return
message = capitalize(message)
+4 -4
View File
@@ -49,7 +49,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
var/actual_pai_name
var/turf/location = get_turf(src)
if(choice == "No")
var/pai_name = input(user, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(user, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -73,7 +73,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -83,7 +83,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
new_pai.key = user.key
card.setPersonality(new_pai)
if(!new_pai.savefile_load(new_pai))
var/pai_name = input(new_pai, "Choose your character's name", "Character Name") as text
var/pai_name = tgui_input_text(new_pai, "Choose your character's name", "Character Name")
actual_pai_name = sanitize_name(pai_name, ,1)
if(isnull(actual_pai_name))
return ..()
@@ -328,7 +328,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
var/newlaws = sanitize(tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws, multiline = TRUE))
if(newlaws)
pai.pai_laws = newlaws
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
@@ -417,7 +417,7 @@
return
else if(istype(I, /obj/item/weapon/pen))
if(loc == user && !user.incapacitated())
var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
var/new_name = tgui_input_text(user, "What would you like to label the tape?", "Tape labeling")
if(isnull(new_name)) return
new_name = sanitizeSafe(new_name)
if(new_name)
@@ -22,7 +22,7 @@
named = 1
*/
var/message = sanitize(input(user,"Choose a message to relay to those around you.") as text|null)
var/message = sanitize(tgui_input_text(user,"Choose a message to relay to those around you."))
if(message)
audible_message("[bicon(src)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech")
if(ismob(loc))
+1 -1
View File
@@ -65,7 +65,7 @@
if(..())
return 1
if(href_list["channel"])
var/nc = input(usr, "Channel name", "Select new channel name", channel) as text|null
var/nc = tgui_input_text(usr, "Channel name", "Select new channel name", channel)
if(nc)
channel = nc
camera.c_tag = channel
+1 -1
View File
@@ -19,7 +19,7 @@
to_chat(usr, "The hailer is fried. The tiny input screen just shows a waving ASCII penis.")
return
var/new_message = input(usr, "Please enter new message (leave blank to reset).") as text
var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).")
if(!new_message || new_message == "")
use_message = "Halt! Security!"
else
@@ -133,7 +133,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
@@ -159,7 +159,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(input(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
@@ -244,7 +244,7 @@ AI MODULES
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -357,7 +357,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -381,7 +381,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"