[s]Fixes writing bugs/exploits
This commit is contained in:
committed by
CitadelStationBot
parent
1cda9ef2b4
commit
98bbfb8709
@@ -41,8 +41,11 @@
|
||||
to_chat(user, "<span class='notice'>You put [W] into [src].</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on the cover of [src]!</span>")
|
||||
return
|
||||
var/n_name = copytext(sanitize(input(user, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
|
||||
if((in_range(src,user) && user.stat == CONSCIOUS))
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
name = "folder[(n_name ? " - '[n_name]'" : null)]"
|
||||
|
||||
|
||||
|
||||
@@ -244,7 +244,8 @@
|
||||
|
||||
/obj/item/paper/Topic(href, href_list)
|
||||
..()
|
||||
if(usr.stat || usr.restrained())
|
||||
var/literate = usr.is_literate()
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, literate))
|
||||
return
|
||||
|
||||
if(href_list["help"])
|
||||
@@ -253,7 +254,7 @@
|
||||
if(href_list["write"])
|
||||
var/id = href_list["write"]
|
||||
var/t = stripped_multiline_input("Enter what you want to write:", "Write", no_trim=TRUE)
|
||||
if(!t)
|
||||
if(!t || !usr.canUseTopic(src, BE_CLOSE, literate))
|
||||
return
|
||||
var/obj/item/i = usr.get_active_held_item() //Check to see if he still got that darn pen, also check if he's using a crayon or pen.
|
||||
var/iscrayon = 0
|
||||
|
||||
@@ -54,9 +54,12 @@
|
||||
|
||||
/obj/item/photo/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
|
||||
txt = copytext(txt, 1, 128)
|
||||
if(loc == user && user.stat == CONSCIOUS)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
scribble = txt
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user