aboutsummaryrefslogtreecommitdiff
path: root/stairsplus/stairs.lua
diff options
context:
space:
mode:
authorCalinou <calinou9999spam@gmail.com>2014-01-20 19:49:40 +0100
committerCalinou <calinou9999spam@gmail.com>2014-01-20 19:49:40 +0100
commit62f9f00fe8363322c5a5d64e84759743c84fc2bb (patch)
treeb1a3e40b0aa9ceb2a10704f3bc2d1ad3cd2dc7c3 /stairsplus/stairs.lua
parent2b01bd5cbccfd3a74076602d70ba74d792641779 (diff)
downloadmoreblocks-62f9f00fe8363322c5a5d64e84759743c84fc2bb.tar.gz
moreblocks-62f9f00fe8363322c5a5d64e84759743c84fc2bb.tar.bz2
moreblocks-62f9f00fe8363322c5a5d64e84759743c84fc2bb.zip
Big update: new stair types, code looks better.
Diffstat (limited to 'stairsplus/stairs.lua')
-rw-r--r--stairsplus/stairs.lua101
1 files changed, 59 insertions, 42 deletions
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index 20996a7..b11fef9 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -28,13 +28,6 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- },
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
@@ -54,13 +47,6 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- },
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
@@ -81,13 +67,6 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
- },
- },
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
@@ -108,13 +87,6 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{0, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {0, -0.5, -0.5, 0.5, 0, 0.5},
- {0, 0, 0, 0.5, 0.5, 0.5},
- },
- },
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
@@ -137,24 +109,36 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, -0.5, 0, 0.5, 0},
},
},
- selection_box = {
+ sounds = default.node_sound_stone_defaults(),
+ on_place = stairsplus_rotate_and_place
+ })
+
+ minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", {
+ description = S("%s Stairs"):format(S(description)),
+ drawtype = "nodebox",
+ tiles = images,
+ light_source = light,
+ drop = modname .. ":stair_" .. drop .. "_outer",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ groups = groups,
+ node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- {-0.5, 0, -0.5, 0, 0.5, 0},
+ {-0.5, 0, 0, 0, 0.5, 0.5},
},
},
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
- minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", {
+ minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", {
description = S("%s Stairs"):format(S(description)),
drawtype = "nodebox",
tiles = images,
light_source = light,
- drop = modname .. ":stair_" .. drop .. "_outer",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
@@ -162,22 +146,35 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
+ {-0.5, -0.5, -0.5, 0.5, 0, 0},
+ {-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
+ sounds = default.node_sound_stone_defaults(),
+ on_place = stairsplus_rotate_and_place
+ })
+
+ minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt_1", {
+ description = S("%s Stairs"):format(S(description)),
+ drawtype = "nodebox",
+ tiles = images,
+ light_source = light,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ groups = groups,
+ node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
+ {-0.5, -0.0625, -0.5, 0.5, 0, 0},
+ {-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
},
},
sounds = default.node_sound_stone_defaults(),
on_place = stairsplus_rotate_and_place
})
-
- minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", {
+
+ minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt_2", {
description = S("%s Stairs"):format(S(description)),
drawtype = "nodebox",
tiles = images,
@@ -189,8 +186,28 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
+ {-0.5, -0.125, -0.5, 0.5, 0, 0},
+ {-0.5, 0.375, 0, 0.5, 0.5, 0.5},
+ },
+ },
+ sounds = default.node_sound_stone_defaults(),
+ on_place = stairsplus_rotate_and_place
+ })
+
+ minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt_4", {
+ description = S("%s Stairs"):format(S(description)),
+ drawtype = "nodebox",
+ tiles = images,
+ light_source = light,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ groups = groups,
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.25, -0.5, 0.5, 0, 0},
+ {-0.5, 0.25, 0, 0.5, 0.5, 0.5},
},
},
sounds = default.node_sound_stone_defaults(),