Merge pull request #5510 from Citadel-Station-13/upstream-merge-35552

[MIRROR] [s]Fixes writing bugs/exploits
This commit is contained in:
deathride58
2018-02-16 01:32:23 +00:00
committed by GitHub
15 changed files with 156 additions and 91 deletions
+4 -1
View File
@@ -1040,13 +1040,16 @@ GLOBAL_LIST_EMPTY(allCasters)
/obj/item/newspaper/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
return
if(scribble_page == curr_page)
to_chat(user, "<span class='notice'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</span>")
else
var/s = stripped_input(user, "Write something", "Newspaper")
if (!s)
return
if (!in_range(src, usr) && loc != usr)
if(!user.canUseTopic(src, BE_CLOSE))
return
scribble_page = curr_page
scribble = s