38 lines
1.4 KiB
Lua
38 lines
1.4 KiB
Lua
|
local cc = {}
|
||
|
cc.colors = { "yellow", "orange", "brown", "red", "rose", "violet", "magenta", "blue", "cyan", "green", "dark_green", "white", "light_gray", "dark_gray", "black" }
|
||
|
cc.human_colors = { "yellow", "orange", "brown", "red", "rose", "violet", "magenta", "blue", "cyan", "green", "dark green", "white", "light gray", "dark gray", "black" }
|
||
|
|
||
|
for i=1,#cc.colors do
|
||
|
local c = cc.colors[i]
|
||
|
local h = cc.human_colors[i]
|
||
|
local nodedef1 = {
|
||
|
description = h.." abstract block",
|
||
|
tiles = { "colorcubes_"..c..".png" },
|
||
|
groups = { dig_immediate = 2 },
|
||
|
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } }
|
||
|
}
|
||
|
local nodedef4 = {
|
||
|
description = h.." tiled abstract block",
|
||
|
tiles = { "colorcubes_"..c.."4.png" },
|
||
|
groups = { dig_immediate = 2 },
|
||
|
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } }
|
||
|
}
|
||
|
local nodedef_inward = {
|
||
|
description = h.." inward abstract block",
|
||
|
tiles = { "colorcubes_"..c.."_inward.png" },
|
||
|
groups = { dig_immediate = 2 },
|
||
|
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } }
|
||
|
}
|
||
|
minetest.register_node("colorcubes:"..c, nodedef1)
|
||
|
minetest.register_node("colorcubes:"..c.."_tiled", nodedef4)
|
||
|
minetest.register_node("colorcubes:"..c.."_inward", nodedef_inward)
|
||
|
|
||
|
minetest.register_craft({
|
||
|
output = "colorcubes:"..c.."_tiled 4",
|
||
|
recipe = {
|
||
|
{"colorcubes:"..c, "colorcubes:"..c },
|
||
|
{"colorcubes:"..c, "colorcubes:"..c },
|
||
|
},
|
||
|
})
|
||
|
end
|