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 aliases = {
["pink"] = "light_red",
["brown"] = "dark_orange",
["brown"] = "medium_orange",
}
local grayscale = {
@ -499,7 +499,7 @@ function unifieddyes.getpaletteidx(color, palette_type)
else
if color == "brown" then
color = "orange"
shade = "dark"
shade = "medium"
elseif color == "pink" then
color = "red"
shade = "light"
@ -804,12 +804,15 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
on_use = unifieddyes.on_use
})
else
minetest.register_craftitem(":dye:"..val..hue, {
description = S(desc),
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200",
groups = { dye=1, not_in_creative_inventory=1 },
on_use = unifieddyes.on_use
})
if (val..hue) ~= "medium_orange"
and (val..hue) ~= "light_red" then
minetest.register_craftitem(":dye:"..val..hue, {
description = S(desc),
inventory_image = "unifieddyes_dye.png^[colorize:#"..color..":200",
groups = { dye=1, not_in_creative_inventory=1 },
on_use = unifieddyes.on_use
})
end
end
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]
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
minetest.register_craft( {
@ -976,6 +981,8 @@ for _,i in ipairs(unifieddyes.base_color_crafts) do
end
end
-- greys
unifieddyes.greymixes = {
{ 1, "dye:black", "dye:black", "dye:black", "dye:dark_grey", 4 },
{ 2, "dye:black", "dye:black", "dye:dark_grey", nil, 3 },
@ -1021,8 +1028,11 @@ for _, i in ipairs(unifieddyes.greymixes) do
})
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:black", "dye:black")
minetest.register_alias("unifieddyes:darkgrey", "dye:dark_grey")
minetest.register_alias("unifieddyes:dark_grey", "dye:dark_grey")