From ba062094c5d47699897f20fcd870bb391345c9c1 Mon Sep 17 00:00:00 2001 From: sys4-fr Date: Wed, 26 Dec 2018 20:17:09 +0100 Subject: [PATCH] Ajoute le support de moreblocks (en option) --- depends.txt | 1 + nodes.lua | 32 +++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/depends.txt b/depends.txt index 81909c6..2ce5310 100755 --- a/depends.txt +++ b/depends.txt @@ -3,3 +3,4 @@ stairs mobs worldedit watershed? +moreblocks? diff --git a/nodes.lua b/nodes.lua index 4131c17..7c315a5 100755 --- a/nodes.lua +++ b/nodes.lua @@ -6,15 +6,29 @@ minetest.register_node("lavatemple:brick", { sounds = default.node_sound_stone_defaults(), }) -stairs.register_stair_and_slab( - "lavatemple_brick", - "lavatemple:brick", - {dark=1}, - {"lavatemple_brick.png"}, - "Darkbrick Stair", - "Darkbrick Slab", - default.node_sound_stone_defaults() -) +if minetest.get_modpath("moreblocks") then + local nodename = "lavatemple:brick" + local ndef = table.copy(minetest.registered_nodes[nodename]) + ndef.sunlight_propagates = true + ndef.place_param2 = nil + + stairsplus:register_all( + "lavatemple", + "brick", + nodename, + ndef + ) +else + stairs.register_stair_and_slab( + "lavatemple_brick", + "lavatemple:brick", + {dark=1}, + {"lavatemple_brick.png"}, + "Darkbrick Stair", + "Darkbrick Slab", + default.node_sound_stone_defaults() + ) +end minetest.register_node("lavatemple:ladder", { description = "Darkbrick Ladder",