1 -- Minetest 0.4 mod: stairs
2 -- See README.txt for licensing and other information.
6 -- Node will be called stairs:stair_<subname>
7 function stairs.register_stair(subname, recipeitem, groups, images, description)
8 minetest.register_node("stairs:stair_" .. subname, {
9 description = description,
13 paramtype2 = "facedir",
14 is_ground_content = true,
19 {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
20 {-0.5, 0, 0, 0.5, 0.5, 0.5},
25 minetest.register_craft({
26 output = 'stairs:stair_' .. subname .. ' 4',
29 {recipeitem, recipeitem, ""},
30 {recipeitem, recipeitem, recipeitem},
35 -- Node will be called stairs:slab_<subname>
36 function stairs.register_slab(subname, recipeitem, groups, images, description)
37 minetest.register_node("stairs:slab_" .. subname, {
38 description = description,
42 is_ground_content = true,
46 fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
50 fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
54 minetest.register_craft({
55 output = 'stairs:slab_' .. subname .. ' 3',
57 {recipeitem, recipeitem, recipeitem},
62 -- Nodes will be called stairs:{stair,slab}_<subname>
63 function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
64 stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
65 stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
68 stairs.register_stair_and_slab("wood", "default:wood",
69 {snappy=2,choppy=2,oddly_breakable_by_hand=2},
74 stairs.register_stair_and_slab("stone", "default:stone",
76 {"default_stone.png"},
80 stairs.register_stair_and_slab("cobble", "default:cobble",
82 {"default_cobble.png"},
86 stairs.register_stair_and_slab("brick", "default:brick",
88 {"default_brick.png"},
92 stairs.register_stair_and_slab("sandstone", "default:sandstone",
94 {"default_sandstone.png"},