makes spraycans rely on HSL lightness instead of an addition of all the RGB values
This commit is contained in:
@@ -619,7 +619,7 @@
|
||||
is_capped = TRUE
|
||||
self_contained = FALSE // Don't disappear when they're empty
|
||||
can_change_colour = TRUE
|
||||
|
||||
|
||||
reagent_contents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol = 1)
|
||||
|
||||
pre_noise = TRUE
|
||||
@@ -710,7 +710,9 @@
|
||||
|
||||
if(isobj(target))
|
||||
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>")
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user