1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2024-12-25 10:10:29 +01:00

clean-up of dark/medium orange and light/red

(fixes #13)
This commit is contained in:
Vanessa Ezekowitz 2017-06-20 15:43:39 -04:00
parent 8b20a069d3
commit ffd03b9c3c

View File

@ -315,7 +315,7 @@ function unifieddyes.getpaletteidx(color, palette_type)
local origcolor = color local origcolor = color
local aliases = { local aliases = {
["pink"] = "light_red", ["pink"] = "light_red",
["brown"] = "dark_orange", ["brown"] = "medium_orange",
} }
local grayscale = { local grayscale = {
@ -499,7 +499,7 @@ function unifieddyes.getpaletteidx(color, palette_type)
else else
if color == "brown" then if color == "brown" then
color = "orange" color = "orange"
shade = "dark" shade = "medium"
elseif color == "pink" then elseif color == "pink" then
color = "red" color = "red"
shade = "light" shade = "light"
@ -804,6 +804,8 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
on_use = unifieddyes.on_use on_use = unifieddyes.on_use
}) })
else else
if (val..hue) ~= "medium_orange"
and (val..hue) ~= "light_red" then
minetest.register_craftitem(":dye:"..val..hue, { minetest.register_craftitem(":dye:"..val..hue, {
description = S(desc), description = S(desc),
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200",
@ -811,6 +813,7 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
on_use = unifieddyes.on_use on_use = unifieddyes.on_use
}) })
end end
end
minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue) minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue)
if v > 3 then -- also register the low-sat version if v > 3 then -- also register the low-sat version
@ -960,6 +963,8 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do
local firstdye = j[3] local firstdye = j[3]
if firstdye == "color" then firstdye = "dye:"..color end if firstdye == "color" then firstdye = "dye:"..color end
-- ignore black, white, anything containing the word "grey", and medium orange
if color ~= "black" and color ~= "white" and not string.find(color, "grey") then if color ~= "black" and color ~= "white" and not string.find(color, "grey") then
minetest.register_craft( { minetest.register_craft( {
@ -976,6 +981,8 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do
end end
end end
-- greys
unifieddyes.greymixes = { unifieddyes.greymixes = {
{ 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 }, { 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 },
{ 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 }, { 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 },
@ -1021,8 +1028,11 @@ for _, i in ipairs(unifieddyes.greymixes) do
}) })
end end
minetest.register_alias("unifieddyes:light_red", "dye:pink") minetest.register_alias("dye:light_red", "dye:pink")
minetest.register_alias("dye:medium_orange", "dye:brown")
minetest.register_alias("unifieddyes:dark_green", "dye:dark_green") minetest.register_alias("unifieddyes:dark_green", "dye:dark_green")
minetest.register_alias("unifieddyes:black", "dye:black") minetest.register_alias("unifieddyes:black", "dye:black")
minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey") minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey")
minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey") minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey")