rewrite the paintings crafts

just use dyes in a pattern resembling the painting instead of using binary.
This commit is contained in:
Vanessa Ezekowitz 2014-07-04 10:36:06 -04:00
parent f28cedf837
commit bd14eca7ad

View File

@ -1644,35 +1644,86 @@ minetest.register_craft({
} }
}) })
for b4 = 0,1 do local painting_patterns = {
for b3 = 0,1 do [1] = { { "brown", "red", "brown" },
for b2 = 0,1 do { "dark_green", "red", "green" } },
for b1 = 0,1 do
for b0 = 0,1 do
local i = b0 + b1*2 + b2*4 + b3*8 + b4*16 [2] = { { "green", "yellow", "green" },
{ "green", "yellow", "green" } },
if i > 0 and i < 21 then [3] = { { "green", "pink", "green" },
{ "brown", "pink", "brown" } },
local dyebits = { [4] = { { "black", "orange", "grey" },
[0] = "dye:black", { "dark_green", "orange", "orange" } },
[1] = "dye:white"
[5] = { { "blue", "orange", "yellow" },
{ "green", "red", "brown" } },
[6] = { { "green", "red", "orange" },
{ "orange", "yellow", "green" } },
[7] = { { "blue", "dark_green", "dark_green" },
{ "green", "grey", "green" } },
[8] = { { "blue", "blue", "blue" },
{ "green", "green", "green" } },
[9] = { { "blue", "blue", "dark_green" },
{ "green", "grey", "dark_green" } },
[10] = { { "green", "white", "green" },
{ "dark_green", "white", "dark_green" } },
[11] = { { "blue", "white", "blue" },
{ "blue", "grey", "dark_green" } },
[12] = { { "green", "green", "green" },
{ "grey", "grey", "green" } },
[13] = { { "blue", "blue", "grey" },
{ "dark_green", "white", "white" } },
[14] = { { "red", "yellow", "blue" },
{ "blue", "green", "violet" } },
[15] = { { "blue", "yellow", "blue" },
{ "black", "black", "black" } },
[16] = { { "red", "orange", "blue" },
{ "black", "dark_grey", "grey" } },
[17] = { { "orange", "yellow", "orange" },
{ "black", "black", "black" } },
[18] = { { "grey", "dark_green", "grey" },
{ "white", "white", "white" } },
[19] = { { "white", "brown", "green" },
{ "green", "brown", "brown" } },
[20] = { { "blue", "blue", "blue" },
{ "red", "brown", "grey" } }
} }
for i,recipe in pairs(painting_patterns) do
local item1 = "dye:"..recipe[1][1]
local item2 = "dye:"..recipe[1][2]
local item3 = "dye:"..recipe[1][3]
local item4 = "dye:"..recipe[2][1]
local item5 = "dye:"..recipe[2][2]
local item6 = "dye:"..recipe[2][3]
minetest.register_craft({ minetest.register_craft({
output = "homedecor:painting_"..i, output = "homedecor:painting_"..i,
recipe = { recipe = {
{ "", dyebits[b4], dyebits[b3] }, { item1, item2, item3 },
{ dyebits[b2], dyebits[b1], dyebits[b0] }, { item4, item5, item6 },
{"", "homedecor:blank_canvas", "" } {"", "homedecor:blank_canvas", "" }
} }
}) })
end end
end
end
end
end
end
-- more misc stuff here -- more misc stuff here