From 061c6dfb4313312bdf3af5587bd71ab2fa5dba47 Mon Sep 17 00:00:00 2001 From: Shadow Date: Fri, 10 Jan 2020 19:55:04 -0600 Subject: [PATCH 1/2] Adds holding pen check + alert --- code/modules/paperwork/paper.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index e8940afecb..dcfb794c92 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -404,6 +404,10 @@ 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.", "Confirm Continuation", "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)) From 36d10010dc8e6349977ffa8358554af4188f6711 Mon Sep 17 00:00:00 2001 From: Shadow Date: Wed, 15 Jan 2020 21:41:29 -0600 Subject: [PATCH 2/2] Overtext Alert --- code/modules/paperwork/paper.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index dcfb794c92..95fc5aad0f 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -397,15 +397,20 @@ 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.", "Confirm Continuation", "Okay") + 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))