Add a selection box for stairs that fit the nodebox
authorPilzAdam <adam-k@outlook.com>
Mon, 17 Dec 2012 19:04:10 +0000 (20:04 +0100)
committerPilzAdam <PilzAdam@gmx.de>
Fri, 4 Jan 2013 18:45:10 +0000 (19:45 +0100)
mods/stairs/init.lua

index 5f3b6c0fee23bc53cbcf9a22a6e485181053802f..0e40bf82839732345841c3744a7c66c66122a2d2 100644 (file)
@@ -21,6 +21,13 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
                                {-0.5, 0, 0, 0.5, 0.5, 0.5},
                        },
                },
+               selection_box = {
+                       type = "fixed",
+                       fixed = {
+                               {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
+                               {-0.5, 0, 0, 0.5, 0.5, 0.5},
+                       },
+               },
                on_place = function(itemstack, placer, pointed_thing)
                        if pointed_thing.type ~= "node" then
                                return itemstack
@@ -58,6 +65,13 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
                                {-0.5, -0.5, 0, 0.5, 0, 0.5},
                        },
                },
+               selection_box = {
+                       type = "fixed",
+                       fixed = {
+                               {-0.5, 0, -0.5, 0.5, 0.5, 0.5},
+                               {-0.5, -0.5, 0, 0.5, 0, 0.5},
+                       },
+               },
        })
 
        minetest.register_craft({