aboutsummaryrefslogtreecommitdiff
path: root/stairsplus/stairs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'stairsplus/stairs.lua')
-rw-r--r--stairsplus/stairs.lua42
1 files changed, 7 insertions, 35 deletions
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 7fa6a30..20996a7 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -36,11 +36,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":stairs:stair_" .. subname, {
@@ -66,11 +62,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_half", {
@@ -97,11 +89,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_right_half", {
@@ -128,11 +116,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_inner", {
@@ -162,11 +146,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", {
@@ -194,11 +174,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", {
@@ -218,11 +194,7 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
},
},
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
+ on_place = stairsplus_rotate_and_place
})
-- Unregister default recipes, optional, see _config.txt