mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge pull request #6617 from Shadow-Quill/Paper-Pen-Confirmation
Adds holding pen check + alert
This commit is contained in:
@@ -397,13 +397,22 @@
|
||||
usr << "<span class='info'>There isn't enough space left on \the [src] to write anything.</span>"
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user