2014-06-10 08:51:12 -07:00
|
|
|
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",
|
2014-06-10 18:02:47 -07:00
|
|
|
tiles = { "colorcubes_"..c.."1.png" },
|
2014-06-10 08:51:12 -07:00
|
|
|
groups = { dig_immediate = 2 },
|
|
|
|
sounds = { footstep = { name = "colorcubes_block_footstep", gain = 0.5 } }
|
|
|
|
}
|
2014-06-10 18:46:14 -07:00
|
|
|
local nodedef_window = {
|
|
|
|
description = h.." abstract window block",
|
|
|
|
tiles = { "colorcubes_"..c.."_window.png" },
|
|
|
|
groups = { dig_immediate = 2 },
|
|
|
|
use_texture_alpha = true,
|
|
|
|
drawtype = "glasslike",
|
|
|
|
paramtype = "light",
|
|
|
|
}
|
2014-06-10 08:51:12 -07:00
|
|
|
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 } }
|
|
|
|
}
|
2014-06-10 18:02:47 -07:00
|
|
|
minetest.register_node("colorcubes:"..c.."_single", nodedef1)
|
2014-06-10 18:46:14 -07:00
|
|
|
minetest.register_node("colorcubes:"..c.."_window", nodedef_window)
|
2014-06-10 08:51:12 -07:00
|
|
|
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
|