2012-03-19 04:25:09 +01:00
|
|
|
stairs = {}
|
|
|
|
|
|
|
|
-- Node will be called stairs:stair_<subname>
|
|
|
|
function stairs.register_stair(subname, recipeitem, groups, images, description)
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node(":stairs:stair_" .. subname, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = description.."\n"..
|
|
|
|
"param2 = facedir rotation (0..23)",
|
2012-03-19 04:25:09 +01:00
|
|
|
drawtype = "nodebox",
|
2016-12-14 16:23:25 +01:00
|
|
|
tiles = images,
|
2012-03-19 04:25:09 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
is_ground_content = 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},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Node will be called stairs:slab_<subname>
|
|
|
|
function stairs.register_slab(subname, recipeitem, groups, images, description)
|
2024-10-28 15:57:54 +01:00
|
|
|
core.register_node(":stairs:slab_" .. subname, {
|
2012-03-19 04:25:09 +01:00
|
|
|
description = description,
|
|
|
|
drawtype = "nodebox",
|
2016-12-14 16:23:25 +01:00
|
|
|
tiles = images,
|
2012-03-19 04:25:09 +01:00
|
|
|
paramtype = "light",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = groups,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
|
|
|
},
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Nodes will be called stairs:{stair,slab}_<subname>
|
|
|
|
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
|
|
|
stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
|
|
|
stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
|
|
|
end
|
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
stairs.register_stair_and_slab("stone", "basenodes:stone",
|
2012-03-19 04:25:09 +01:00
|
|
|
{cracky=3},
|
|
|
|
{"default_stone.png"},
|
2020-05-24 15:46:26 +02:00
|
|
|
"Stone Stair",
|
|
|
|
"Stone Slab")
|
2012-03-19 04:25:09 +01:00
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
stairs.register_stair_and_slab("desert_stone", "basenodes:desert_stone",
|
2012-03-19 04:25:09 +01:00
|
|
|
{cracky=3},
|
2020-05-24 15:46:26 +02:00
|
|
|
{"default_desert_stone.png"},
|
|
|
|
"Desert Stone Stair",
|
|
|
|
"Desert Stone Slab")
|
2012-03-19 04:25:09 +01:00
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
stairs.register_stair_and_slab("cobble", "basenodes:cobble",
|
2012-03-19 04:25:09 +01:00
|
|
|
{cracky=3},
|
2020-05-24 15:46:26 +02:00
|
|
|
{"default_cobble.png"},
|
|
|
|
"Cobblestone Stair",
|
|
|
|
"Cobblestone Slab")
|