mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Palette crayon fix (#31692)
* Fix crayons bricking palettes * Fix colors from pens (and now crayons) refusing to mix with other colors on palette
This commit is contained in:
@@ -34,9 +34,9 @@
|
||||
var/obj/item/toy/crayon/c = held_item
|
||||
max_strength = PENCIL_STRENGTH_MAX
|
||||
min_strength = PENCIL_STRENGTH_MIN
|
||||
palette += c.colour
|
||||
palette += c.mainColour
|
||||
palette += c.shadeColour
|
||||
base_color = c.color
|
||||
base_color = c.mainColour
|
||||
|
||||
// Painting with hair dye sprays
|
||||
if (istype(held_item, /obj/item/weapon/hair_dye))
|
||||
@@ -63,6 +63,16 @@
|
||||
palette += b.paint_color
|
||||
base_color = b.paint_color
|
||||
|
||||
// Normalize palette colors
|
||||
for (var/i = 1; i < palette.len; i++)
|
||||
palette[i] = lowertext(palette[i])
|
||||
if (length(palette[i]) < 9) //If missing alpha channel assume opaque
|
||||
palette[i] += "ff"
|
||||
// Normalize base color
|
||||
base_color = lowertext(base_color)
|
||||
if (length(base_color) < 9) //If missing alpha channel assume opaque
|
||||
base_color += "ff"
|
||||
|
||||
|
||||
/datum/painting_utensil/proc/duplicate()
|
||||
var/datum/painting_utensil/dupe = new(null, null)
|
||||
|
||||
Reference in New Issue
Block a user