2016-03-17 01:21:08 -07:00
|
|
|
local node_picketb = {
|
|
|
|
description = "Picket Fence",
|
2015-04-19 09:39:33 -07:00
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {
|
2016-03-17 01:21:08 -07:00
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
},
|
2015-04-19 09:39:33 -07:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
sunlight_propogates = true,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2016-03-16 05:24:27 -07:00
|
|
|
{-0.5, -0.5, 0.25, -0.4375, 0.1875, 0.4375},
|
|
|
|
{0.4375, -0.5, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.2187, -0.5, 0.4375, -0.0313, 0.375, 0.5},
|
|
|
|
{0.0312, -0.5, 0.4375, 0.2187, 0.375, 0.5},
|
|
|
|
{0.2812, -0.5, 0.4375, 0.4687, 0.375, 0.5},
|
|
|
|
{-0.4687, -0.5, 0.4375, -0.2812, 0.375, 0.5},
|
|
|
|
{-0.5, 0.125, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.5, -0.375, 0.25, 0.5, -0.3125, 0.4375},
|
2015-04-19 09:39:33 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,0.25,0.5,0.5,0.5},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
groups = {choppy = 2, flammable = 1},
|
2015-04-19 09:39:33 -07:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
minetest.register_node("myfences:picketb_wood", node_picketb)
|
2015-04-19 09:39:33 -07:00
|
|
|
|
2016-03-17 01:21:08 -07:00
|
|
|
local node_picket = {
|
|
|
|
description = "Picket Fence",
|
2015-04-19 09:39:33 -07:00
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {
|
2016-03-17 01:21:08 -07:00
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
},
|
2015-04-19 09:39:33 -07:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
sunlight_propogates = true,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
2016-03-16 05:24:27 -07:00
|
|
|
{-0.5, -0.5, 0.25, -0.4375, 0.1875, 0.4375},
|
|
|
|
{0.4375, -0.5, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.2187, -0.5, 0.4375, -0.0313, 0.375, 0.5},
|
|
|
|
{0.0312, -0.5, 0.4375, 0.2187, 0.375, 0.5},
|
|
|
|
{0.2812, -0.5, 0.4375, 0.4687, 0.375, 0.5},
|
|
|
|
{-0.4687, -0.5, 0.4375, -0.2812, 0.375, 0.5},
|
|
|
|
{-0.5, 0.125, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.5, -0.375, 0.25, 0.5, -0.3125, 0.4375},
|
|
|
|
{-0.4375, 0.375, 0.4375, -0.3125, 0.4375, 0.5},
|
|
|
|
{-0.1875, 0.375, 0.4375, -0.0625, 0.4375, 0.5},
|
|
|
|
{0.0625, 0.375, 0.4375, 0.1875, 0.4375, 0.5},
|
|
|
|
{0.3125, 0.375, 0.4375, 0.4375, 0.4375, 0.5},
|
|
|
|
{-0.4087, 0.4375, 0.4375, -0.3437, 0.5, 0.5},
|
|
|
|
{-0.1562, 0.4375, 0.4375, -0.0937, 0.5, 0.5},
|
|
|
|
{0.0948, 0.4375, 0.4375, 0.1563, 0.5, 0.5},
|
|
|
|
{0.3448, 0.4375, 0.4375, 0.4063, 0.5, 0.5},
|
2015-04-19 09:39:33 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,0.25,0.5,0.5,0.5},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
groups = {choppy = 2, flammable = 1},
|
2015-04-19 09:39:33 -07:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
minetest.register_node("myfences:picket_wood", node_picket)
|
2015-04-19 09:39:33 -07:00
|
|
|
|
2016-03-17 01:21:08 -07:00
|
|
|
local node_picket_corner = {
|
|
|
|
description = "Picket Fence Corner",
|
2016-03-16 05:24:27 -07:00
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {
|
2016-03-17 01:21:08 -07:00
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
},
|
2016-03-16 05:24:27 -07:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
sunlight_propogates = true,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.25, -0.4375, 0.1875, 0.4375},
|
|
|
|
{0.4375, -0.5, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.2187, -0.5, 0.4375, -0.0313, 0.375, 0.5},
|
|
|
|
{0.0312, -0.5, 0.4375, 0.2187, 0.375, 0.5},
|
|
|
|
{0.2812, -0.5, 0.4375, 0.4687, 0.375, 0.5},
|
|
|
|
{-0.4687, -0.5, 0.4375, -0.2812, 0.375, 0.5},
|
|
|
|
{-0.5, 0.125, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.5, -0.375, 0.25, 0.5, -0.3125, 0.4375},
|
|
|
|
{-0.4375, 0.375, 0.4375, -0.3125, 0.4375, 0.5},
|
|
|
|
{-0.1875, 0.375, 0.4375, -0.0625, 0.4375, 0.5},
|
|
|
|
{0.0625, 0.375, 0.4375, 0.1875, 0.4375, 0.5},
|
|
|
|
{0.3125, 0.375, 0.4375, 0.4375, 0.4375, 0.5},
|
|
|
|
{-0.4087, 0.4375, 0.4375, -0.3437, 0.5, 0.5},
|
|
|
|
{-0.1562, 0.4375, 0.4375, -0.0937, 0.5, 0.5},
|
|
|
|
{0.0948, 0.4375, 0.4375, 0.1563, 0.5, 0.5},
|
|
|
|
{0.3448, 0.4375, 0.4375, 0.4063, 0.5, 0.5},
|
|
|
|
|
|
|
|
{0.25, -0.5, 0.4375, 0.4375, 0.1875, 0.5},
|
|
|
|
{0.25, -0.5, -0.5, 0.4375, 0.1875, -0.4375},
|
|
|
|
{0.4375, -0.5, 0.0313, 0.5, 0.375, 0.2187},
|
|
|
|
{0.4375, -0.5, -0.2187, 0.5, 0.375, -0.0312},
|
|
|
|
{0.4375, -0.5, -0.4687, 0.5, 0.375, -0.2812},
|
|
|
|
{0.4375, -0.5, 0.2812, 0.5, 0.375, 0.4687},
|
|
|
|
{0.25, 0.125, -0.5, 0.4375, 0.1875, 0.5},
|
|
|
|
{0.25, -0.375, -0.5, 0.4375, -0.3125, 0.5},
|
|
|
|
{0.4375, 0.375, 0.3125, 0.5, 0.4375, 0.4375},
|
|
|
|
{0.4375, 0.375, 0.0625, 0.5, 0.4375, 0.1875},
|
|
|
|
{0.4375, 0.375, -0.1875, 0.5, 0.4375, -0.0625},
|
|
|
|
{0.4375, 0.375, -0.4375, 0.5, 0.4375, -0.3125},
|
|
|
|
{0.4375, 0.4375, 0.3437, 0.5, 0.5, 0.4087},
|
|
|
|
{0.4375, 0.4375, 0.0937, 0.5, 0.5, 0.1562},
|
|
|
|
{0.4375, 0.4375, -0.1563, 0.5, 0.5, -0.0948},
|
|
|
|
{0.4375, 0.4375, -0.4063, 0.5, 0.5, -0.3448},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,0.25,0.5,0.5,0.5},
|
|
|
|
{0.25,-0.5,-0.5,0.5,0.5,0.5},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
groups = {choppy = 2, flammable = 1},
|
2016-03-16 05:24:27 -07:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
minetest.register_node("myfences:picket_corner_wood", node_picket_corner)
|
|
|
|
|
|
|
|
local node_picketb_corner = {
|
|
|
|
description = "Picket Fence Corner",
|
2016-03-16 05:24:27 -07:00
|
|
|
drawtype = "nodebox",
|
|
|
|
tiles = {
|
2016-03-17 01:21:08 -07:00
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
"myfences_wood.png^[transformR90",
|
|
|
|
},
|
2016-03-16 05:24:27 -07:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
sunlight_propogates = true,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, 0.25, -0.4375, 0.1875, 0.4375},
|
|
|
|
{0.4375, -0.5, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.2187, -0.5, 0.4375, -0.0313, 0.375, 0.5},
|
|
|
|
{0.0312, -0.5, 0.4375, 0.2187, 0.375, 0.5},
|
|
|
|
{0.2812, -0.5, 0.4375, 0.4687, 0.375, 0.5},
|
|
|
|
{-0.4687, -0.5, 0.4375, -0.2812, 0.375, 0.5},
|
|
|
|
{-0.5, 0.125, 0.25, 0.5, 0.1875, 0.4375},
|
|
|
|
{-0.5, -0.375, 0.25, 0.5, -0.3125, 0.4375},
|
|
|
|
|
|
|
|
{0.25, -0.5, 0.4375, 0.4375, 0.1875, 0.5},
|
|
|
|
{0.25, -0.5, -0.5, 0.4375, 0.1875, -0.4375},
|
|
|
|
{0.4375, -0.5, 0.0313, 0.5, 0.375, 0.2187},
|
|
|
|
{0.4375, -0.5, -0.2187, 0.5, 0.375, -0.0312},
|
|
|
|
{0.4375, -0.5, -0.4687, 0.5, 0.375, -0.2812},
|
|
|
|
{0.4375, -0.5, 0.2812, 0.5, 0.375, 0.4687},
|
|
|
|
{0.25, 0.125, -0.5, 0.4375, 0.1875, 0.5},
|
|
|
|
{0.25, -0.375, -0.5, 0.4375, -0.3125, 0.5},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,0.25,0.5,0.5,0.5},
|
|
|
|
{0.25,-0.5,-0.5,0.5,0.5,0.5},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
},
|
|
|
|
groups = {choppy = 2, flammable = 1},
|
2016-03-16 05:24:27 -07:00
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
|
|
|
minetest.register_node("myfences:picketb_corner_wood", node_picketb_corner)
|
|
|
|
|
|
|
|
for _, entry in ipairs(myfences.colors) do
|
|
|
|
local color = entry[1]
|
|
|
|
local desc = entry[2]
|
|
|
|
local stain = entry[3]
|
|
|
|
|
|
|
|
local tiles = {
|
|
|
|
"myfences_wood.png"..stain,
|
|
|
|
"myfences_wood.png"..stain,
|
|
|
|
"myfences_wood.png^[transformR90"..stain,
|
|
|
|
"myfences_wood.png^[transformR90"..stain,
|
|
|
|
"myfences_wood.png^[transformR90"..stain,
|
|
|
|
"myfences_wood.png^[transformR90"..stain,
|
|
|
|
}
|
|
|
|
|
|
|
|
local node = table.copy(node_picketb)
|
|
|
|
node.description = desc.." Picket Fence"
|
|
|
|
node.tiles = tiles
|
|
|
|
node.groups.not_in_creative_inventory = 1
|
|
|
|
minetest.register_node("myfences:picketb_wood_"..color, node)
|
|
|
|
|
|
|
|
node = table.copy(node_picketb)
|
|
|
|
node.description = desc.." Picket Fence"
|
|
|
|
node.tiles = tiles
|
|
|
|
node.groups.not_in_creative_inventory = 1
|
|
|
|
minetest.register_node("myfences:picket_wood_"..color, node)
|
|
|
|
|
|
|
|
node = table.copy(node_picket_corner)
|
|
|
|
node.description = desc.." Picket Fence Corner"
|
|
|
|
node.tiles = tiles
|
|
|
|
node.groups.not_in_creative_inventory = 1
|
|
|
|
minetest.register_node("myfences:picket_corner_wood_"..color, node)
|
|
|
|
|
|
|
|
node = table.copy(node_picketb_corner)
|
|
|
|
node.description = desc.." Picket Fence Corner"
|
|
|
|
node.tiles = tiles
|
|
|
|
node.groups.not_in_creative_inventory = 1
|
|
|
|
minetest.register_node("myfences:picketb_corner_wood_"..color, node)
|
2015-04-19 09:39:33 -07:00
|
|
|
end
|
2016-03-17 01:21:08 -07:00
|
|
|
|
2016-03-16 11:13:00 -07:00
|
|
|
minetest.register_craft({
|
2016-03-17 01:21:08 -07:00
|
|
|
output = "myfences:picket_wood",
|
2016-03-16 11:13:00 -07:00
|
|
|
recipe = {
|
|
|
|
{"","myfences:board",""},
|
|
|
|
{"myfences:board","myfences:board","myfences:board"},
|
|
|
|
{"myfences:board","myfences:board","myfences:board"},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
2016-03-16 11:13:00 -07:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
2016-03-17 01:21:08 -07:00
|
|
|
output = "myfences:picketb_wood",
|
2016-03-16 11:13:00 -07:00
|
|
|
recipe = {
|
|
|
|
{"","",""},
|
|
|
|
{"myfences:board","myfences:board","myfences:board"},
|
|
|
|
{"myfences:board","myfences:board","myfences:board"},
|
2016-03-17 01:21:08 -07:00
|
|
|
}
|
2016-03-16 11:13:00 -07:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2016-03-17 01:21:08 -07:00
|
|
|
output = "myfences:picket_corner_wood",
|
|
|
|
recipe = {"myfences:picket_wood","myfences:picket_wood"},
|
2016-03-16 11:13:00 -07:00
|
|
|
})
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
2016-03-17 01:21:08 -07:00
|
|
|
output = "myfences:picketb_corner_wood",
|
|
|
|
recipe = {"myfences:picketb_wood","myfences:picketb_wood"},
|
2016-03-16 11:13:00 -07:00
|
|
|
})
|
2016-03-17 01:21:08 -07:00
|
|
|
|