2014-08-09 13:23:19 +00:00
|
|
|
local hole = {}
|
|
|
|
|
|
|
|
hole.types = {
|
|
|
|
{"stonewall", "Stonewall", "castle_stonewall", "castle:stonewall"},
|
2016-04-14 21:51:06 -07:00
|
|
|
{"cobble", "Cobble", "default_cobble", "default:cobble"},
|
|
|
|
{"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"},
|
|
|
|
{"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"},
|
|
|
|
{"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"},
|
|
|
|
{"stone", "Stone", "default_stone", "default:stone"},
|
|
|
|
{"sandstone", "Sandstone", "default_sandstone", "default:sandstone"},
|
|
|
|
{"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"},
|
2014-08-09 13:23:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, row in ipairs(hole.types) do
|
|
|
|
local name = row[1]
|
|
|
|
local desc = row[2]
|
|
|
|
local tile = row[3]
|
|
|
|
local craft_material = row[4]
|
|
|
|
-- Node Definition
|
|
|
|
minetest.register_node("castle:hole_"..name, {
|
2016-04-14 21:51:06 -07:00
|
|
|
drawtype = "nodebox",
|
2014-08-09 13:23:19 +00:00
|
|
|
description = desc.." Murder Hole",
|
|
|
|
tiles = {tile..".png"},
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_defaults(),
|
2016-04-14 21:51:06 -07:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2014-08-09 13:23:19 +00:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2016-04-14 21:51:06 -07:00
|
|
|
{-8/16,-8/16,-8/16,-4/16,8/16,8/16},
|
|
|
|
{4/16,-8/16,-8/16,8/16,8/16,8/16},
|
|
|
|
{-4/16,-8/16,-8/16,4/16,8/16,-4/16},
|
|
|
|
{-4/16,-8/16,8/16,4/16,8/16,4/16},
|
2014-08-09 13:23:19 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2016-04-14 21:51:06 -07:00
|
|
|
|
2014-08-09 13:23:19 +00:00
|
|
|
if craft_material then
|
|
|
|
--Choose craft material
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "castle:hole_"..name.." 4",
|
|
|
|
recipe = {
|
|
|
|
{"",craft_material, "" },
|
|
|
|
{craft_material,"", craft_material},
|
|
|
|
{"",craft_material, ""} },
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|