makes spraycans rely on HSL lightness instead of an addition of all the RGB values
This commit is contained in:
@@ -710,7 +710,9 @@
|
|||||||
|
|
||||||
if(isobj(target))
|
if(isobj(target))
|
||||||
if(actually_paints)
|
if(actually_paints)
|
||||||
if(color_hex2num(paint_color) < 350 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected
|
var/list/hsl = rgb2hsl(hex2num(copytext(paint_color,2,4)),hex2num(copytext(paint_color,4,6)),hex2num(copytext(paint_color,6,8)))
|
||||||
|
message_admins("[hsl]")
|
||||||
|
if(hsl[3] < 0.25 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected
|
||||||
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
|
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user