copytext() check for some input

This commit is contained in:
volas
2015-02-01 23:16:04 +03:00
parent 8abd7d0735
commit ea8e848463
7 changed files with 7 additions and 9 deletions
+1 -2
View File
@@ -43,8 +43,7 @@ var/global/photo_count = 0
/obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
txt = copytext(txt, 1, 128)
var/txt = sanitize(copytext(input(user, "What would you like to write on the back?", "Photo Writing", null) as text, 1, 128))
if(loc == user && user.stat == 0)
scribble = txt
..()