0
0
Fork 0

Fix missing sounds of new stairs and slabs

This commit is contained in:
Wuzzy 2017-12-08 19:03:20 +01:00
parent 282b7e0025
commit 957f19a427
1 changed files with 31 additions and 0 deletions

View File

@ -80,6 +80,22 @@ end
function mcl_stairs.register_stair(subname, recipeitem, groups, images, description, sounds, hardness)
groups.stair = 1
groups.building_block = 1
if recipeitem then
if not images then
images = minetest.registered_items[recipeitem].tiles
end
if not groups then
groups = minetest.registered_items[recipeitem].groups
end
if not sounds then
sounds = minetest.registered_items[recipeitem].sounds
end
if not hardness then
hardness = minetest.registered_items[recipeitem]._mcl_hardness
end
end
minetest.register_node(":mcl_stairs:stair_" .. subname, {
description = description,
_doc_items_longdesc = "Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the bottom or at the upper half of the side of a block will be placed upside down.",
@ -152,6 +168,21 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti
local upper_slab = lower_slab.."_top"
local double_slab = lower_slab.."_double"
if recipeitem then
if not images then
images = minetest.registered_items[recipeitem].tiles
end
if not groups then
groups = minetest.registered_items[recipeitem].groups
end
if not sounds then
sounds = minetest.registered_items[recipeitem].sounds
end
if not hardness then
hardness = minetest.registered_items[recipeitem]._mcl_hardness
end
end
-- Automatically generate double slab description
if not double_description then
double_description = string.format("Double %s", description)