aboutsummaryrefslogtreecommitdiff
path: root/stairsplus
diff options
context:
space:
mode:
Diffstat (limited to 'stairsplus')
-rw-r--r--stairsplus/microblocks.lua42
-rw-r--r--stairsplus/panels.lua42
-rw-r--r--stairsplus/slabs.lua48
-rw-r--r--stairsplus/stairs.lua42
4 files changed, 29 insertions, 145 deletions
diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 24a69ea..6cbb7d4 100644
--- a/stairsplus/microblocks.lua
+++ b/stairsplus/microblocks.lua
@@ -31,11 +31,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
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 .. ":micro_" .. subname .. "_1", {
@@ -57,11 +53,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
},
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 .. ":micro_" .. subname .. "_2", {
@@ -83,11 +75,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
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 .. ":micro_" .. subname .. "_4", {
@@ -109,11 +97,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
},
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 .. ":micro_" .. subname .. "_12", {
@@ -135,11 +119,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
},
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 .. ":micro_" .. subname .. "_14", {
@@ -161,11 +141,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
},
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 .. ":micro_" .. subname .. "_15", {
@@ -187,11 +163,7 @@ function register_micro(modname, subname, recipeitem, groups, images, descriptio
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
},
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_alias(modname..":micro_"..subname.."_bottom", modname..":micro_"..subname)
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)
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index a7ebe43..1e251a5 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -31,11 +31,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
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:slab_" .. subname, {
@@ -56,11 +52,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
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 .. ":slab_" .. subname .. "_quarter", {
@@ -82,11 +74,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
},
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 .. ":slab_" .. subname .. "_three_quarter", {
@@ -108,11 +96,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
},
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 .. ":slab_" .. subname .. "_1", {
@@ -134,11 +118,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
},
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 .. ":slab_" .. subname .. "_2", {
@@ -160,11 +140,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
},
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 .. ":slab_" .. subname .. "_14", {
@@ -186,11 +162,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
},
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 .. ":slab_" .. subname .. "_15", {
@@ -212,11 +184,7 @@ function register_slab(modname, subname, recipeitem, groups, images, description
fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
},
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
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