mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
@@ -78,6 +78,11 @@
|
||||
var/name = input(user, message, title, default) as text|null
|
||||
return strip_html_properly(name, max_length)
|
||||
|
||||
// Used to get a properly sanitized multiline input, of max_length
|
||||
/proc/stripped_multiline_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
return strip_html_properly(name, max_length)
|
||||
|
||||
//Filters out undesirable characters from names
|
||||
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
|
||||
if(!t_in || length(t_in) > max_length)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
H << "<span class='warning'>You cut yourself on the paper! Ahhhh! Ahhhhh!</span>"
|
||||
H.damageoverlaytemp = 9001
|
||||
return
|
||||
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_NAME_LEN)
|
||||
var/n_name = stripped_input(usr, "What would you like to label the paper?", "Paper Labelling", null, MAX_NAME_LEN)
|
||||
if((loc == usr && usr.stat == 0))
|
||||
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(usr)
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
if(href_list["write"])
|
||||
var/id = href_list["write"]
|
||||
var/t = stripped_input("Enter what you want to write:", "Write")
|
||||
var/t = stripped_multiline_input("Enter what you want to write:", "Write")
|
||||
var/obj/item/i = usr.get_active_hand() //Check to see if he still got that darn pen, also check if he's using a crayon or pen.
|
||||
var/iscrayon = 0
|
||||
if(!istype(i, /obj/item/weapon/pen))
|
||||
|
||||
Reference in New Issue
Block a user