From 93212e8fd821b0678fd4f2b9cae175ca449de167 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 22 Oct 2016 09:12:18 +0100 Subject: added stairsplus support so stairs are registered properly --- init.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index b2d4c3b..81740d3 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ --- Baked Clay (0.6) by TenPlus1 +-- Baked Clay by TenPlus1 local clay = { {"white", "White"}, @@ -41,9 +41,18 @@ for _, clay in pairs(clay) do }, }) - -- register stair and slab (unless stairs redo active) + -- register stairsplus stairs if found + if minetest.global_exists("stairsplus") then + + stairsplus:register_all("bakedclay", clay[1], "bakedclay:" .. clay[1], { + description = clay[2] .. " Baked Clay", + tiles = {"baked_clay_" .. clay[1] .. ".png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) - if stairs and not stairs.mod then + -- register stair and slab (unless stairs redo active) + elseif stairs and not stairs.mod then stairs.register_stair_and_slab("bakedclay_".. clay[1], "bakedclay:".. clay[1], {cracky = 3}, -- cgit v1.2.3