mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-22 15:33:52 +01:00
translate new dye names to old for 89-color palette check
This commit is contained in:
parent
50013d21d1
commit
cf89bc6a24
12
init.lua
12
init.lua
@ -472,6 +472,18 @@ function unifieddyes.getpaletteidx(color, palette_type)
|
|||||||
return (hues_extended[color] + shades_extended[shade]*24), hues_extended[color]
|
return (hues_extended[color] + shades_extended[shade]*24), hues_extended[color]
|
||||||
end
|
end
|
||||||
else -- it's the 89-color palette
|
else -- it's the 89-color palette
|
||||||
|
|
||||||
|
-- If using this palette, translate new color names back to old.
|
||||||
|
|
||||||
|
if shade == "" then
|
||||||
|
if color == "spring" then
|
||||||
|
color = "aqua"
|
||||||
|
elseif color == "azure" then
|
||||||
|
color = "skyblue"
|
||||||
|
elseif color == "rose" then
|
||||||
|
color = "redviolet"
|
||||||
|
end
|
||||||
|
end
|
||||||
if hues[color] and shades[shade] then
|
if hues[color] and shades[shade] then
|
||||||
return (hues[color] * 8 + shades[shade]), hues[color]
|
return (hues[color] * 8 + shades[shade]), hues[color]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user