mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-18 11:30:35 +01:00
copytext() check for some input
This commit is contained in:
@@ -646,7 +646,7 @@
|
||||
if(type in diseases) // Make sure this is a disease
|
||||
D = new type(0, null)
|
||||
var/list/data = list("viruses"=list(D))
|
||||
var/name = sanitize(input(usr,"Name:","Name the culture",D.name))
|
||||
var/name = sanitize(copytext(input(usr,"Name:","Name the culture",D.name), 1, MAX_NAME_LEN))
|
||||
if(!name || name == " ") name = D.name
|
||||
B.name = "[name] culture bottle"
|
||||
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
|
||||
var/tmp_label = sanitize(input(user, "Enter a label for [src.name]","Label",src.label_text))
|
||||
var/tmp_label = sanitize(copytext(input(user, "Enter a label for [src.name]","Label",src.label_text), 1, MAX_NAME_LEN))
|
||||
if(length(tmp_label) > 10)
|
||||
user << "\red The label can be at most 10 characters long."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user