Stairs: Remove combine slabs code
authorTumeniNodes <tumeninodes@gmail.com>
Thu, 11 Oct 2018 18:33:33 +0000 (14:33 -0400)
committerEzhh <owlecho@live.com>
Thu, 11 Oct 2018 18:33:33 +0000 (19:33 +0100)
mods/stairs/init.lua

index 53a56e24240bf77a83977ad6a183f68a7bba1aab..3e01a28ec35344a31daaf5a92550a606bcca2757 100644 (file)
@@ -143,10 +143,6 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
 end
 
 
--- Slab facedir to placement 6d matching table
-local slab_trans_dir = {[0] = 8, 0, 2, 1, 3, 4}
-
-
 -- Register slab
 -- Node will be called stairs:slab_<subname>
 
@@ -198,32 +194,6 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
 
                                local p2 = under.param2
 
-                               -- combine two slabs if possible
-                               if slab_trans_dir[math.floor(p2 / 4)] == dir
-                                               and wield_item == under.name then
-
-                                       if not recipeitem then
-                                               return itemstack
-                                       end
-                                       if minetest.is_protected(pointed_thing.under, player_name) and not
-                                                       minetest.check_player_privs(player_name, "protection_bypass") then
-                                               minetest.record_protection_violation(pointed_thing.under,
-                                                       player_name)
-                                               return
-                                       end
-                                       -- If paramtype2 of cubic version is not 'facedir' set its
-                                       -- param2 to 0 to avoid bugs such as liquid in connected
-                                       -- framed glass.
-                                       if minetest.registered_nodes[recipeitem].paramtype2 ~= "facedir" then
-                                               p2 = 0
-                                       end
-                                       minetest.set_node(pointed_thing.under, {name = recipeitem, param2 = p2})
-                                       if not creative_enabled then
-                                               itemstack:take_item()
-                                       end
-                                       return itemstack
-                               end
-
                                -- Placing a slab on an upside down slab should make it right-side up.
                                if p2 >= 20 and dir == 8 then
                                        p2 = p2 - 20