Merge pull request #6094 from Heroman3003/anti-magic-markers

Fixes markers and crayons drawing from a distance
This commit is contained in:
Neerti
2019-04-16 23:07:51 -04:00
committed by VirgoBot
parent 01a7f1083b
commit 860ff31f08

View File

@@ -69,9 +69,13 @@
if(!proximity) return
if(istype(target,/turf/simulated/floor))
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter","arrow")
if(get_dist(target, user) > 1 || !(user.z == target.z))
return
switch(drawtype)
if("letter")
drawtype = input("Choose the letter.", "Crayon scribbles") in list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
if(get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing a letter on the [target.name].")
if("graffiti")
to_chat(user, "You start drawing graffiti on the [target.name].")
@@ -79,6 +83,8 @@
to_chat(user, "You start drawing a rune on the [target.name].")
if("arrow")
drawtype = input("Choose the arrow.", "Crayon scribbles") in list("left", "right", "up", "down")
if(get_dist(target, user) > 1 || !(user.z == target.z))
return
to_chat(user, "You start drawing an arrow on the [target.name].")
if(instant || do_after(user, 50))
new /obj/effect/decal/cleanable/crayon(target,colour,shadeColour,drawtype)