From 043b563c9cd1bec109acd34c07c13c5057839fa0 Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Mon, 7 May 2018 21:28:56 +0300 Subject: fancy shapes --- README.md | 6 +++++- depends.txt | 2 ++ init.lua | 31 +++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd872ec..46eef3d 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,8 @@ if minetest.get_modpath("maple") then timber_nodenames["maple:maple_leaves"] = true end end -``` \ No newline at end of file +``` + +## Stairs and slabs + +Maple tries to register fancy wooden shapes for maple wood with stairs or moreblocks. \ No newline at end of file diff --git a/depends.txt b/depends.txt index a9da8e4..43b225e 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,4 @@ default +stairs +moreblocks? bonemeal? \ No newline at end of file diff --git a/init.lua b/init.lua index 93a9cf4..cec359a 100644 --- a/init.lua +++ b/init.lua @@ -154,4 +154,35 @@ if minetest.get_modpath("bonemeal") then bonemeal:add_sapling({ {"maple:maple_sapling", maple.grow_sapling, "soil"}, }) +end + +-- derivative blocks (stairs / microblocks / etc) +if stairs and stairs.mod and stairs.mod == "redo" then + + stairs.register_all("maple_wood", "maple:maple_wood", + {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + {"maple_wood.png"}, + "Maple Wood Stair", + "Maple Wood Slab", + default.node_sound_wood_defaults()) + +elseif minetest.global_exists("stairsplus") then + + stairsplus:register_all("maple", "maple_wood", "maple:maple_wood", { + description = "Maple Wood", + tiles = {"maple_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) + +else + + stairs.register_stair_and_slab("maple_wood", "maple:maple_wood", + {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + {"maple_wood.png"}, + "Maple stair", + "Maple Slab", + default.node_sound_wood_defaults()) + + end \ No newline at end of file -- cgit v1.2.3