From 5f2a72fd85ca208e1ee74ef86dfe5f465164d1c1 Mon Sep 17 00:00:00 2001 From: kilbith Date: Mon, 21 Sep 2015 23:07:37 +0200 Subject: [PATCH] Add Cactus Brick --- crafts.lua | 7 ------- nodes.lua | 22 ++++++++++++++++------ textures/xdecor_cactusbrick.png | Bin 0 -> 886 bytes worktable.lua | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 textures/xdecor_cactusbrick.png diff --git a/crafts.lua b/crafts.lua index b330242..1465a8b 100644 --- a/crafts.lua +++ b/crafts.lua @@ -240,13 +240,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "xdecor:moonbrick", - recipe = { - {"default:brick", "default:stone"} - } -}) - minetest.register_craft({ output = "xdecor:multishelf", recipe = { diff --git a/nodes.lua b/nodes.lua index c424e85..905e9e9 100644 --- a/nodes.lua +++ b/nodes.lua @@ -435,13 +435,23 @@ xdecor.register("plant_pot", { sounds = default.node_sound_stone_defaults() }) -xdecor.register("moonbrick", { - drawtype = "normal", - description = "Moon Brick", - tiles = {"xdecor_moonbrick.png"}, - groups = {cracky=2}, - sounds = default.node_sound_stone_defaults(), + +for _, b in pairs({{"cactus", "cactus"}, {"moon", "stone"}}) do + xdecor.register(b[1].."brick", { + drawtype = "normal", + description = b[1]:gsub("^%l", string.upper).." Brick", + tiles = {"xdecor_"..b[1].."brick.png"}, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), + }) + + minetest.register_craft({ + output = "xdecor:"..b[1].."brick", + recipe = { + {"default:brick", "default:"..b[2]} + } }) +end xdecor.register("multishelf", { description = "Multi Shelf", diff --git a/textures/xdecor_cactusbrick.png b/textures/xdecor_cactusbrick.png new file mode 100644 index 0000000000000000000000000000000000000000..e6ce702b5c47e96605be7c55693ecbfabb5a26b1 GIT binary patch literal 886 zcmV-+1Bv{JP){@T10T;rj$Z1eyr5tJ1Fj2h z65Ie(VeH6xc4`kOuEm&{sf@NIl86Y^>H}t`rs;cifT$VK)zw9Ad6AAioj48{$0ces zsMl&FQz^nA#PpqZ^|OPsjOBY!0kN=KQ%3u4@ys2Q7_)@6NU1-#xS%;CACaFdqQ{*v=~#)3!AHg3RKD^4xD@j z^VjSRmDb3J