mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-22 15:33:52 +01:00
parent
8b20a069d3
commit
ffd03b9c3c
16
init.lua
16
init.lua
@ -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,6 +804,8 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
|
||||
on_use = unifieddyes.on_use
|
||||
})
|
||||
else
|
||||
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",
|
||||
@ -811,6 +813,7 @@ for _, h in ipairs(unifieddyes.HUES_EXTENDED) do
|
||||
on_use = unifieddyes.on_use
|
||||
})
|
||||
end
|
||||
end
|
||||
minetest.register_alias("unifieddyes:"..val..hue, "dye:"..val..hue)
|
||||
|
||||
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]
|
||||
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")
|
||||
|
Loading…
Reference in New Issue
Block a user