Blemishes begone.

This commit is contained in:
Ghommie
2020-09-02 19:16:16 +02:00
parent 6f5de529c1
commit dc9b024fae
6 changed files with 31 additions and 23 deletions

View File

@@ -735,7 +735,11 @@
if(isobj(target))
if(actually_paints)
var/list/hsl = rgb2hsl(hex2num(copytext(paint_color,2,4)),hex2num(copytext(paint_color,4,6)),hex2num(copytext(paint_color,6,8)))
if(hsl[3] < 0.25 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected
var/static/whitelisted = typecacheof(list(/obj/structure/window,
/obj/effect/decal/cleanable/crayon,
/obj/machinery/door/window)
)
if(hsl[3] < 0.25 && !whitelisted[target]) //Colors too dark are rejected
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
return FALSE