Remove deco_block group from simple stairs

This commit is contained in:
Wuzzy 2017-02-27 23:14:34 +01:00
parent 3d62ea91a6
commit ff0c75559c

View file

@ -231,7 +231,15 @@ end
-- Makes stair and slab out of a source node -- Makes stair and slab out of a source node
function stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab) function stairs.register_stair_and_slab_simple(subname, sourcenode, desc_stair, desc_slab)
local def = minetest.registered_nodes[sourcenode] local def = minetest.registered_nodes[sourcenode]
stairs.register_stair_and_slab(subname, sourcenode, def.groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness) local groups = {}
-- Only allow a strict set of groups to be added to stairs and slabs for more predictable results
local allowed_groups = { "dig_immediate", "handy", "pickaxey", "axey", "shovely", "shearsy", "shearsy_wool", "swordy", "swordy_wool" }
for a=1, #allowed_groups do
if def.groups[allowed_groups[a]] then
groups[allowed_groups[a]] = def.groups[allowed_groups[a]]
end
end
stairs.register_stair_and_slab(subname, sourcenode, groups, def.tiles, desc_stair, desc_slab, def.sounds, def._mcl_hardness)
end end
-- Register all Minecraft stairs and slabs -- Register all Minecraft stairs and slabs