From c9ca929b5cc2eec8719cec6c3eef7d98a27625aa Mon Sep 17 00:00:00 2001 From: Atermonera Date: Wed, 15 Jan 2020 20:41:51 -0800 Subject: [PATCH] Merge pull request #6617 from Shadow-Quill/Paper-Pen-Confirmation Adds holding pen check + alert --- code/modules/paperwork/paper.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index e8940afecb..95fc5aad0f 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -397,13 +397,22 @@ usr << "There isn't enough space left on \the [src] to write anything." return - var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, free_space, extra = 0) + var/t = sanitize(input("Enter what you want to write:", "Write", null, null) as message, extra = 0) if(!t) return + if(t > free_space) + var/textalert = "[copytext(t, free_space-5, free_space)] ..." + alert(usr, "You've gone over the allowed amount of text! Here's where you're about to be cut off: [textalert]", "", "Okay!") + t = sanitize(input("Enter what you want to write:", "Write", null, textalert) as message, extra = 0) + 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)) + alert(usr, "You aren't holding a pen anymore! If you want to keep your work, grab one.", "", "Okay") + i = usr.get_active_hand() + if(!istype(i, /obj/item/weapon/pen)) var/mob/living/M = usr if(istype(M) && M.back && istype(M.back,/obj/item/weapon/rig))