mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Encode changes (#11301)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e6a4639d0
commit
4e2361f8df
@@ -21,7 +21,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
coordinates = "(X:[loc.x];Y:[loc.y];Z:[loc.z])"
|
||||
|
||||
/obj/effect/landmark/event_trigger/proc/set_vars(mob/M)
|
||||
var/new_name = sanitize(tgui_input_text(M, "Input Name for the trigger", "Naming", "Event Trigger"))
|
||||
var/new_name = tgui_input_text(M, "Input Name for the trigger", "Naming", "Event Trigger", MAX_MESSAGE_LEN)
|
||||
if(!new_name)
|
||||
return
|
||||
name = new_name
|
||||
@@ -95,7 +95,7 @@ Admin verb is called by code\modules\admin\verbs\event_triggers.dm
|
||||
|
||||
/obj/effect/landmark/event_trigger/auto_narrate/set_vars(mob/M)
|
||||
..()
|
||||
message = encode_html_emphasis(sanitize(tgui_input_text(M, "What should the automatic narration say?", "Message"), encode = FALSE))
|
||||
message = encode_html_emphasis(tgui_input_text(M, "What should the automatic narration say?", "Message", "", MAX_MESSAGE_LEN))
|
||||
isPersonal_orVis_orAud = (tgui_alert(M, "Should it send directly to the player, or send to the turf?", "Target", list("Player", "Turf")) == "Player" ? 0 : 1)
|
||||
if(isPersonal_orVis_orAud == 0)
|
||||
isWarning = (tgui_alert(M, "Should it be a normal message or a big scary red text?", "Scary Red", list("Big Red", "Normal")) == "Big Red" ? TRUE : FALSE)
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
to_chat(usr, span_warning("Error! Please notify administration!"))
|
||||
return
|
||||
var/list/turf/turfs = res
|
||||
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", "", MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", "", MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
@@ -203,7 +203,7 @@
|
||||
/obj/item/blueprints/proc/edit_area()
|
||||
var/area/A = get_area()
|
||||
var/prevname = "[A.name]"
|
||||
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", prevname, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/str = sanitizeSafe(tgui_input_text(usr, "New area name:","Blueprint Editing", prevname, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
|
||||
@@ -376,7 +376,6 @@
|
||||
var/area/A = get_area(usr)
|
||||
var/prevname = "[A.name]"
|
||||
var/str = tgui_input_text(usr, "New area name", "Area Creation", max_length = MAX_NAME_LEN)
|
||||
str = sanitize(str,MAX_NAME_LEN)
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
@@ -499,7 +498,6 @@
|
||||
var/area/oldA = get_area(get_turf(creator))
|
||||
if(!isarea(area_choice))
|
||||
var/str = tgui_input_text(creator, "New area name", "Blueprint Editing", max_length = MAX_NAME_LEN)
|
||||
str = sanitize(str,MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
@@ -612,7 +610,6 @@
|
||||
to_chat(creator, span_warning("Making a new area here would be meaningless. Renaming it would be a better option."))
|
||||
return
|
||||
str = tgui_input_text(creator, "New area name", "Blueprint Editing", max_length = MAX_NAME_LEN)
|
||||
str = sanitize(str,MAX_NAME_LEN)
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
@@ -901,7 +898,7 @@
|
||||
return
|
||||
|
||||
//They can select an area they want to turn their current area into.
|
||||
str = sanitizeSafe(tgui_input_text(creator, "What would you like to name the area?", "Area Name", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
str = sanitizeSafe(tgui_input_text(creator, "What would you like to name the area?", "Area Name", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(isnull(str)) //They pressed cancel.
|
||||
to_chat(creator, span_warning("No new area made. Cancelling."))
|
||||
return
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name) )
|
||||
var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name, encode = FALSE))
|
||||
if(new_name)
|
||||
register_device(new_name)
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node."))
|
||||
return FALSE
|
||||
var/their_address = params["message"]
|
||||
var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message"))
|
||||
var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message", encode = FALSE))
|
||||
if(text)
|
||||
exonet.send_message(their_address, "text", text)
|
||||
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
return
|
||||
|
||||
var/timeout = world.time + 600
|
||||
var/reason = sanitize(tgui_input_text(user, "Reason:","Why do you require this item?",""))
|
||||
var/reason = tgui_input_text(user, "Reason:","Why do you require this item?","", MAX_MESSAGE_LEN)
|
||||
if(world.time > timeout)
|
||||
to_chat(user, span_warning("Error. Request timed out."))
|
||||
return
|
||||
@@ -155,7 +155,7 @@
|
||||
return
|
||||
|
||||
if(href_list["edit"])
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"], MAX_MESSAGE_LEN)
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(href_list["edit"])
|
||||
var/field = tgui_alert(user, "Select which field to edit", "Field?", list("Name", "Quantity", "Value"))
|
||||
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"])
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
// Else clause means they're editing/deleting the whole export report, rather than a specific item in it
|
||||
else if(href_list["edit"])
|
||||
var/new_val = sanitize(tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"]))
|
||||
var/new_val = tgui_input_text(user, href_list["edit"], "Enter the new value for this field:", href_list["default"])
|
||||
if(!new_val)
|
||||
return
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
post_status("alert", href_list["alert"])
|
||||
internal_data["stat_display_special"] = href_list["alert"]
|
||||
if("setmsg")
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(sanitize(tgui_input_text(usr, "Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"], 40), 40), 40)
|
||||
internal_data["stat_display_line[href_list["line"]]"] = reject_bad_text(tgui_input_text(usr, "Line 1", "Enter Message Text", internal_data["stat_display_line[href_list["line"]]"], 40), 40)
|
||||
else
|
||||
post_status(href_list["stat_display"])
|
||||
internal_data["stat_display_special"] = href_list["stat_display"]
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
if(choice)
|
||||
var/obj/item/communicator/chosen_communicator = choice
|
||||
var/mob/observer/dead/O = src
|
||||
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", multiline = TRUE))
|
||||
var/text_message = sanitize(tgui_input_text(src, "What do you want the message to say?", encode = FALSE, multiline = TRUE), MAX_MESSAGE_LEN, FALSE, FALSE, TRUE)
|
||||
if(text_message && O.exonet)
|
||||
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
if(href_list["tag"])
|
||||
var/a = tgui_input_text(usr, "Please enter desired tag.", name, gps_tag, 10)
|
||||
a = uppertext(copytext(sanitize(a), 1, 11))
|
||||
a = uppertext(copytext(a, 1, 11))
|
||||
if(in_range(src, usr))
|
||||
gps_tag = a
|
||||
name = "global positioning system ([gps_tag])"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
user.audible_message(span_infoplain(span_bold("[user.GetVoice()]") + "[user.GetAltName()] broadcasts, " + span_large("\"[message]\"")), runemessage = message)
|
||||
|
||||
/obj/item/megaphone/attack_self(var/mob/living/user)
|
||||
var/message = sanitize(tgui_input_text(user, "Shout a message?", "Megaphone", null))
|
||||
var/message = tgui_input_text(user, "Shout a message?", "Megaphone", null, MAX_MESSAGE_LEN)
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
if(2)
|
||||
radio.ToggleReception()
|
||||
if(href_list["setlaws"])
|
||||
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, prevent_enter = TRUE))
|
||||
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, MAX_MESSAGE_LEN, encode = FALSE, multiline = TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN, FALSE, FALSE, TRUE)
|
||||
if(newlaws)
|
||||
pai.pai_laws = newlaws
|
||||
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
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 = 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))
|
||||
device_name = 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
|
||||
*/
|
||||
|
||||
var/message = sanitize(tgui_input_text(user,"Choose a message to relay to those around you."))
|
||||
var/message = tgui_input_text(user,"Choose a message to relay to those around you.", "", "", MAX_MESSAGE_LEN)
|
||||
if(message)
|
||||
audible_message("[icon2html(src, user.client)] \The [src.name] states, \"[message]\"", runemessage = "synthesized speech")
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
/obj/item/ticket_printer/proc/print_a_ticket(mob/user)
|
||||
|
||||
var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100))
|
||||
var/ticket_name = tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)
|
||||
if(length(ticket_name) > 100)
|
||||
tgui_alert_async(user, "Entered name too long. 100 character limit.","Error")
|
||||
return
|
||||
if(!ticket_name)
|
||||
return
|
||||
var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200))
|
||||
var/details = tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200)
|
||||
if(length(details) > 200)
|
||||
tgui_alert_async(user, "Entered details too long. 200 character limit.","Error")
|
||||
return
|
||||
@@ -70,13 +70,13 @@
|
||||
|
||||
/obj/item/ticket_printer/train/print_a_ticket(mob/user)
|
||||
|
||||
var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100))
|
||||
var/ticket_name = tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)
|
||||
if(length(ticket_name) > 100)
|
||||
tgui_alert_async(user, "Entered name too long. 100 character limit.","Error")
|
||||
return
|
||||
if(!ticket_name)
|
||||
return
|
||||
var/details = sanitize(tgui_input_text(user, "What is the ticket for? This could be anything like travel to a destination or permission to do something! This is not official and does not override any rules or authorities on the station.", "Ticket Details", max_length = 200))
|
||||
var/details = tgui_input_text(user, "What is the ticket for? This could be anything like travel to a destination or permission to do something! This is not official and does not override any rules or authorities on the station.", "Ticket Details", max_length = 200)
|
||||
if(length(details) > 200)
|
||||
tgui_alert_async(user, "Entered details too long. 200 character limit.","Error")
|
||||
return
|
||||
|
||||
@@ -138,7 +138,7 @@ This device records all warnings given and teleport events for admin review in c
|
||||
to_chat(user, span_warning("The translocator can't support any more beacons!"))
|
||||
return
|
||||
|
||||
var/new_name = html_encode(tgui_input_text(user,"New beacon's name (2-20 char):","[src]",null,20))
|
||||
var/new_name = tgui_input_text(user,"New beacon's name (2-20 char):","[src]",null,20)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
return 1
|
||||
if(href_list["channel"])
|
||||
var/nc = tgui_input_text(usr, "Channel name", "Select new channel name", channel, MAX_NAME_LEN)
|
||||
nc = sanitize(nc,MAX_NAME_LEN)
|
||||
if(nc)
|
||||
channel = nc
|
||||
camera.c_tag = channel
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
to_chat(usr, "The hailer is fried. The tiny input screen just shows a waving ASCII penis.")
|
||||
return
|
||||
|
||||
var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).")
|
||||
var/new_message = tgui_input_text(usr, "Please enter new message (leave blank to reset).", max_length = MAX_MESSAGE_LEN)
|
||||
if(!new_message || new_message == "")
|
||||
use_message = "Halt! Security!"
|
||||
else
|
||||
use_message = capitalize(copytext(sanitize(new_message), 1, MAX_MESSAGE_LEN))
|
||||
use_message = capitalize(new_message)
|
||||
|
||||
to_chat(usr, "You configure the hailer to shout \"[use_message]\".")
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
to_chat(user, span_warning("The MMI must go in after everything else!"))
|
||||
|
||||
if (istype(W, /obj/item/pen))
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
|
||||
var/t = tgui_input_text(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, user) && src.loc != user)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var/heldname = "default name"
|
||||
|
||||
/obj/item/borg/upgrade/utility/rename/attack_self(mob/user as mob)
|
||||
var/new_name = sanitizeSafe(tgui_input_text(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/new_name = tgui_input_text(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
|
||||
if(new_name)
|
||||
heldname = new_name
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
var/mob/M = usr
|
||||
if(!M.mind) return 0
|
||||
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the icon?", ,"", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/input = tgui_input_text(usr, "What do you want to name the icon?", ,"", null, MAX_NAME_LEN)
|
||||
|
||||
if(src && input && !M.stat && in_range(M,src))
|
||||
name = "icon of " + input
|
||||
|
||||
@@ -868,7 +868,7 @@
|
||||
if(!M.mind)
|
||||
return 0
|
||||
|
||||
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the plushie?", ,""), MAX_NAME_LEN)
|
||||
var/input = 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
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
cell = I
|
||||
|
||||
else if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
|
||||
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a nickname for [src]", "Nickname", nickname, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/tmp_label = tgui_input_text(user, "Enter a nickname for [src]", "Nickname", nickname, MAX_NAME_LEN)
|
||||
if(length(tmp_label) > 50 || length(tmp_label) < 3)
|
||||
to_chat(user, span_notice("The nickname must be between 3 and 50 characters."))
|
||||
else
|
||||
|
||||
@@ -146,7 +146,7 @@ AI MODULES
|
||||
|
||||
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
|
||||
var/targName = tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name, MAX_MESSAGE_LEN)
|
||||
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)
|
||||
|
||||
@@ -172,7 +172,7 @@ AI MODULES
|
||||
|
||||
/obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
|
||||
var/targName = tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name, MAX_MESSAGE_LEN)
|
||||
targetName = targName
|
||||
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
|
||||
|
||||
@@ -257,7 +257,7 @@ AI MODULES
|
||||
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
|
||||
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
|
||||
var/newlaw = ""
|
||||
var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
|
||||
var/targName = tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
|
||||
|
||||
@@ -375,7 +375,7 @@ AI MODULES
|
||||
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/newlaw = ""
|
||||
var/targName = sanitize(tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
|
||||
var/targName = tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
|
||||
|
||||
@@ -399,7 +399,7 @@ AI MODULES
|
||||
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
|
||||
..()
|
||||
var/newlaw = ""
|
||||
var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
|
||||
var/targName = tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
|
||||
newFreeFormLaw = targName
|
||||
desc = "A hacked AI law module: '[newFreeFormLaw]'"
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
to_chat(user, span_warning("Circuit controls are locked."))
|
||||
return
|
||||
var/existing_networks = jointext(network,",")
|
||||
var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
var/input = tgui_input_text(user, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks, MAX_MESSAGE_LEN)
|
||||
if(!input)
|
||||
to_chat(user, "No input found please hang up and try your call again.")
|
||||
return
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
|
||||
/obj/item/material/gravemarker/attackby(obj/item/W, mob/user as mob)
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_1)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
|
||||
grave_name += carving_1
|
||||
update_icon()
|
||||
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_2)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/obj/item/storage/pill_bottle/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/pen) || istype(W, /obj/item/flashlight/pen))
|
||||
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a label for [name]", "Label", label_text, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/tmp_label = sanitizeSafe(tgui_input_text(user, "Enter a label for [name]", "Label", label_text, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(length(tmp_label) > 50)
|
||||
to_chat(user, span_notice("The label can be at most 50 characters long."))
|
||||
else if(length(tmp_label) > 10)
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
/obj/structure/door_assembly/proc/rename_door(mob/living/user)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the [base_name].", src.name, src.created_name, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the [base_name].", src.name, src.created_name, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(!in_range(src, user) && src.loc != user) return
|
||||
created_name = t
|
||||
update_state()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
E.description_antag = "This is a 'disguised' emag, to make your escape from wherever you happen to be trapped."
|
||||
H.equip_to_appropriate_slot(E)
|
||||
|
||||
var/newname = sanitize(tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/newname = tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
H.real_name = newname
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
var/obj/item/C = new newpath(H)
|
||||
H.equip_to_appropriate_slot(C)
|
||||
|
||||
var/newname = sanitize(tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/newname = tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
H.real_name = newname
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
var/obj/item/C = new newpath(H)
|
||||
H.equip_to_appropriate_slot(C)
|
||||
|
||||
var/newname = sanitize(tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/newname = tgui_input_text(H, "Your mind feels foggy, and you recall your name might be [H.real_name]. Would you like to change your name?", "Name change", null, MAX_NAME_LEN)
|
||||
if (newname)
|
||||
H.real_name = newname
|
||||
|
||||
|
||||
@@ -51,14 +51,14 @@
|
||||
|
||||
/obj/structure/gravemarker/attackby(obj/item/W, mob/user as mob)
|
||||
if(W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_1)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
|
||||
grave_name += carving_1
|
||||
update_icon()
|
||||
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(carving_2)
|
||||
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
|
||||
if(do_after(user, material.hardness * W.toolspeed))
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
if(user.mind)
|
||||
user.mind.transfer_to(vox)
|
||||
spawn(1)
|
||||
var/newname = sanitizeSafe(tgui_input_text(vox,"Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/newname = sanitizeSafe(tgui_input_text(vox,"Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(!newname || newname == "")
|
||||
var/datum/language/L = GLOB.all_languages[vox.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/proc/rename_door(mob/living/user)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the windoor.", src.name, src.created_name, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the name for the windoor.", src.name, src.created_name, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
|
||||
if(!in_range(src, user) && src.loc != user) return
|
||||
created_name = t
|
||||
update_state()
|
||||
|
||||
@@ -631,7 +631,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(tgui_input_text(user, "Enter the new ID for the window.", src.name, id), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter the new ID for the window.", src.name, id, encode = FALSE), 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]'."))
|
||||
@@ -691,7 +691,7 @@
|
||||
var/obj/item/multitool/MT = W
|
||||
if(!id)
|
||||
// If no ID is set yet (newly built button?) let them select an ID for first-time use!
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter an ID for \the [src].", src.name, null, MAX_NAME_LEN), MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(tgui_input_text(user, "Enter an ID for \the [src].", src.name, null, MAX_NAME_LEN, encode = FALSE), 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]'. To reset this, rebuild the control."))
|
||||
|
||||
Reference in New Issue
Block a user