Add moreblocks support.

This commit is contained in:
sys4-fr 2018-09-16 16:45:35 +02:00
parent 7f083804e9
commit 47c2968473
2 changed files with 30 additions and 4 deletions

View File

@ -1,3 +1,4 @@
default
doors?
stairs?
moreblocks?

View File

@ -150,9 +150,9 @@ minetest.register_alias("default:mg_cherry_sapling", "cherry_tree:cherry_sapling
-- Crafting
minetest.register_craft(
{
output = 'cherry_tree:cherry_plank 4',
output = "cherry_tree:cherry_plank 4",
recipe = {
{'cherry_tree:cherry_tree'},
{"cherry_tree:cherry_tree"},
}
})
@ -357,7 +357,33 @@ if minetest.get_modpath("doors") then
end
if minetest.get_modpath("stairs") then
if minetest.get_modpath("moreblocks") then
-- planks
local nodename = "cherry_tree:cherry_plank"
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all(
"cherry_tree",
"cherry_plank",
nodename,
ndef
)
-- tree
nodename = "cherry_tree:cherry_tree"
ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
stairsplus:register_all(
"cherry_tree",
"cherry_tree",
nodename,
ndef
)
elseif minetest.get_modpath("stairs") then
-- From BFD:
stairs.register_stair_and_slab(
@ -370,5 +396,4 @@ if minetest.get_modpath("stairs") then
"Cherry Plank Corner Stair",
default.node_sound_wood_defaults()
)
end