diff options
Diffstat (limited to 'mario/pipes.lua')
-rw-r--r-- | mario/pipes.lua | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/mario/pipes.lua b/mario/pipes.lua new file mode 100644 index 0000000..3cfb04f --- /dev/null +++ b/mario/pipes.lua @@ -0,0 +1,67 @@ +local pipe_box = { + type = "fixed", + fixed = {{-0.375, -0.5, -0.375, 0.375, 0.5, 0.375},}} +local pipe_elbow_box = { + type = "fixed", + fixed = {{-0.375, -0.5, -0.375, 0.375, 0.375, 0.375}, + {-0.375, -0.375, 0.375, 0.375, 0.375, -0.5},}} +local pipe_end_box = { + type = "fixed", + fixed = {{-0.375, -0.5, -0.375, 0.375, 0.375, 0.375}, + {-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5},}} + +minetest.register_node("mario:pipe",{ + description = "Pipe", + tiles = { + "mario_pipe_end_sm.png", + "mario_pipe_end_sm.png", + "mario_pipe.png", + "mario_pipe.png", + "mario_pipe.png", + "mario_pipe.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3}, + node_box = pipe_box, + on_place = minetest.rotate_node, + +}) + +minetest.register_node("mario:pipe_elbow",{ + description = "Pipe Elbow", + tiles = { + "mario_pipe.png", + "mario_pipe_end_sm.png^mario_pipe_elbow_ic.png", + "mario_pipe.png^mario_pipe_elbow.png^[transformFX", + "mario_pipe.png^mario_pipe_elbow.png", + "mario_pipe.png", + "mario_pipe_end_sm.png^mario_pipe_elbow_ic.png^[transformFY", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3}, + node_box = pipe_elbow_box, + on_place = minetest.rotate_node, +}) + +minetest.register_node("mario:pipe_end",{ + description = "Pipe End", + tiles = { + "mario_pipe_end_sm.png", + "mario_pipe_end_sm.png", + "mario_pipe.png^mario_pipe_end_ring.png", + "mario_pipe.png^mario_pipe_end_ring.png", + "mario_pipe.png^mario_pipe_end_ring.png", + "mario_pipe.png^mario_pipe_end_ring.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3}, + node_box = pipe_end_box, + on_place = minetest.rotate_node, +}) + |