cherry-pick from github.com/minetest/minetest_game> Stairs: Add mossy cobble slab and stair
This commit is contained in:
parent
eff782c61f
commit
4c3b8376ab
3 changed files with 43 additions and 26 deletions
|
@ -343,7 +343,7 @@ delivered with Minetest Game, to keep them compatible with other mods.
|
||||||
|
|
||||||
* Registers a stair.
|
* Registers a stair.
|
||||||
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
|
||||||
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble"
|
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
|
||||||
* `groups`: see [Known damage and digging time defining groups]
|
* `groups`: see [Known damage and digging time defining groups]
|
||||||
* `images`: see [Tile definition]
|
* `images`: see [Tile definition]
|
||||||
* `description`: used for the description field in the stair's definition
|
* `description`: used for the description field in the stair's definition
|
||||||
|
|
|
@ -455,12 +455,18 @@ minetest.register_abm({
|
||||||
--
|
--
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"default:cobble"},
|
nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble"},
|
||||||
neighbors = {"group:water"},
|
neighbors = {"group:water"},
|
||||||
interval = 16,
|
interval = 16,
|
||||||
chance = 200,
|
chance = 200,
|
||||||
catch_up = false,
|
catch_up = false,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
if node.name == "default:cobble" then
|
||||||
minetest.set_node(pos, {name = "default:mossycobble"})
|
minetest.set_node(pos, {name = "default:mossycobble"})
|
||||||
|
elseif node.name == "stairs:slab_cobble" then
|
||||||
|
minetest.set_node(pos, {name = "stairs:slab_mossycobble", param2 = node.param2})
|
||||||
|
elseif node.name == "stairs:stair_cobble" then
|
||||||
|
minetest.set_node(pos, {name = "stairs:stair_mossycobble", param2 = node.param2})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -90,6 +90,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if recipeitem then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'stairs:stair_' .. subname .. ' 6',
|
output = 'stairs:stair_' .. subname .. ' 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -108,6 +109,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
|
||||||
{recipeitem, recipeitem, recipeitem},
|
{recipeitem, recipeitem, recipeitem},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,12 +223,14 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if recipeitem then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'stairs:slab_' .. subname .. ' 6',
|
output = 'stairs:slab_' .. subname .. ' 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
{recipeitem, recipeitem, recipeitem},
|
{recipeitem, recipeitem, recipeitem},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,6 +317,13 @@ stairs.register_stair_and_slab("cobble", "default:cobble",
|
||||||
"Cobblestone Slab",
|
"Cobblestone Slab",
|
||||||
default.node_sound_stone_defaults())
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("mossycobble", nil,
|
||||||
|
{cracky = 3},
|
||||||
|
{"default_mossycobble.png"},
|
||||||
|
"Mossy Cobblestone Stair",
|
||||||
|
"Mossy Cobblestone Slab",
|
||||||
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
stairs.register_stair_and_slab("stonebrick", "default:stonebrick",
|
stairs.register_stair_and_slab("stonebrick", "default:stonebrick",
|
||||||
{cracky = 3},
|
{cracky = 3},
|
||||||
{"default_stone_brick.png"},
|
{"default_stone_brick.png"},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue