From 2888f048e07b85e7f1a5afabee9819f56cb811eb Mon Sep 17 00:00:00 2001 From: sys4 Date: Sat, 25 Nov 2017 23:00:14 +0100 Subject: [PATCH] Add cherry door, trap_door, slab and stair --- depends.txt | 2 + init.lua | 83 +++++++++++++++++++++-------- textures/doors3_item_cherry.png | Bin 0 -> 286 bytes textures/doors_door3_cherry.png | Bin 0 -> 614 bytes textures/doors_door_cherry.png | Bin 0 -> 350 bytes textures/doors_item_cherry.png | Bin 0 -> 284 bytes textures/doors_trapdoor_cherry.png | Bin 0 -> 352 bytes 7 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 textures/doors3_item_cherry.png create mode 100644 textures/doors_door3_cherry.png create mode 100644 textures/doors_door_cherry.png create mode 100644 textures/doors_item_cherry.png create mode 100644 textures/doors_trapdoor_cherry.png diff --git a/depends.txt b/depends.txt index 4ad96d5..08f0a76 100644 --- a/depends.txt +++ b/depends.txt @@ -1 +1,3 @@ default +doors? +stairs? diff --git a/init.lua b/init.lua index 81e03ca..8dc3aa0 100644 --- a/init.lua +++ b/init.lua @@ -1,14 +1,7 @@ ---[[ - cherry_tree:cherry_tree - cherry_tree:cherry_plank - cherry_tree:cherry_blossom_leaves - cherry_tree:cherry_sapling ---]] - local random = math.random -- Cherry tree growing --- Sapling ABM +-- Sapling LBM -- Cherry tree generation local function grow_cherry_tree(pos) @@ -98,20 +91,6 @@ minetest.register_node( after_place_node = default.after_place_leaves, }) ---[[minetest.register_node("cherry_tree:cherry_leaves_deco", { - description = "Cherry Leaves", - drawtype = "allfaces_optional", - visual_scale = 1.3, - tiles = {"default_cherry_blossom_leaves.png"}, - paramtype = "light", - waving=1, - is_ground_content = false, - groups = {snappy=3, flammable=2, leaves=1}, - sounds = default.node_sound_leaves_defaults(), - drop = {'cherry_tree:cherry_blossom_leaves'}, - }) ---]] - minetest.register_node( "cherry_tree:cherry_sapling", { @@ -314,3 +293,63 @@ minetest.register_decoration( flags = "place_center_x", rotation = "random", }) + +if minetest.get_modpath("doors") then + -- Door from BFD: Cherry planks doors + doors.register( + "door_cherry", + { + tiles = {"doors_door_cherry.png"}, + description = "Cherry Door", + inventory_image = "doors_item_cherry.png", + groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1}, + sounds = default.node_sound_wood_defaults(), + recipe = { + {"cherry_tree:cherry_plank", "cherry_tree:cherry_plank"}, + {"cherry_tree:cherry_plank", "cherry_tree:cherry_plank"}, + {"cherry_tree:cherry_plank", "cherry_tree:cherry_plank"} + } + }) + minetest.register_alias("doors:door_wood_cherry", "doors:door_cherry") + + doors.register_trapdoor( + "cherry_tree:trapdoor_cherry", + { + description = "Cherry tree trapdoor", + inventory_image = "doors_trapdoor_cherry.png", + wields_images = "doors_trapdoor_cherry.png", + tile_front = "doors_trapdoor_cherry.png", + tile_side = "default_wood_cherry_planks.png", + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1}, + sounds = default.node_sound_wood_defaults(), + sound_open = "doors_door_open", + sound_close = "doors_door_close" + }) + + minetest.register_craft( + { + output = 'cherry_tree:trapdoor_cherry 2', + recipe = { + {'cherry_tree:cherry_plank', 'cherry_tree:cherry_plank', 'cherry_tree:cherry_plank'}, + {'cherry_tree:cherry_plank', 'cherry_tree:cherry_plank', 'cherry_tree:cherry_plank'}, + } + }) + + minetest.register_alias("doors:trapdoor_cherry", "cherry_tree:trapdoor_cherry") +end + +if minetest.get_modpath("stairs") then + -- From BFD: + + stairs.register_stair_and_slab( + "cherry_wood", + "cherry_tree:cherry_plank", + {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3}, + {"default_wood_cherry_planks.png"}, + "Cherry Plank Stair", + "Cherry Plank Slab", + "Cherry Plank Corner Stair", + default.node_sound_wood_defaults() + ) + +end diff --git a/textures/doors3_item_cherry.png b/textures/doors3_item_cherry.png new file mode 100644 index 0000000000000000000000000000000000000000..72ccb28f504bba295cf95703b0071244ecb284b7 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyW&u7Su0R?H;`KaI4SlNIlk2_G zCs}9Cb1z*H+PtBC{-&h9EuD*whfO>`dHa>ZlcpPBrHMwK0|i`2{mL zJiCzw6jf=4?Q8#wC?vpTPfzIGo}m&R$3sn#iQ+8`WX8 f&s1{ebp9jKzrXQb4sy)c2=b<B0000sP)t-s0001A zE=XlDOnOISe@bVPJ87Orb*NQ?u!o_QVCozmVv0s-T zaYFfB1U+XKg|%26%);ZhjzN1I{a1>4e-oyu)SPR@kyZGu@BON<6-x;VVr);`gjOI% z97$&fEizA2v>!znDt_wA;mVgtC7GvDa;Vpwo&TDC5m)>@30v1z%3%LKM!DPdXfjgCt1O+&HE z<;apSE#@thf}RmOQ_z`$&J=W}pfd&iZwkU=yCb;ty#wsU%B|89T*^v_tqNN)@25Li z=nXD~de+{wwqhye{Betx&N8UKG}>JU`~L%hIqfR^(@7f`dHa>ZlcpPBrHMwK0|i`2{mL zJiCzwz?603D$y5~h>x3+8<(uNG7AKUabFklD d{adS^_5c5QQnD;AOp8FC^mO%eS?83{1OO8JaK8Wm literal 0 HcmV?d00001 diff --git a/textures/doors_trapdoor_cherry.png b/textures/doors_trapdoor_cherry.png new file mode 100644 index 0000000000000000000000000000000000000000..ef16036d346cbda44b10229f6ceb8065586d0e62 GIT binary patch literal 352 zcmV-m0iXVfP)ax{3Il00001bW%=J06^y0W&i*H(n&-?RCob}lLZ2TF$hLohq93S-_%RqqungpfAligR*KS9-?+(HKO`b5jzYN-~7fnoJT4A?U`IJL3sv zEXY=WM}vih5M)|&_Kmy@p>K4nv0#jB&10ipx2;wzgdhR_9;{Mil2}OTd%|eSVL^vb y&SxFs@zgsOh{_9NQOd1+n6Y5LVit0(6$%%sv?IZ?1sf9p0000