75 lines
2.3 KiB
Lua
75 lines
2.3 KiB
Lua
PyuTestCore.make_colored_blocks = function(name, desc, color)
|
|
PyuTestCore.make_building_blocks(name.."_wool", desc.." Wool", {"wool.png"}, color or "white")
|
|
PyuTestCore.make_building_blocks(name.."_terracotta", desc .. " Terracotta", {
|
|
"terracotta.png"
|
|
}, color or "white", {
|
|
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
|
})
|
|
|
|
PyuTestCore.make_item(name.."_dye", desc.." Dye", {}, "dye.png", {
|
|
color = color or "white"
|
|
})
|
|
|
|
|
|
minetest.register_craft({
|
|
output = name.."_wool_block",
|
|
type = "shapeless",
|
|
recipe = {
|
|
"pyutest_core:white_wool_block",
|
|
name.."_dye"
|
|
}
|
|
})
|
|
|
|
minetest.register_craft({
|
|
output = name.."_terracotta_block",
|
|
type = "shapeless",
|
|
recipe = {
|
|
"pyutest_core:white_terracotta_block",
|
|
name.."_dye"
|
|
}
|
|
})
|
|
end
|
|
|
|
PyuTestCore.make_colored_blocks("pyutest_core:white", "White", "white")
|
|
minetest.register_craft({
|
|
output = "pyutest_core:white_wool_block 4",
|
|
recipe = {
|
|
{"pyutest_core:string", "pyutest_core:string"},
|
|
{"pyutest_core:string", "pyutest_core:string"}
|
|
}
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "cooking",
|
|
output = "pyutest_core:white_terracotta_block",
|
|
recipe = "pyutest_core:clay_block"
|
|
})
|
|
|
|
local colors = {
|
|
white = {"White", nil},
|
|
black = {"Black", "black"},
|
|
brown = {"Brown", "saddlebrown"},
|
|
red = {"Red", "indianred"},
|
|
orange = {"Orange", "coral"},
|
|
yellow = {"Yellow", "khaki"},
|
|
green = {"Green", "olivedrab"},
|
|
blue = {"Blue", "cornflowerblue"},
|
|
purple = {"Purple", "plum"},
|
|
pink = {"Pink", "pink"}
|
|
}
|
|
|
|
for k, v in pairs(colors) do
|
|
PyuTestCore.make_colored_blocks("pyutest_core:"..k, v[1], v[2])
|
|
end
|
|
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:black", "Black", "black")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:brown", "Brown", "saddlebrown")
|
|
--
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:red", "Red", "red")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:orange", "Orange", "orange")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:yellow", "Yellow", "yellow")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:green", "Green", "green")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:blue", "Blue", "blue")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:purple", "Purple", "purple")
|
|
-- PyuTestCore.make_colored_blocks("pyutest_core:pink", "Pink", "pink")
|