diff options
author | Calinou <calinou9999spam@gmail.com> | 2013-11-24 10:32:32 -0800 |
---|---|---|
committer | Calinou <calinou9999spam@gmail.com> | 2013-11-24 10:32:32 -0800 |
commit | 92e4dc8e29954e1f07776a96eb6cb69b01dd6d5b (patch) | |
tree | c4be707e88adb35d25a794f71ca79b245fd527e0 /stairsplus/stairs.lua | |
parent | d75c46b468c71013f93ac2defaee5625b23e5574 (diff) | |
parent | 4b4e10ff1d4f1bde96c47331738e4af27bec6142 (diff) | |
download | moreblocks-92e4dc8e29954e1f07776a96eb6cb69b01dd6d5b.tar.gz moreblocks-92e4dc8e29954e1f07776a96eb6cb69b01dd6d5b.tar.bz2 moreblocks-92e4dc8e29954e1f07776a96eb6cb69b01dd6d5b.zip |
Merge pull request #5 from VanessaE/master
Rewrite slightly to use the new 6d facedir prediction code in builtin
Diffstat (limited to 'stairsplus/stairs.lua')
-rw-r--r-- | stairsplus/stairs.lua | 42 |
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 |