First Upload

master
DonBatman 2015-04-04 11:39:25 -07:00
commit d50b2de62f
71 changed files with 4411 additions and 0 deletions

466
beam.lua Normal file
View File

@ -0,0 +1,466 @@
minetest.register_node("mydeck:beam", {
description = "Beam",
tiles = {
"mydeck_hwood.png^[transformR90",
"mydeck_hwood.png^[transformR90",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.5, 0.125, 0, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local nodea = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if nodeu == "mydeck:post" then
minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=node.param2})
end
if nodea == "mydeck:joists" then
minetest.set_node(pos,{name = "air"})
end
if nodea == "mydeck:joists" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam", param2=node.param2})
end
if nodea == "mydeck:joists_side" then
minetest.set_node(pos,{name = "air"})
end
if nodea == "mydeck:joists_side" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam", param2=node.param2})
end
if nodea == "mydeck:deck_joists" then
minetest.set_node(pos,{name = "air"})
end
if nodea == "mydeck:deck_joists" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
end
if nodea == "mydeck:deck_joists_side" then
minetest.set_node(pos,{name = "air"})
end
if nodea == "mydeck:deck_joists_side" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
end
if nodeu == "mydeck:pile_wpost" then
minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:beam_wbracket", {
description = "Beam with Bracket",
tiles = {
"mydeck_beambt.png",
"mydeck_beambb.png",
"mydeck_beambs.png",
"mydeck_beambs.png",
"mydeck_beambf.png",
"mydeck_beambf.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:beam",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.5, 0.125, 0, 0.5},
{0.125, -0.5, -0.125, 0.1875, -0.1875, 0.125},
{-0.1875, -0.5, -0.125, -0.125, -0.1875, 0.125},
}
}
})
minetest.register_node("mydeck:joists_beam", {
description = "Deck Joists with Beam",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_beam_wbracket", {
description = "Deck Joists with Beam and Bracket",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_beambf.png",
"mydeck_beambf.png",
"mydeck_beambs.png",
"mydeck_beambs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_side_beam", {
description = "Deck Joists side with Beam",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_side_beam_wbracket", {
description = "Deck Joists side with Beam and Bracket",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_beambf.png",
"mydeck_beambf.png",
"mydeck_beambs.png",
"mydeck_beambs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_beam", {
description = "Deck Joists with Beam",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_beam_wbracket", {
description = "Deck Joists with Beam with Bracket",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_beambf.png",
"mydeck_beambf.png",
"mydeck_beambs.png",
"mydeck_beambs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_side_beam", {
description = "Deck Joists side with Beam",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_side_beam_wbracket", {
description = "Deck Joists side with Beam with Bracket",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_beambf.png",
"mydeck_beambf.png",
"mydeck_beambs.png",
"mydeck_beambs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})

433
beam_stained.lua Normal file
View File

@ -0,0 +1,433 @@
minetest.register_node("mydeck:beams", {
description = "Beam",
tiles = {
"mydeck_hwoods.png^[transformR90",
"mydeck_hwoods.png^[transformR90",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:beam",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.5, 0.125, 0, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:post" then
minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:beam_wbrackets", {
description = "Beam with Bracket",
tiles = {
"mydeck_beambts.png",
"mydeck_beambbs.png",
"mydeck_beambss.png",
"mydeck_beambss.png",
"mydeck_beambfs.png",
"mydeck_beambfs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:beam",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.5, -0.5, 0.125, 0, 0.5},
{0.125, -0.5, -0.125, 0.1875, -0.1875, 0.125},
{-0.1875, -0.5, -0.125, -0.125, -0.1875, 0.125},
}
}
})
minetest.register_node("mydeck:joists_beams", {
description = "Deck Joists with Beam",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_beam_wbrackets", {
description = "Deck Joists with Beam and Bracket",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_beambfs.png",
"mydeck_beambfs.png",
"mydeck_beambss.png",
"mydeck_beambss.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_side_beams", {
description = "Deck Joists side with Beam",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:joists_side_beam_wbrackets", {
description = "Deck Joists side with Beam and Bracket",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_beambfs.png",
"mydeck_beambfs.png",
"mydeck_beambss.png",
"mydeck_beambss.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_beams", {
description = "Deck Joists with Beam",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_beam_wbrackets", {
description = "Deck Joists with Beam with Bracket",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_beambfs.png",
"mydeck_beambfs.png",
"mydeck_beambss.png",
"mydeck_beambss.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_side_beams", {
description = "Deck Joists side with Beam",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})
minetest.register_node("mydeck:deck_joists_side_beam_wbrackets", {
description = "Deck Joists side with Beam with Bracket",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_beambfs.png",
"mydeck_beambfs.png",
"mydeck_beambss.png",
"mydeck_beambss.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 3,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
{
items = {"mydeck:beam"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
{-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875},
{-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.125, 0.5, 0, 0.125},
}
},
})

389
deckboards.lua Normal file
View File

@ -0,0 +1,389 @@
minetest.register_node("mydeck:deck_boards", {
description = "Deck Boards",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.375, 0.2725, 0.5, -0.5, 0.5},
{-0.5, -0.375, 0.0225, 0.5, -0.5, 0.25},
{-0.5, -0.375, -0.2275, 0.5, -0.5, 0},
{-0.5, -0.375, -0.4775, 0.5, -0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.375, -0.5, 0.5, -0.5, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu == "mydeck:joists" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=node.param2})
end
if nodeu == "mydeck:joists_side" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_side" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=node.param2})
end
if nodeu == "mydeck:joists_beam" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=node.param2})
end
if nodeu == "mydeck:joists_side_beam" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=node.param2})
end
if nodeu == "mydeck:joists_end" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_end" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=node.param2})
end
if nodeu == "mydeck:joists_side_end" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_side_end" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=node.param2})
end
if nodeu == "mydeck:joists_endr" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_endr" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=node.param2})
end
if nodeu == "mydeck:joists_side_endr" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_side_endr" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=node.param2})
end
if nodeu == "mydeck:joists_beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=node.param2})
end
if nodeu == "mydeck:joists_side_beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if nodeu == "mydeck:joists_side_beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=node.param2})
end
end,
})
minetest.register_node("mydeck:deck_joists", {
description = "Deck Joists",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_side", {
description = "Deck Joists Side",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_end", {
description = "Deck Joists with End Plate",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_end"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.375, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_side_end", {
description = "Deck Joists Side with End Plate",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side_end"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_endr", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_endr"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_side_endr", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side_endr"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.5, 0.5, 0.375, 0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})

381
deckboards_stained.lua Normal file
View File

@ -0,0 +1,381 @@
minetest.register_node("mydeck:deck_boardss", {
description = "Deck Boards Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:deck_boards",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.375, 0.2725, 0.5, -0.5, 0.5},
{-0.5, -0.375, 0.0225, 0.5, -0.5, 0.25},
{-0.5, -0.375, -0.2275, 0.5, -0.5, 0},
{-0.5, -0.375, -0.4775, 0.5, -0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.375, -0.5, 0.5, -0.5, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:joists" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_side" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_side" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_side_beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_end" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_end" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_side_end" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_side_end" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_endr" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_endr" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_side_endr" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_side_endr" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:joists_side_beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:joists_side_beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end,
})
minetest.register_node("mydeck:deck_joistss", {
description = "Deck Joists Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_sides", {
description = "Deck Joists Side Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_ends", {
description = "Deck Joists with End Plate Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_end"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.375, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_side_ends", {
description = "Deck Joists Side with End Plate Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side_end"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_endrs", {
description = "Deck Joists Side with Wall Plate stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_endr"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:deck_joists_side_endrs", {
description = "Deck Joists Side with Wall Plate Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:deck_boards"},
},
{
items = {"mydeck:joists_side_endr"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.5, 0.5, 0.375, 0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5},
{-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25},
{-0.5, 0.375, -0.2275, 0.5, 0.5, 0},
{-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
}
},
})

17
init.lua Normal file
View File

@ -0,0 +1,17 @@
dofile(minetest.get_modpath("mydeck").."/joists.lua")
dofile(minetest.get_modpath("mydeck").."/deckboards.lua")
dofile(minetest.get_modpath("mydeck").."/piles.lua")
dofile(minetest.get_modpath("mydeck").."/rail.lua")
dofile(minetest.get_modpath("mydeck").."/machine.lua")
dofile(minetest.get_modpath("mydeck").."/beam.lua")
dofile(minetest.get_modpath("mydeck").."/stairs.lua")
dofile(minetest.get_modpath("mydeck").."/stain.lua")
dofile(minetest.get_modpath("mydeck").."/lattice.lua")
dofile(minetest.get_modpath("mydeck").."/rail_stained.lua")
dofile(minetest.get_modpath("mydeck").."/deckboards_stained.lua")
dofile(minetest.get_modpath("mydeck").."/piles_stained.lua")
dofile(minetest.get_modpath("mydeck").."/beam_stained.lua")
dofile(minetest.get_modpath("mydeck").."/joists_stained.lua")
dofile(minetest.get_modpath("mydeck").."/stairs_stained.lua")
dofile(minetest.get_modpath("mydeck").."/lattice_stained.lua")

220
joists.lua Normal file
View File

@ -0,0 +1,220 @@
minetest.register_node("mydeck:joists", {
description = "Deck Joists",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:joists_side", {
description = "Deck Joists Side",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:joists_end", {
description = "Deck Joists with End Plate",
tiles = {
"mydeck_joistend.png^[transformR180",
"mydeck_joistend.png",
"mydeck_joistend.png^[transformR90",
"mydeck_joistend.png^[transformR270",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.375, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_side_end", {
description = "Deck Joists Side with End Plate",
tiles = {
"mydeck_joistend.png",
"mydeck_joistend.png^[transformR180",
"mydeck_joistend.png^[transformR270",
"mydeck_joistend.png^[transformR90",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_endr", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_joistend.png",
"mydeck_joistend.png^[transformR180",
"mydeck_joistend.png^[transformR270",
"mydeck_joistend.png^[transformR90",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_side_endr", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_joistend.png^[transformR180",
"mydeck_joistend.png",
"mydeck_joistend.png^[transformR90",
"mydeck_joistend.png^[transformR270",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.5, 0.5, 0.375, 0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})

226
joists_stained.lua Normal file
View File

@ -0,0 +1,226 @@
minetest.register_node("mydeck:joistss", {
description = "Deck Joists",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:joists_sides", {
description = "Deck Joists Side",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists_side",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if node == "mydeck:beam_wbracket" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam_wbracket" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if node == "mydeck:beam" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})
minetest.register_node("mydeck:joists_ends", {
description = "Deck Joists with End Plate",
tiles = {
"mydeck_joistends.png^[transformR180",
"mydeck_joistends.png",
"mydeck_joistends.png^[transformR90",
"mydeck_joistends.png^[transformR270",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists_end",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.375, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_side_ends", {
description = "Deck Joists Side with End Plate",
tiles = {
"mydeck_joistends.png",
"mydeck_joistends.png^[transformR180",
"mydeck_joistends.png^[transformR270",
"mydeck_joistends.png^[transformR90",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists_side_end",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_endrs", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_joistends.png",
"mydeck_joistends.png^[transformR180",
"mydeck_joistends.png^[transformR270",
"mydeck_joistends.png^[transformR90",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists_endr",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, -0.5, 0.5, 0.375, -0.375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})
minetest.register_node("mydeck:joists_side_endrs", {
description = "Deck Joists Side with Wall Plate",
tiles = {
"mydeck_joistends.png^[transformR180",
"mydeck_joistends.png",
"mydeck_joistends.png^[transformR90",
"mydeck_joistends.png^[transformR270",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:joists_side_endr",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, -0.375, 0.375, 0.5},
{0, 0, -0.5, 0.125, 0.375, 0.5},
{-0.5, 0, 0.5, 0.5, 0.375, 0.375},
{0.375, 0, -0.5, 0.5, 0.375, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, 0, -0.5, 0.5, 0.375, 0.5},
}
},
})

45
lattice.lua Normal file
View File

@ -0,0 +1,45 @@
minetest.register_node("mydeck:lattice", {
description = "Lattice",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, 0.4375, -0.375, 0.5, 0.5}, -- NodeBox1
{-0.3125, -0.5, 0.4375, -0.25, 0.5, 0.5}, -- NodeBox2
{-0.1875, -0.5, 0.4375, -0.125, 0.5, 0.5}, -- NodeBox3
{-0.0625, -0.5, 0.4375, 0, 0.5, 0.5}, -- NodeBox4
{0.0625, -0.5, 0.4375, 0.125, 0.5, 0.5}, -- NodeBox5
{0.1875, -0.5, 0.4375, 0.25, 0.5, 0.5}, -- NodeBox6
{0.3125, -0.5, 0.4375, 0.375, 0.5, 0.5}, -- NodeBox7
{0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox8
{-0.5, -0.5, 0.375, 0.5, -0.4375, 0.4375}, -- NodeBox9
{-0.5, -0.375, 0.375, 0.5, -0.3125, 0.4375}, -- NodeBox10
{-0.5, -0.25, 0.375, 0.5, -0.1875, 0.4375}, -- NodeBox11
{-0.5, -0.125, 0.375, 0.5, -0.0625, 0.4375}, -- NodeBox12
{-0.5, 0, 0.375, 0.5, 0.0625, 0.4375}, -- NodeBox13
{-0.5, 0.125, 0.375, 0.5, 0.1875, 0.4375}, -- NodeBox14
{-0.5, 0.25, 0.375, 0.5, 0.3125, 0.4375}, -- NodeBox15
{-0.5, 0.375, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox16
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.5, 0.5, 0.5, 0.375},
}
},
})

46
lattice_stained.lua Normal file
View File

@ -0,0 +1,46 @@
minetest.register_node("mydeck:lattices", {
description = "Lattice",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:lattice",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, 0.4375, -0.375, 0.5, 0.5}, -- NodeBox1
{-0.3125, -0.5, 0.4375, -0.25, 0.5, 0.5}, -- NodeBox2
{-0.1875, -0.5, 0.4375, -0.125, 0.5, 0.5}, -- NodeBox3
{-0.0625, -0.5, 0.4375, 0, 0.5, 0.5}, -- NodeBox4
{0.0625, -0.5, 0.4375, 0.125, 0.5, 0.5}, -- NodeBox5
{0.1875, -0.5, 0.4375, 0.25, 0.5, 0.5}, -- NodeBox6
{0.3125, -0.5, 0.4375, 0.375, 0.5, 0.5}, -- NodeBox7
{0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox8
{-0.5, -0.5, 0.375, 0.5, -0.4375, 0.4375}, -- NodeBox9
{-0.5, -0.375, 0.375, 0.5, -0.3125, 0.4375}, -- NodeBox10
{-0.5, -0.25, 0.375, 0.5, -0.1875, 0.4375}, -- NodeBox11
{-0.5, -0.125, 0.375, 0.5, -0.0625, 0.4375}, -- NodeBox12
{-0.5, 0, 0.375, 0.5, 0.0625, 0.4375}, -- NodeBox13
{-0.5, 0.125, 0.375, 0.5, 0.1875, 0.4375}, -- NodeBox14
{-0.5, 0.25, 0.375, 0.5, 0.3125, 0.4375}, -- NodeBox15
{-0.5, 0.375, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox16
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.5, 0.5, 0.5, 0.375},
}
},
})

355
machine.lua Normal file
View File

@ -0,0 +1,355 @@
local material = {}
local shape = {}
local make_ok = {}
local anzahl = {}
minetest.register_node("mydeck:machine", {
description = "Deck Machine",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_machs.png",
"mydeck_machs.png^[transformFX",
"mydeck_machf.png",
"mydeck_machf.png",
},
inventory_image = "mydeck_mach_inv.png",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 1.5, -0.375, -0.25},
{-0.5, -0.5, -0.1875, 1.5, -0.375, 0.125},
{-0.5, -0.5, 0.1875, 1.5, -0.375, 0.5},
{-0.375, -0.375, -0.5, -0.25, -0.3125, 0.5},
{0.25, -0.375, -0.5, 0.375, -0.3125, 0.5},
{-0.5, -0.3125, -0.5, 1.5, -0.1875, -0.25},
{-0.5, -0.3125, -0.1875, 1.5, -0.1875, 0.125},
{-0.5, -0.3125, 0.1875, 1.5, -0.1875, 0.5},
{-0.375, -0.1875, -0.5, -0.25, -0.125, 0.5},
{0.25, -0.1875, -0.5, 0.375, -0.125, 0.5},
{-0.5, -0.125, -0.5, 1.5, 0, -0.25},
{-0.5, -0.125, -0.1875 , 1.5, 0, 0.125},
{-0.5, -0.125, 0.1875, 1.5, 0, 0.5},
{1.25, -0.1875, -0.5, 1.375, -0.125, 0.5},
{1.375, -0.375, -0.5, 1.25, -0.3125, 0.5},
}
},
after_place_node = function(pos, placer)
local meta = minetest.env:get_meta(pos);
meta:set_string("owner", (placer:get_player_name() or ""));
meta:set_string("infotext", "Deck Machine (owned by " .. (placer:get_player_name() or "") .. ")");
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("ingot") then
return false
elseif not inv:is_empty("res") then
return false
end
return true
end,
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_string("formspec", "invsize[10,11;]"..
"background[-0.15,-0.25;10.40,11.75;mydeck_background.png]"..
"label[4,5;Wood:]"..
"list[current_name;ingot;4,5.5;1,1;]"..
"label[6.5,5;Output:]"..
"list[current_name;res;6.5,5.5;1,1;]"..
"label[0,0;Choose Deck Parts:]"..
"label[0.5,0.5;Joists]"..
"image_button[0.5,1;1,1;mydeck_mach1.png;joists; ]"..
"image_button[1.5,1;1,1;mydeck_mach2.png;joistside; ]"..
"image_button[2.5,1;1,1;mydeck_mach3.png;joistend; ]"..
"image_button[3.5,1;1,1;mydeck_mach4.png;joistsidend; ]"..
"image_button[4.5,1;1,1;mydeck_mach5.png;joistendr; ]"..
"image_button[5.5,1;1,1;mydeck_mach6.png;joistsidendr; ]"..
"image_button[7,1;1,1;mydeck_mach20.png;brush; ]"..
"label[0.5,2;Pile Post Beam and Stairs]"..
"image_button[0.5,2.5;1,1;mydeck_mach7.png;pile; ]"..
"image_button[1.5,2.5;1,1;mydeck_mach8.png;post; ]"..
"image_button[2.5,2.5;1,1;mydeck_mach9.png;beam; ]"..
"image_button[3.5,2.5;1,1;mydeck_mach14.png;stairs; ]"..
"image_button[4.5,2.5;1,1;mydeck_mach15.png;stairso; ]"..
"image_button[5.5,2.5;1,1;mydeck_mach16.png;stairsi; ]"..
"image_button[6.5,2.5;1,1;mydeck_mach17.png;sraill; ]"..
"image_button[7.5,2.5;1,1;mydeck_mach18.png;srailr; ]"..
"label[0.5,3.5;Deck Boards and Rail]"..
"image_button[0.5,4;1,1;mydeck_mach10.png;deckb; ]"..
"image_button[1.5,4;1,1;mydeck_mach11.png;rail; ]"..
"image_button[2.5,4;1,1;mydeck_mach12.png;railc; ]"..
"image_button[3.5,4;1,1;mydeck_mach13.png;railic; ]"..
"image_button[4.5,4;1,1;mydeck_mach19.png;lattice; ]"..
"list[current_player;main;1,7;8,4;]")
meta:set_string("infotext", "Deck Machine")
local inv = meta:get_inventory()
inv:set_size("ingot", 1)
inv:set_size("res", 1)
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
if fields["joists"]
or fields["joistside"]
or fields["joistend"]
or fields["joistsidend"]
or fields["joistendr"]
or fields["joistsidendr"]
or fields["brush"]
or fields["pile"]
or fields["post"]
or fields["beam"]
or fields["stairs"]
or fields["stairso"]
or fields["stairsi"]
or fields["sraill"]
or fields["srailr"]
or fields["deckb"]
or fields["rail"]
or fields["railc"]
or fields["railic"]
or fields["lattice"]
then
if fields["joists"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists"
if inv:is_empty("ingot") then
return
end
end
if fields["joistside"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side"
if inv:is_empty("ingot") then
return
end
end
if fields["joistend"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_end"
if inv:is_empty("ingot") then
return
end
end
if fields["joistsidend"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side_endr"
if inv:is_empty("ingot") then
return
end
end
if fields["joistendr"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_endr"
if inv:is_empty("ingot") then
return
end
end
if fields["joistsidendr"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side_end"
if inv:is_empty("ingot") then
return
end
end
if fields["brush"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:stain_brush"
if inv:is_empty("ingot") then
return
end
end
if fields["pile"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:pile"
if inv:is_empty("ingot") then
return
end
end
if fields["post"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:post"
if inv:is_empty("ingot") then
return
end
end
if fields["beam"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:beam"
if inv:is_empty("ingot") then
return
end
end
if fields["stairs"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs"
if inv:is_empty("ingot") then
return
end
end
if fields["stairso"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs_ocorner"
if inv:is_empty("ingot") then
return
end
end
if fields["stairsi"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs_icorner"
if inv:is_empty("ingot") then
return
end
end
if fields["sraill"] then
make_ok = "0"
anzahl = "3"
shape = "mydeck:stairs_raill"
if inv:is_empty("ingot") then
return
end
end
if fields["srailr"] then
make_ok = "0"
anzahl = "3"
shape = "mydeck:stairs_railr"
if inv:is_empty("ingot") then
return
end
end
if fields["deckb"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:deck_boards"
if inv:is_empty("ingot") then
return
end
end
if fields["rail"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:rail"
if inv:is_empty("ingot") then
return
end
end
if fields["railc"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:rail_corner"
if inv:is_empty("ingot") then
return
end
end
if fields["railic"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:rail_icorner"
if inv:is_empty("ingot") then
return
end
end
if fields["lattice"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:lattice"
if inv:is_empty("ingot") then
return
end
end
local ingotstack = inv:get_stack("ingot", 1)
local resstack = inv:get_stack("res", 1)
----------------------------------------------------------------------------------
--register nodes
----------------------------------------------------------------------------------
if ingotstack:get_name()=="default:wood" then
make_ok = "1"
end
----------------------------------------------------------------------
if make_ok == "1" then
local give = {}
for i = 0, anzahl-1 do
give[i+1]=inv:add_item("res",shape)
end
ingotstack:take_item()
inv:set_stack("ingot",1,ingotstack)
end
end
end
})
--Craft
minetest.register_craft({
output = 'mydeck:machine',
recipe = {
{'', '', ''},
{'default:wood', 'default:tree', 'default:wood'},
{'default:tree', "default:wood", 'default:tree'},
},
})

344
machine.lua~ Normal file
View File

@ -0,0 +1,344 @@
local material = {}
local shape = {}
local make_ok = {}
local anzahl = {}
minetest.register_node("mydeck:machine", {
description = "Deck Machine",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_machs.png",
"mydeck_machs.png^[transformFX",
"mydeck_machf.png",
"mydeck_machf.png",
},
inventory_image = "mydeck_mach_inv.png",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 1.5, -0.375, -0.25},
{-0.5, -0.5, -0.1875, 1.5, -0.375, 0.125},
{-0.5, -0.5, 0.1875, 1.5, -0.375, 0.5},
{-0.375, -0.375, -0.5, -0.25, -0.3125, 0.5},
{0.25, -0.375, -0.5, 0.375, -0.3125, 0.5},
{-0.5, -0.3125, -0.5, 1.5, -0.1875, -0.25},
{-0.5, -0.3125, -0.1875, 1.5, -0.1875, 0.125},
{-0.5, -0.3125, 0.1875, 1.5, -0.1875, 0.5},
{-0.375, -0.1875, -0.5, -0.25, -0.125, 0.5},
{0.25, -0.1875, -0.5, 0.375, -0.125, 0.5},
{-0.5, -0.125, -0.5, 1.5, 0, -0.25},
{-0.5, -0.125, -0.1875 , 1.5, 0, 0.125},
{-0.5, -0.125, 0.1875, 1.5, 0, 0.5},
{1.25, -0.1875, -0.5, 1.375, -0.125, 0.5},
{1.375, -0.375, -0.5, 1.25, -0.3125, 0.5},
}
},
after_place_node = function(pos, placer)
local meta = minetest.env:get_meta(pos);
meta:set_string("owner", (placer:get_player_name() or ""));
meta:set_string("infotext", "Deck Machine (owned by " .. (placer:get_player_name() or "") .. ")");
end,
can_dig = function(pos,player)
local meta = minetest.env:get_meta(pos);
local inv = meta:get_inventory()
if not inv:is_empty("ingot") then
return false
elseif not inv:is_empty("res") then
return false
end
return true
end,
on_construct = function(pos)
local meta = minetest.env:get_meta(pos)
meta:set_string("formspec", "invsize[10,11;]"..
"background[-0.15,-0.25;10.40,11.75;mydeck_background.png]"..
"label[4,5;Wood:]"..
"list[current_name;ingot;4,5.5;1,1;]"..
"label[6.5,5;Output:]"..
"list[current_name;res;6.5,5.5;1,1;]"..
"label[0,0;Choose Deck Parts:]"..
"label[0.5,0.5;Joists]"..
"image_button[0.5,1;1,1;mydeck_mach1.png;joists; ]"..
"image_button[1.5,1;1,1;mydeck_mach2.png;joistside; ]"..
"image_button[2.5,1;1,1;mydeck_mach3.png;joistend; ]"..
"image_button[3.5,1;1,1;mydeck_mach4.png;joistsidend; ]"..
"image_button[4.5,1;1,1;mydeck_mach5.png;joistendr; ]"..
"image_button[5.5,1;1,1;mydeck_mach6.png;joistsidendr; ]"..
"label[0.5,2;Pile Post Beam and Stairs]"..
"image_button[0.5,2.5;1,1;mydeck_mach7.png;pile; ]"..
"image_button[1.5,2.5;1,1;mydeck_mach8.png;post; ]"..
"image_button[2.5,2.5;1,1;mydeck_mach9.png;beam; ]"..
"image_button[3.5,2.5;1,1;mydeck_mach14.png;stairs; ]"..
"image_button[4.5,2.5;1,1;mydeck_mach15.png;stairso; ]"..
"image_button[5.5,2.5;1,1;mydeck_mach16.png;stairsi; ]"..
"image_button[6.5,2.5;1,1;mydeck_mach17.png;sraill; ]"..
"image_button[7.5,2.5;1,1;mydeck_mach18.png;srailr; ]"..
"label[0.5,3.5;Deck Boards and Rail]"..
"image_button[0.5,4;1,1;mydeck_mach10.png;deckb; ]"..
"image_button[1.5,4;1,1;mydeck_mach11.png;rail; ]"..
"image_button[2.5,4;1,1;mydeck_mach12.png;railc; ]"..
"image_button[3.5,4;1,1;mydeck_mach13.png;railic; ]"..
"image_button[4.5,4;1,1;mydeck_mach19.png;lattice; ]"..
"list[current_player;main;1,7;8,4;]")
meta:set_string("infotext", "Deck Machine")
local inv = meta:get_inventory()
inv:set_size("ingot", 1)
inv:set_size("res", 1)
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.env:get_meta(pos)
local inv = meta:get_inventory()
if fields["joists"]
or fields["joistside"]
or fields["joistend"]
or fields["joistsidend"]
or fields["joistendr"]
or fields["joistsidendr"]
or fields["pile"]
or fields["post"]
or fields["beam"]
or fields["stairs"]
or fields["stairso"]
or fields["stairsi"]
or fields["sraill"]
or fields["srailr"]
or fields["deckb"]
or fields["rail"]
or fields["railc"]
or fields["railic"]
or fields["lattice"]
then
if fields["joists"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists"
if inv:is_empty("ingot") then
return
end
end
if fields["joistside"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side"
if inv:is_empty("ingot") then
return
end
end
if fields["joistend"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_end"
if inv:is_empty("ingot") then
return
end
end
if fields["joistsidend"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side_endr"
if inv:is_empty("ingot") then
return
end
end
if fields["joistendr"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_endr"
if inv:is_empty("ingot") then
return
end
end
if fields["joistsidendr"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:joists_side_end"
if inv:is_empty("ingot") then
return
end
end
if fields["pile"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:pile"
if inv:is_empty("ingot") then
return
end
end
if fields["post"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:post"
if inv:is_empty("ingot") then
return
end
end
if fields["beam"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:beam"
if inv:is_empty("ingot") then
return
end
end
if fields["stairs"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs"
if inv:is_empty("ingot") then
return
end
end
if fields["stairso"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs_ocorner"
if inv:is_empty("ingot") then
return
end
end
if fields["stairsi"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:stairs_icorner"
if inv:is_empty("ingot") then
return
end
end
if fields["sraill"] then
make_ok = "0"
anzahl = "3"
shape = "mydeck:stairs_raill"
if inv:is_empty("ingot") then
return
end
end
if fields["srailr"] then
make_ok = "0"
anzahl = "3"
shape = "mydeck:stairs_railr"
if inv:is_empty("ingot") then
return
end
end
if fields["deckb"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:deck_boards"
if inv:is_empty("ingot") then
return
end
end
if fields["rail"] then
make_ok = "0"
anzahl = "2"
shape = "mydeck:rail"
if inv:is_empty("ingot") then
return
end
end
if fields["railc"] then
make_ok = "0"
anzahl = "1"
shape = "mydeck:rail_corner"
if inv:is_empty("ingot") then
return
end
end
if fields["railic"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:rail_icorner"
if inv:is_empty("ingot") then
return
end
end
if fields["lattice"] then
make_ok = "0"
anzahl = "4"
shape = "mydeck:lattice"
if inv:is_empty("ingot") then
return
end
end
local ingotstack = inv:get_stack("ingot", 1)
local resstack = inv:get_stack("res", 1)
----------------------------------------------------------------------------------
--register nodes
----------------------------------------------------------------------------------
if ingotstack:get_name()=="default:wood" then
make_ok = "1"
end
----------------------------------------------------------------------
if make_ok == "1" then
local give = {}
for i = 0, anzahl-1 do
give[i+1]=inv:add_item("res",shape)
end
ingotstack:take_item()
inv:set_stack("ingot",1,ingotstack)
end
end
end
})
--Craft
minetest.register_craft({
output = 'mydeck:machine',
recipe = {
{'', '', ''},
{'default:wood', 'default:tree', 'default:wood'},
{'default:tree', "default:wood", 'default:tree'},
},
})

133
piles.lua Normal file
View File

@ -0,0 +1,133 @@
minetest.register_node("mydeck:pile", {
description = "Pile",
tiles = {
"mydeck_pilet.png^[transformR90",
"mydeck_concrete.png",
"mydeck_piles.png",
"mydeck_piles.png",
"mydeck_pilef.png",
"mydeck_pilef.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375},
{-0.375, -0.5, -0.375, 0.375, -0.25, 0.375},
{-0.25, -0.25, -0.1875, -0.1875, 0.25, 0.1875},
{-0.1875, -0.5, -0.1875, 0.1875, -0.1875, 0.1875},
{0.1875, -0.5, -0.1875, 0.25, 0.25, 0.1875},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
}
}
})
minetest.register_node("mydeck:pile_wpost", {
description = "Pile",
tiles = {
"mydeck_piletp.png^[transformR90",
"mydeck_concrete.png",
"mydeck_piles.png",
"mydeck_piles.png",
"mydeck_pilef.png",
"mydeck_pilef.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:pile"},
},
{
items = {"mydeck:post"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375},
{-0.375, -0.5, -0.375, 0.375, -0.25, 0.375},
{-0.25, -0.25, -0.1875, -0.1875, 0.25, 0.1875},
{-0.1875, -0.5, -0.1875, 0.1875, -0.1875, 0.1875},
{0.1875, -0.5, -0.1875, 0.25, 0.25, 0.1875},
{-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875},
}
}
})
minetest.register_node("mydeck:post", {
description = "Post",
tiles = {
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_vwood.png",
"mydeck_vwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local nodep = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
local nodeo = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z})
local nodeu = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if node == "mydeck:pile" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:pile" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:pile_wpost", param2=nodep.param2})
end
if nodeu == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:beam_wbracket", param2=node.param2})
end
if nodeu == "mydeck:joists_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=nodeo.param2})
end
if nodeu == "mydeck:joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=nodeo.param2})
end
if nodeu == "mydeck:deck_joists_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=nodeo.param2})
end
if nodeu == "mydeck:deck_joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=nodeo.param2})
end
end
})

100
piles_stained.lua Normal file
View File

@ -0,0 +1,100 @@
minetest.register_node("mydeck:pile_wposts", {
description = "Pile",
tiles = {
"mydeck_piletps.png^[transformR90",
"mydeck_concrete.png",
"mydeck_piless.png",
"mydeck_piless.png",
"mydeck_pilefs.png",
"mydeck_pilefs.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = {
max_items = 2,
items = {
{
items = {"mydeck:pile"},
},
{
items = {"mydeck:post"},
},
}
},
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375},
{-0.375, -0.5, -0.375, 0.375, -0.25, 0.375},
{-0.25, -0.25, -0.1875, -0.1875, 0.25, 0.1875},
{-0.1875, -0.5, -0.1875, 0.1875, -0.1875, 0.1875},
{0.1875, -0.5, -0.1875, 0.25, 0.25, 0.1875},
{-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875},
}
}
})
minetest.register_node("mydeck:posts", {
description = "Post",
tiles = {
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_vwoods.png",
"mydeck_vwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:post",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
local nodeu = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name
if node == "mydeck:pile" then
minetest.set_node(pos,{name = "air"})
end
if node == "mydeck:pile" then
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:pile_wpost", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if nodeu == "mydeck:beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if nodeu == "mydeck:joists_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if nodeu == "mydeck:joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if nodeu == "mydeck:deck_joists_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
if nodeu == "mydeck:deck_joists_side_beam" then
minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())})
end
end
})

123
rail.lua Normal file
View File

@ -0,0 +1,123 @@
minetest.register_node("mydeck:rail", {
description = "Deck Rail",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.5, 0.5},
{-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5},
{-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375},
{-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375},
{0.3125, -0.25, 0.375, 0.375, 0.375, 0.4375},
{0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375},
{0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375},
{-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
}
}
})
minetest.register_node("mydeck:rail_corner", {
description = "Deck Rail Corner",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{0.3125, -0.5, 0.3125, 0.5, 0.5, 0.5},
{-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5},
{-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375},
{-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375},
{0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375},
{0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375},
{-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375},
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375},
{0.3125, -0.375, -0.5, 0.5, -0.25, 0.5},
{0.25, 0.375, -0.5, 0.5, 0.5, 0.5},
{0.375, -0.25, -0.375, 0.4375, 0.375, -0.3125},
{0.375, -0.25, -0.25, 0.4375, 0.375, -0.1875},
{0.375, -0.25, -0.125, 0.4375, 0.375, -0.0625},
{0.375, -0.25, 0.1875, 0.4375, 0.375, 0.25},
{0.375, -0.25, 0.0625, 0.4375, 0.375, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
{0.3125, -0.5, -0.5, 0.5, 0.5, 0.5},
}
}
})
minetest.register_node("mydeck:rail_icorner", {
description = "Deck Rail Corner",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
"mydeck_rwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375},
{0.25, 0.375, 0.25, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375},
{0.25, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
})

126
rail_stained.lua Normal file
View File

@ -0,0 +1,126 @@
minetest.register_node("mydeck:rails", {
description = "Deck Rail Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:rail",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.5, 0.5},
{-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5},
{-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375},
{-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375},
{0.3125, -0.25, 0.375, 0.375, 0.375, 0.4375},
{0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375},
{0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375},
{-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
}
}
})
minetest.register_node("mydeck:rail_corners", {
description = "Deck Rail Corner Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:rail_corner",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{0.3125, -0.5, 0.3125, 0.5, 0.5, 0.5},
{-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5},
{-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375},
{-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375},
{0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375},
{0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375},
{-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375},
{0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375},
{0.3125, -0.375, -0.5, 0.5, -0.25, 0.5},
{0.25, 0.375, -0.5, 0.5, 0.5, 0.5},
{0.375, -0.25, -0.375, 0.4375, 0.375, -0.3125},
{0.375, -0.25, -0.25, 0.4375, 0.375, -0.1875},
{0.375, -0.25, -0.125, 0.4375, 0.375, -0.0625},
{0.375, -0.25, 0.1875, 0.4375, 0.375, 0.25},
{0.375, -0.25, 0.0625, 0.4375, 0.375, 0.125},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5},
{0.3125, -0.5, -0.5, 0.5, 0.5, 0.5},
}
}
})
minetest.register_node("mydeck:rail_icorners", {
description = "Deck Rail Corner Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
"mydeck_rwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
drop = "mydeck:rail_icorner",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375},
{0.25, 0.375, 0.25, 0.5, 0.5, 0.5},
}
},
selection_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5},
{0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375},
{0.25, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
})

201
stain.lua Normal file
View File

@ -0,0 +1,201 @@
minetest.register_craftitem("mydeck:stain_brush",{
description = "Stain Brush",
inventory_image = "mydeck_brush.png",
})
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_boards" then
minetest.set_node(pos,{name = "mydeck:deck_boardss", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists" then
minetest.set_node(pos,{name = "mydeck:deck_joistss", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_side" then
minetest.set_node(pos,{name = "mydeck:deck_joists_sides", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_end" then
minetest.set_node(pos,{name = "mydeck:deck_joists_ends", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_side_end" then
minetest.set_node(pos,{name = "mydeck:deck_joists_side_ends", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_endr" then
minetest.set_node(pos,{name = "mydeck:deck_joists_endrs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_side_endr" then
minetest.set_node(pos,{name = "mydeck:deck_joists_side_endrs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:rail" then
minetest.set_node(pos,{name = "mydeck:rails", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:rail_corner" then
minetest.set_node(pos,{name = "mydeck:rail_corners", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:rail_icorner" then
minetest.set_node(pos,{name = "mydeck:rail_icorners", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:beam" then
minetest.set_node(pos,{name = "mydeck:beams", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:beam_wbracket" then
minetest.set_node(pos,{name = "mydeck:beam_wbrackets", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_beam" then
minetest.set_node(pos,{name = "mydeck:joists_beams", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_beam_wbracket" then
minetest.set_node(pos,{name = "mydeck:joists_beam_wbrackets", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_side_beam" then
minetest.set_node(pos,{name = "mydeck:joists_side_beams", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_side_beam_wbracket" then
minetest.set_node(pos,{name = "mydeck:joists_side_beam_wbrackets", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_beam" then
minetest.set_node(pos,{name = "mydeck:deck_joists_beams", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_beam_wbracket" then
minetest.set_node(pos,{name = "mydeck:deck_joists_beam_wbrackets", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_side_beam" then
minetest.set_node(pos,{name = "mydeck:deck_joists_side_beams", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:deck_joists_side_beam_wbracket" then
minetest.set_node(pos,{name = "mydeck:deck_joists_side_beam_wbrackets", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists" then
minetest.set_node(pos,{name = "mydeck:joistss", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_side" then
minetest.set_node(pos,{name = "mydeck:joists_sides", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_end" then
minetest.set_node(pos,{name = "mydeck:joists_ends", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_side_end" then
minetest.set_node(pos,{name = "mydeck:joists_side_ends", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_endr" then
minetest.set_node(pos,{name = "mydeck:joists_endrs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:joists_side_endr" then
minetest.set_node(pos,{name = "mydeck:joists_side_endrs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:pile" then
minetest.set_node(pos,{name = "mydeck:piles", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:pile_wpost" then
minetest.set_node(pos,{name = "mydeck:pile_wposts", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:post" then
minetest.set_node(pos,{name = "mydeck:posts", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs" then
minetest.set_node(pos,{name = "mydeck:stairss", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairsb" then
minetest.set_node(pos,{name = "mydeck:stairsbs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs_ocorner" then
minetest.set_node(pos,{name = "mydeck:stairs_ocorners", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs_icorner" then
minetest.set_node(pos,{name = "mydeck:stairs_icorners", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs_icorner" then
minetest.set_node(pos,{name = "mydeck:stairs_icorners", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs_railr" then
minetest.set_node(pos,{name = "mydeck:stairs_railrs", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:stairs_raill" then
minetest.set_node(pos,{name = "mydeck:stairs_raills", param2=node.param2})
end
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
and node.name == "mydeck:lattice" then
minetest.set_node(pos,{name = "mydeck:lattices", param2=node.param2})
end
end)

401
stairs.lua Normal file
View File

@ -0,0 +1,401 @@
minetest.register_node("mydeck:stairs", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125},
{-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125},
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875},
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625},
{-0.375, -0.375, -0.125, -0.25, -0.25, 0},
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625},
{-0.375, -0.25, 0, -0.25, 0, 0.125},
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5},
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25},
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125},
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375},
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375},
{0.375, -0.5, -0.4375, 0.25, -0.25, -0.125},
{0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875},
{0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625},
{0.375, -0.375, -0.125, 0.25, -0.25, 0},
{0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625},
{0.375, -0.25, 0, 0.25, 0, 0.125},
{0.375, 0.125, 0.1875, 0.25, 0.375, 0.5},
{0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25},
{0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125},
{0.375, 0, 0.3125, 0.25, 0.375, 0.375},
{0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875},
{-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
}
},
-- after_place_node = function(pos, placer, itemstack, pointed_thing)
-- local nodedown = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
-- if nodedown == "air" then
-- minetest.set_node(pos,{name = "mydeck:stairsb", param2=minetest.dir_to_facedir(placer:get_look_dir())})
-- end
-- end
})
minetest.register_abm({
nodenames = {"mydeck:stairs"},
interval = 1,
chance = 1,
action = function(pos, node)
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu == "air" then
minetest.set_node(pos,{name = "mydeck:stairsb", param2 = node.param2})
end
end,
})
minetest.register_abm({
nodenames = {"mydeck:stairsb"},
interval = 1,
chance = 1,
action = function(pos, node)
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu ~= "air" then
minetest.set_node(pos,{name = "mydeck:stairs", param2 = node.param2})
end
end,
})
minetest.register_node("mydeck:stairsb", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125},
{-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125},
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875},
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625},
{-0.375, -0.375, -0.125, -0.25, -0.25, 0},
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625},
{-0.375, -0.25, 0, -0.25, 0, 0.125},
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5},
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25},
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125},
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375},
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375},
{0.375, -0.5, -0.4375, 0.25, -0.25, -0.125},
{0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875},
{0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625},
{0.375, -0.375, -0.125, 0.25, -0.25, 0},
{0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625},
{0.375, -0.25, 0, 0.25, 0, 0.125},
{0.375, 0.125, 0.1875, 0.25, 0.375, 0.5},
{0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25},
{0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125},
{0.375, 0, 0.3125, 0.25, 0.375, 0.375},
{0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375},
{-0.375, -0.5625, -0.4375, -0.25, -0.5, -0.1875 },
{-0.375, -0.625, -0.5, -0.25, -0.5625, -0.25 },
{-0.375, -0.6875, -0.5, -0.25, -0.5625, -0.3125 },
{-0.375, -0.75, -0.5, -0.25, -0.5625, -0.375 },
{-0.375, -0.8125, -0.5, -0.25, -0.5625, -0.4375 },
{0.375, -0.5625, -0.4375, 0.25, -0.5, -0.1875 },
{0.375, -0.625, -0.5, 0.25, -0.5625, -0.25 },
{0.375, -0.6875, -0.5, 0.25, -0.5625, -0.3125 },
{0.375, -0.75, -0.5, 0.25, -0.5625, -0.375 },
{0.375, -0.8125, -0.5, 0.25, -0.5625, -0.4375 },
{-0.5, -0.625, -0.5, 0.5, -0.5, -0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875},
{-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_ocorner", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125 },
{-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, -0.125, 0.5, 0.5 },
{0.125, -0.25, -0.5, 0.5, -0.125, 0.5},
{-0.1875, 0.0625, -0.1875, 0.1875, 0.1875, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 },
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 },
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 },
{-0.375, -0.375, -0.125, -0.25, -0.25, 0 },
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 },
{-0.375, -0.25, 0, -0.25, 0, 0.125 },
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 },
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 },
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 },
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375 },
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 },
{ 0.4375, -0.5, 0.375, 0.125, -0.25, 0.25 },
{ 0.125, -0.1875, 0.375, - 0.1875, 0.0625, 0.25 },
{ 0.125, -0.4375, 0.375, 0.0625, -0.1875, 0.25 },
{ 0.125, -0.375, 0.375, 0, -0.25, 0.25 },
{ 0.0625, -0.3125, 0.375, -0.0625, -0.1875, 0.25 },
{ 0 , -0.25, 0.375, -0.125, 0, 0.25 },
{-0.1875, 0.125, 0.375, -0.5, 0.375, 0.25 },
{-0.1875, -0.125, 0.375, -0.25, 0.1875, 0.25 },
{-0.25, -0.0625, 0.375, -0.3125, 0.25, 0.25 },
{-0.3125, 0, 0.375, -0.375, 0.375, 0.25 },
{-0.3125, 0.0625, 0.375, -0.4375, 0.3125, 0.25 },
{0.1875, -0.5, -0.1875, 0.4375, -0.125, -0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5},
{-0.5, -0.5, -0.1875, 0.1875, 0.1875, 0.5},
{-0.5, -0.5, 0.125, -0.125, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_icorner", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, -0.125, -0.125, -0.125 },
{-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.1875, 0.0625, -0.5, 0.1875, 0.1875, -0.1875},
{0.125, 0.375, -0.5, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 },
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 },
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 },
{-0.375, -0.375, -0.125, -0.25, -0.25, 0 },
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 },
{-0.375, -0.25, 0, -0.25, 0, 0.125 },
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 },
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 },
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 },
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375 },
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 },
{-0.4375, -0.5, -0.375, -0.125, -0.25, -0.25 },
{-0.125, -0.1875, -0.375, 0.1875, 0.0625, -0.25 },
{-0.125, -0.4375, -0.375, -0.0625, -0.1875, -0.25 },
{-0.125, -0.375, -0.375, 0, -0.25, -0.25 },
{-0.0625, -0.3125, -0.375, 0.0625, -0.1875, -0.25 },
{ 0 , -0.25, -0.375, 0.125, 0, -0.25 },
{ 0.1875, 0.125, -0.375, 0.5, 0.375, -0.25 },
{ 0.1875, -0.125, -0.375, 0.25, 0.1875, -0.25 },
{ 0.25, -0.0625, -0.375, 0.3125, 0.25, -0.25 },
{ 0.3125, 0, -0.375, 0.375, 0.375, -0.25 },
{ 0.3125, 0.0625, -0.375, 0.4375, 0.3125, -0.25 },
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.1875, -0.125, -0.1875 },
{-0.5, -0.5, -0.1875, 0.125, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
{-0.1875, -0.5, -0.5, 0.125, 0.1875, 0.125},
{0.125, -0.5, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_railr", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, -- NodeBox1
{0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5}, -- NodeBox1
{0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox3
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, -- NodeBox4
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, -- NodeBox5
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, -- NodeBox6
{0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875}, -- NodeBox7
{0.3125, 0, 0.0625, 0.5, 0.125, 0.125}, -- NodeBox8
{0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625}, -- NodeBox9
{0.3125, -0.125, -0.0625, 0.5, 0, 0}, -- NodeBox10
{0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625}, -- NodeBox11
{0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125}, -- NodeBox12
{0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875}, -- NodeBox13
{0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25}, -- NodeBox14
{0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125}, -- NodeBox15
{0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375}, -- NodeBox16
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375}, -- NodeBox17
}
},
selection_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, -0.5, 0.5, 0.5, 0.5 },
}
},
})
minetest.register_node("mydeck:stairs_raill", {
description = "Stairs",
tiles = {
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
"mydeck_hwood.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, -- NodeBox1
{-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5}, -- NodeBox1
{-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, -- NodeBox2
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, -- NodeBox3
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, -- NodeBox4
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, -- NodeBox5
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, -- NodeBox6
{-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875}, -- NodeBox7
{-0.3125, 0, 0.0625, -0.5, 0.125, 0.125}, -- NodeBox8
{-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625}, -- NodeBox9
{-0.3125, -0.125, -0.0625, -0.5, 0, 0}, -- NodeBox10
{-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625}, -- NodeBox11
{-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125}, -- NodeBox12
{-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875}, -- NodeBox13
{-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25}, -- NodeBox14
{-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125}, -- NodeBox15
{-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375}, -- NodeBox16
{-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375}, -- NodeBox17
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.5, -0.5, 0.5, 0.5 },
}
},
})

405
stairs_stained.lua Normal file
View File

@ -0,0 +1,405 @@
minetest.register_node("mydeck:stairss", {
description = "Stairs",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125},
{-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125},
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875},
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625},
{-0.375, -0.375, -0.125, -0.25, -0.25, 0},
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625},
{-0.375, -0.25, 0, -0.25, 0, 0.125},
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5},
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25},
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125},
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375},
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375},
{0.375, -0.5, -0.4375, 0.25, -0.25, -0.125},
{0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875},
{0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625},
{0.375, -0.375, -0.125, 0.25, -0.25, 0},
{0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625},
{0.375, -0.25, 0, 0.25, 0, 0.125},
{0.375, 0.125, 0.1875, 0.25, 0.375, 0.5},
{0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25},
{0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125},
{0.375, 0, 0.3125, 0.25, 0.375, 0.375},
{0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875},
{-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
}
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local nodedown = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
-- if nodedown == "air" then
minetest.set_node(pos,{name = "mydeck:stairsbs", param2=minetest.dir_to_facedir(placer:get_look_dir())})
-- end
end
})
minetest.register_abm({
nodenames = {"mydeck:stairss"},
interval = 1,
chance = 1,
action = function(pos, node)
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu == "air" then
minetest.set_node(pos,{name = "mydeck:stairsbs", param2 = node.param2})
end
end,
})
minetest.register_abm({
nodenames = {"mydeck:stairsbs"},
interval = 1,
chance = 1,
action = function(pos, node)
local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name
if nodeu ~= "air" then
minetest.set_node(pos,{name = "mydeck:stairss", param2 = node.param2})
end
end,
})
minetest.register_node("mydeck:stairsbs", {
description = "Stairs",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125},
{-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125},
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875},
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625},
{-0.375, -0.375, -0.125, -0.25, -0.25, 0},
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625},
{-0.375, -0.25, 0, -0.25, 0, 0.125},
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5},
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25},
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125},
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375},
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375},
{0.375, -0.5, -0.4375, 0.25, -0.25, -0.125},
{0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875},
{0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625},
{0.375, -0.375, -0.125, 0.25, -0.25, 0},
{0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625},
{0.375, -0.25, 0, 0.25, 0, 0.125},
{0.375, 0.125, 0.1875, 0.25, 0.375, 0.5},
{0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25},
{0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125},
{0.375, 0, 0.3125, 0.25, 0.375, 0.375},
{0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375},
{-0.375, -0.5625, -0.4375, -0.25, -0.5, -0.1875 },
{-0.375, -0.625, -0.5, -0.25, -0.5625, -0.25 },
{-0.375, -0.6875, -0.5, -0.25, -0.5625, -0.3125 },
{-0.375, -0.75, -0.5, -0.25, -0.5625, -0.375 },
{-0.375, -0.8125, -0.5, -0.25, -0.5625, -0.4375 },
{0.375, -0.5625, -0.4375, 0.25, -0.5, -0.1875 },
{0.375, -0.625, -0.5, 0.25, -0.5625, -0.25 },
{0.375, -0.6875, -0.5, 0.25, -0.5625, -0.3125 },
{0.375, -0.75, -0.5, 0.25, -0.5625, -0.375 },
{0.375, -0.8125, -0.5, 0.25, -0.5625, -0.4375 },
{-0.5, -0.625, -0.5, 0.5, -0.5, -0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875},
{-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_ocorners", {
description = "Stairs Outside Corner",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs_ocorner",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, -0.125, -0.125 },
{-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, -0.125, 0.5, 0.5 },
{0.125, -0.25, -0.5, 0.5, -0.125, 0.5},
{-0.1875, 0.0625, -0.1875, 0.1875, 0.1875, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 },
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 },
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 },
{-0.375, -0.375, -0.125, -0.25, -0.25, 0 },
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 },
{-0.375, -0.25, 0, -0.25, 0, 0.125 },
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 },
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 },
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 },
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375 },
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 },
{ 0.4375, -0.5, 0.375, 0.125, -0.25, 0.25 },
{ 0.125, -0.1875, 0.375, - 0.1875, 0.0625, 0.25 },
{ 0.125, -0.4375, 0.375, 0.0625, -0.1875, 0.25 },
{ 0.125, -0.375, 0.375, 0, -0.25, 0.25 },
{ 0.0625, -0.3125, 0.375, -0.0625, -0.1875, 0.25 },
{ 0 , -0.25, 0.375, -0.125, 0, 0.25 },
{-0.1875, 0.125, 0.375, -0.5, 0.375, 0.25 },
{-0.1875, -0.125, 0.375, -0.25, 0.1875, 0.25 },
{-0.25, -0.0625, 0.375, -0.3125, 0.25, 0.25 },
{-0.3125, 0, 0.375, -0.375, 0.375, 0.25 },
{-0.3125, 0.0625, 0.375, -0.4375, 0.3125, 0.25 },
{0.1875, -0.5, -0.1875, 0.4375, -0.125, -0.4375},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5},
{-0.5, -0.5, -0.1875, 0.1875, 0.1875, 0.5},
{-0.5, -0.5, 0.125, -0.125, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_icorners", {
description = "Stairs Inside Corner",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs_icorner",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, -0.125, -0.125, -0.125 },
{-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875},
{-0.5, 0.375, 0.125, 0.5, 0.5, 0.5},
{-0.1875, 0.0625, -0.5, 0.1875, 0.1875, -0.1875},
{0.125, 0.375, -0.5, 0.5, 0.5, 0.5},
{-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 },
{-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 },
{-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 },
{-0.375, -0.375, -0.125, -0.25, -0.25, 0 },
{-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 },
{-0.375, -0.25, 0, -0.25, 0, 0.125 },
{-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 },
{-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 },
{-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 },
{-0.375, 0, 0.3125, -0.25, 0.375, 0.375 },
{-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 },
{-0.4375, -0.5, -0.375, -0.125, -0.25, -0.25 },
{-0.125, -0.1875, -0.375, 0.1875, 0.0625, -0.25 },
{-0.125, -0.4375, -0.375, -0.0625, -0.1875, -0.25 },
{-0.125, -0.375, -0.375, 0, -0.25, -0.25 },
{-0.0625, -0.3125, -0.375, 0.0625, -0.1875, -0.25 },
{ 0 , -0.25, -0.375, 0.125, 0, -0.25 },
{ 0.1875, 0.125, -0.375, 0.5, 0.375, -0.25 },
{ 0.1875, -0.125, -0.375, 0.25, 0.1875, -0.25 },
{ 0.25, -0.0625, -0.375, 0.3125, 0.25, -0.25 },
{ 0.3125, 0, -0.375, 0.375, 0.375, -0.25 },
{ 0.3125, 0.0625, -0.375, 0.4375, 0.3125, -0.25 },
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.1875, -0.125, -0.1875 },
{-0.5, -0.5, -0.1875, 0.125, 0.1875, 0.125},
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
{-0.1875, -0.5, -0.5, 0.125, 0.1875, 0.125},
{0.125, -0.5, -0.5, 0.5, 0.5, 0.5},
}
},
})
minetest.register_node("mydeck:stairs_railrs", {
description = "Right Stairs Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs_railr",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, -- NodeBox1
{0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5}, -- NodeBox1
{0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox3
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, -- NodeBox4
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, -- NodeBox5
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, -- NodeBox6
{0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875}, -- NodeBox7
{0.3125, 0, 0.0625, 0.5, 0.125, 0.125}, -- NodeBox8
{0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625}, -- NodeBox9
{0.3125, -0.125, -0.0625, 0.5, 0, 0}, -- NodeBox10
{0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625}, -- NodeBox11
{0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125}, -- NodeBox12
{0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875}, -- NodeBox13
{0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25}, -- NodeBox14
{0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125}, -- NodeBox15
{0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375}, -- NodeBox16
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375}, -- NodeBox17
}
},
selection_box = {
type = "fixed",
fixed = {
{0.3125, -0.5, -0.5, 0.5, 0.5, 0.5 },
}
},
})
minetest.register_node("mydeck:stairs_raills", {
description = "Left Stairs Rail Stained",
tiles = {
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
"mydeck_hwoods.png",
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
drop = "mydeck:stairs_raill",
groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1},
node_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, -- NodeBox1
{-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5}, -- NodeBox1
{-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, -- NodeBox2
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, -- NodeBox3
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, -- NodeBox4
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, -- NodeBox5
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, -- NodeBox6
{-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875}, -- NodeBox7
{-0.3125, 0, 0.0625, -0.5, 0.125, 0.125}, -- NodeBox8
{-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625}, -- NodeBox9
{-0.3125, -0.125, -0.0625, -0.5, 0, 0}, -- NodeBox10
{-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625}, -- NodeBox11
{-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125}, -- NodeBox12
{-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875}, -- NodeBox13
{-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25}, -- NodeBox14
{-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125}, -- NodeBox15
{-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375}, -- NodeBox16
{-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375}, -- NodeBox17
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.3125, -0.5, -0.5, -0.5, 0.5, 0.5 },
}
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
textures/mydeck_beambb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

BIN
textures/mydeck_beambbs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

BIN
textures/mydeck_beambf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

BIN
textures/mydeck_beambfs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
textures/mydeck_beambs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

BIN
textures/mydeck_beambss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

BIN
textures/mydeck_beambt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

BIN
textures/mydeck_beambts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

BIN
textures/mydeck_brush.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

BIN
textures/mydeck_hwood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
textures/mydeck_hwoods.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

BIN
textures/mydeck_mach1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
textures/mydeck_mach10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 995 B

BIN
textures/mydeck_mach11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

BIN
textures/mydeck_mach12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
textures/mydeck_mach13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

BIN
textures/mydeck_mach14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
textures/mydeck_mach15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
textures/mydeck_mach16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
textures/mydeck_mach17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

BIN
textures/mydeck_mach18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

BIN
textures/mydeck_mach19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

BIN
textures/mydeck_mach2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
textures/mydeck_mach20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

BIN
textures/mydeck_mach3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
textures/mydeck_mach4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
textures/mydeck_mach5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
textures/mydeck_mach6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
textures/mydeck_mach7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
textures/mydeck_mach8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
textures/mydeck_mach9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
textures/mydeck_machf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

BIN
textures/mydeck_machs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
textures/mydeck_pilef.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

BIN
textures/mydeck_pilefs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

BIN
textures/mydeck_piles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

BIN
textures/mydeck_piless.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

BIN
textures/mydeck_pilet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

BIN
textures/mydeck_piletp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
textures/mydeck_piletps.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

BIN
textures/mydeck_rwood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

BIN
textures/mydeck_rwoods.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

BIN
textures/mydeck_vwood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

BIN
textures/mydeck_vwoods.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
textures/vwood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B