mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-14 05:50:19 +02:00
Big update: new stair types, code looks better.
This commit is contained in:
@ -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,14 +109,6 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
|
||||
{-0.5, 0, -0.5, 0, 0.5, 0},
|
||||
},
|
||||
},
|
||||
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},
|
||||
{-0.5, 0, -0.5, 0, 0.5, 0},
|
||||
},
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_place = stairsplus_rotate_and_place
|
||||
})
|
||||
@ -166,13 +130,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.5, 0, 0.5},
|
||||
{-0.5, 0, 0, 0, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_place = stairsplus_rotate_and_place
|
||||
})
|
||||
@ -196,6 +153,66 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
|
||||
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.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_2", {
|
||||
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.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(),
|
||||
on_place = stairsplus_rotate_and_place
|
||||
})
|
||||
|
||||
-- Unregister default recipes, optional, see _config.txt
|
||||
|
||||
|
Reference in New Issue
Block a user