aboutsummaryrefslogtreecommitdiff
path: root/stairsplus/panels.lua
diff options
context:
space:
mode:
Diffstat (limited to 'stairsplus/panels.lua')
-rw-r--r--stairsplus/panels.lua42
1 files changed, 7 insertions, 35 deletions
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua
index a5a9caa..c0a24fb 100644
--- a/stairsplus/panels.lua
+++ b/stairsplus/panels.lua
@@ -30,11 +30,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
- 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 .. ":panel_" .. subname .. "_1", {
@@ -55,11 +51,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
- 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 .. ":panel_" .. subname .. "_2", {
@@ -80,11 +72,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
},
- 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 .. ":panel_" .. subname .. "_4", {
@@ -105,11 +93,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
},
- 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 .. ":panel_" .. subname .. "_12", {
@@ -130,11 +114,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
},
- 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 .. ":panel_" .. subname .. "_14", {
@@ -155,11 +135,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
},
- 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 .. ":panel_" .. subname .. "_15", {
@@ -180,11 +156,7 @@ function register_panel(modname, subname, recipeitem, groups, images, descriptio
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
},
- 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_alias(modname..":panel_"..subname.."_bottom", modname..":panel_"..subname)