Add a lot of new coloured blocks!
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
PyuTest.registered_colored_blocks = {}
|
||||
PyuTest.make_colored_blocks = function(name, desc, color)
|
||||
PyuTest.make_building_blocks(name.."_wool", desc.." Wool", {
|
||||
PyuTest.make_building_blocks(name .. "_wool", desc .. " Wool", {
|
||||
"pyutest-wool.png"
|
||||
}, color, {
|
||||
wooly = PyuTest.BLOCK_NORMAL,
|
||||
colored = 1
|
||||
})
|
||||
|
||||
PyuTest.make_building_blocks(name.."_terracotta", desc .. " Terracotta", {
|
||||
PyuTest.make_building_blocks(name .. "_terracotta", desc .. " Terracotta", {
|
||||
"pyutest-terracotta.png"
|
||||
}, color, {
|
||||
cracky = PyuTest.BLOCK_NORMAL,
|
||||
colored = 1
|
||||
})
|
||||
|
||||
PyuTest.make_building_blocks(name.."_concrete", desc .. " Concrete", {
|
||||
PyuTest.make_building_blocks(name .. "_concrete", desc .. " Concrete", {
|
||||
"pyutest-concrete.png"
|
||||
}, color, {
|
||||
cracky = PyuTest.BLOCK_NORMAL,
|
||||
colored = 1
|
||||
})
|
||||
|
||||
PyuTest.make_item(name.."_dye", desc.." Dye", {
|
||||
PyuTest.make_item(name .. "_dye", desc .. " Dye", {
|
||||
colored = 1,
|
||||
dye = 1
|
||||
}, "pyutest-dye.png", {
|
||||
@@ -29,36 +29,36 @@ PyuTest.make_colored_blocks = function(name, desc, color)
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_wool_block",
|
||||
output = name .. "_wool_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_wool:white_wool_block",
|
||||
name.."_dye"
|
||||
name .. "_dye"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_terracotta_block",
|
||||
output = name .. "_terracotta_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_wool:white_terracotta_block",
|
||||
name.."_dye"
|
||||
name .. "_dye"
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = name.."_concrete_block",
|
||||
output = name .. "_concrete_block",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"pyutest_wool:white_concrete_block",
|
||||
name.."_dye"
|
||||
name .. "_dye"
|
||||
}
|
||||
})
|
||||
|
||||
PyuTest.registered_colored_blocks[name] = {
|
||||
wool = name.."_wool",
|
||||
terracotta = name.."_terracotta",
|
||||
dye = name.."_dye"
|
||||
wool = name .. "_wool",
|
||||
terracotta = name .. "_terracotta",
|
||||
dye = name .. "_dye"
|
||||
}
|
||||
end
|
||||
|
||||
@@ -66,8 +66,8 @@ PyuTest.make_colored_blocks("pyutest_wool:white", "White", "white")
|
||||
minetest.register_craft({
|
||||
output = "pyutest_wool:white_wool_block 4",
|
||||
recipe = {
|
||||
{"pyutest_tools:string", "pyutest_tools:string"},
|
||||
{"pyutest_tools:string", "pyutest_tools:string"}
|
||||
{ "pyutest_tools:string", "pyutest_tools:string" },
|
||||
{ "pyutest_tools:string", "pyutest_tools:string" }
|
||||
}
|
||||
})
|
||||
|
||||
@@ -86,32 +86,47 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
PyuTest.COLORS = {
|
||||
white = {"White", nil},
|
||||
black = {"Black", {r = 32, g = 32, b = 32}},
|
||||
brown = {"Brown", "saddlebrown"},
|
||||
red = {"Red", "indianred"},
|
||||
orange = {"Orange", "coral"},
|
||||
yellow = {"Yellow", "khaki"},
|
||||
green = {"Green", "olivedrab"},
|
||||
blue = {"Blue", "cornflowerblue"},
|
||||
purple = {"Purple", "plum"},
|
||||
pink = {"Pink", "pink"},
|
||||
lime = {"Lime", "#64C044"}
|
||||
white = { "White", nil },
|
||||
black = { "Black", { r = 32, g = 32, b = 32 } },
|
||||
brown = { "Brown", "#9F8170" },
|
||||
|
||||
red = { "Red", "red" },
|
||||
orange = { "Orange", "orange" },
|
||||
yellow = { "Yellow", "yellow" },
|
||||
green = { "Green", "green" },
|
||||
blue = { "Blue", "blue" },
|
||||
purple = { "Purple", "purple" },
|
||||
pink = { "Pink", "pink" },
|
||||
|
||||
lime = { "Lime", "#64C044" },
|
||||
cyan = { "Cyan", "cyan" },
|
||||
magenta = { "Magenta", "magenta" },
|
||||
chartreuse = { "Chartreuse", "#7FFF00" },
|
||||
ultramarine = { "Ultramarine", "#120A8F" },
|
||||
violet = { "Violet", "#8000FF" },
|
||||
rose = { "Rose", "#FF0080" },
|
||||
chestnut = { "Chestnut", "#954535" },
|
||||
turquoise = { "Turquoise", "#40E0D0" },
|
||||
teal = { "Teal", "#008080" },
|
||||
mauve = { "Mauve", "#E0B0FF" },
|
||||
mint = { "Mint", "#3EB489" },
|
||||
ecru = { "Ecru", "#C2B280" },
|
||||
khaki = { "Khaki", "khaki" },
|
||||
}
|
||||
|
||||
for k, v in pairs(PyuTest.COLORS) do
|
||||
PyuTest.make_colored_blocks("pyutest_wool:"..k, v[1], v[2])
|
||||
PyuTest.make_colored_blocks("pyutest_wool:" .. k, v[1], v[2])
|
||||
end
|
||||
|
||||
for k, v in pairs(PyuTest.COLORS) do
|
||||
if v[2] ~= nil then
|
||||
local id = "pyutest_wool:"..k.."_stained_glass"
|
||||
local id = "pyutest_wool:" .. k .. "_stained_glass"
|
||||
|
||||
PyuTest.make_node(id, v[1] .. " Stained Glass", {
|
||||
cracky = PyuTest.BLOCK_FAST,
|
||||
glass = 1,
|
||||
colored = 1
|
||||
}, {"pyutest-glass.png", "pyutest-glass-overlay.png"}, {
|
||||
}, { "pyutest-glass.png", "pyutest-glass-overlay.png" }, {
|
||||
drawtype = "glasslike_framed",
|
||||
color = v[2],
|
||||
paramtype = "light",
|
||||
@@ -122,7 +137,7 @@ for k, v in pairs(PyuTest.COLORS) do
|
||||
output = id,
|
||||
recipe = {
|
||||
"pyutest_blocks:glass",
|
||||
"pyutest_wool:"..k.."_dye"
|
||||
"pyutest_wool:" .. k .. "_dye"
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
Reference in New Issue
Block a user