Added stair rail ends
parent
d50b2de62f
commit
f08bb005d6
13
stain.lua
13
stain.lua
|
@ -1,5 +1,5 @@
|
||||||
minetest.register_craftitem("mydeck:stain_brush",{
|
minetest.register_craftitem("mydeck:stain_brush",{
|
||||||
description = "Stain Brush",
|
-- description = "Stain Brush",
|
||||||
inventory_image = "mydeck_brush.png",
|
inventory_image = "mydeck_brush.png",
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -189,6 +189,16 @@ minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||||
and node.name == "mydeck:lattice" then
|
and node.name == "mydeck:lattice" then
|
||||||
minetest.set_node(pos,{name = "mydeck:lattices", param2=node.param2})
|
minetest.set_node(pos,{name = "mydeck:lattices", param2=node.param2})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
|
||||||
|
and node.name == "mydeck:stairs_raill_end" then
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_raill_ends", param2=node.param2})
|
||||||
|
end
|
||||||
|
|
||||||
|
if puncher:get_wielded_item():get_name() == "mydeck:stain_brush"
|
||||||
|
and node.name == "mydeck:stairs_railr_end" then
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_railr_ends", param2=node.param2})
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,4 +208,3 @@ end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
190
stairs.lua
190
stairs.lua
|
@ -56,15 +56,7 @@ minetest.register_node("mydeck:stairs", {
|
||||||
{-0.5, -0.5, 0.125, 0.5, 0.5, 0.5},
|
{-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({
|
minetest.register_abm({
|
||||||
|
@ -314,24 +306,24 @@ minetest.register_node("mydeck:stairs_railr", {
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, -- NodeBox1
|
{0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5},
|
||||||
{0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5}, -- NodeBox1
|
{0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5},
|
||||||
{0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2
|
{0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5},
|
||||||
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox3
|
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375},
|
||||||
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, -- NodeBox4
|
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375},
|
||||||
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, -- NodeBox5
|
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125},
|
||||||
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, -- NodeBox6
|
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25},
|
||||||
{0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875}, -- NodeBox7
|
{0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875},
|
||||||
{0.3125, 0, 0.0625, 0.5, 0.125, 0.125}, -- NodeBox8
|
{0.3125, 0, 0.0625, 0.5, 0.125, 0.125},
|
||||||
{0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625}, -- NodeBox9
|
{0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625},
|
||||||
{0.3125, -0.125, -0.0625, 0.5, 0, 0}, -- NodeBox10
|
{0.3125, -0.125, -0.0625, 0.5, 0, 0},
|
||||||
{0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625}, -- NodeBox11
|
{0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625},
|
||||||
{0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125}, -- NodeBox12
|
{0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125},
|
||||||
{0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875}, -- NodeBox13
|
{0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875},
|
||||||
{0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25}, -- NodeBox14
|
{0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25},
|
||||||
{0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125}, -- NodeBox15
|
{0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125},
|
||||||
{0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375}, -- NodeBox16
|
{0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375},
|
||||||
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375}, -- NodeBox17
|
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -342,7 +334,25 @@ minetest.register_node("mydeck:stairs_railr", {
|
||||||
{0.3125, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
{0.3125, -0.5, -0.5, 0.5, 0.5, 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
|
||||||
|
|
||||||
|
if nodeu == "mydeck:stairs" or
|
||||||
|
nodeu == "mydeck:stairsb" or
|
||||||
|
nodeu == "mydeck:stairss" or
|
||||||
|
nodeu == "mydeck:stairsbs" then
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_railr", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
|
else
|
||||||
|
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_railr_end", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
|
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("mydeck:stairs_raill", {
|
minetest.register_node("mydeck:stairs_raill", {
|
||||||
description = "Stairs",
|
description = "Stairs",
|
||||||
tiles = {
|
tiles = {
|
||||||
|
@ -361,24 +371,24 @@ minetest.register_node("mydeck:stairs_raill", {
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, -- NodeBox1
|
{-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5},
|
||||||
{-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5}, -- NodeBox1
|
{-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5},
|
||||||
{-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, -- NodeBox2
|
{-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5},
|
||||||
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, -- NodeBox3
|
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375},
|
||||||
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, -- NodeBox4
|
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375},
|
||||||
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, -- NodeBox5
|
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125},
|
||||||
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, -- NodeBox6
|
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25},
|
||||||
{-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875}, -- NodeBox7
|
{-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875},
|
||||||
{-0.3125, 0, 0.0625, -0.5, 0.125, 0.125}, -- NodeBox8
|
{-0.3125, 0, 0.0625, -0.5, 0.125, 0.125},
|
||||||
{-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625}, -- NodeBox9
|
{-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625},
|
||||||
{-0.3125, -0.125, -0.0625, -0.5, 0, 0}, -- NodeBox10
|
{-0.3125, -0.125, -0.0625, -0.5, 0, 0},
|
||||||
{-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625}, -- NodeBox11
|
{-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625},
|
||||||
{-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125}, -- NodeBox12
|
{-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125},
|
||||||
{-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875}, -- NodeBox13
|
{-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875},
|
||||||
{-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25}, -- NodeBox14
|
{-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25},
|
||||||
{-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125}, -- NodeBox15
|
{-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125},
|
||||||
{-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375}, -- NodeBox16
|
{-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375},
|
||||||
{-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375}, -- NodeBox17
|
{-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375},
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -389,6 +399,96 @@ minetest.register_node("mydeck:stairs_raill", {
|
||||||
{-0.3125, -0.5, -0.5, -0.5, 0.5, 0.5 },
|
{-0.3125, -0.5, -0.5, -0.5, 0.5, 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
|
||||||
|
|
||||||
|
if nodeu == "mydeck:stairs" or
|
||||||
|
nodeu == "mydeck:stairsb" or
|
||||||
|
nodeu == "mydeck:stairss" or
|
||||||
|
nodeu == "mydeck:stairsbs" then
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_raill", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
|
else
|
||||||
|
|
||||||
|
minetest.set_node(pos,{name = "mydeck:stairs_raill_end", param2=minetest.dir_to_facedir(placer:get_look_dir())})
|
||||||
|
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("mydeck:stairs_railr_end", {
|
||||||
|
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",
|
||||||
|
drop = "mydeck:stairs_railr",
|
||||||
|
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.3125, 0.375, 0.4375, 0.5, 0.5, 0.5},
|
||||||
|
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375},
|
||||||
|
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375},
|
||||||
|
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125},
|
||||||
|
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{0.3125, -0.5, 0.1875, 0.5, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_node("mydeck:stairs_raill_end", {
|
||||||
|
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",
|
||||||
|
drop = "mydeck:stairs_raill",
|
||||||
|
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.3125, 0.375, 0.4375, -0.5, 0.5, 0.5},
|
||||||
|
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375},
|
||||||
|
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375},
|
||||||
|
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125},
|
||||||
|
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.3125, -0.5, 0.1875, -0.5, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -397,5 +497,3 @@ minetest.register_node("mydeck:stairs_raill", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -397,6 +397,78 @@ minetest.register_node("mydeck:stairs_raills", {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("mydeck:stairs_railr_ends", {
|
||||||
|
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",
|
||||||
|
drop = "mydeck:stairs_railr",
|
||||||
|
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.3125, 0.375, 0.4375, 0.5, 0.5, 0.5},
|
||||||
|
{0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375},
|
||||||
|
{0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375},
|
||||||
|
{0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125},
|
||||||
|
{0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{0.3125, -0.5, 0.1875, 0.5, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
minetest.register_node("mydeck:stairs_raill_ends", {
|
||||||
|
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",
|
||||||
|
drop = "mydeck:stairs_raill",
|
||||||
|
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.3125, 0.375, 0.4375, -0.5, 0.5, 0.5},
|
||||||
|
{-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375},
|
||||||
|
{-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375},
|
||||||
|
{-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125},
|
||||||
|
{-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.3125, -0.5, 0.1875, -0.5, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue