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

@ -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,12 +804,15 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
on_use = unifieddyes.on_use on_use = unifieddyes.on_use
}) })
else else
minetest.register_craftitem(":dye:"..val..hue, { if (val..hue) ~= "medium_orange"
description = S(desc), and (val..hue) ~= "light_red" then
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200", minetest.register_craftitem(":dye:"..val..hue, {
groups = { dye=1, not_in_creative_inventory=1 }, description = S(desc),
on_use = unifieddyes.on_use inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200",
}) groups = { dye=1, not_in_creative_inventory=1 },
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)
@ -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")