From 048aaa2616e25ee15cd04a0d50f1a61ff2bdcd38 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 13 Oct 2016 00:48:56 +0100 Subject: [PATCH] Default: Add bush stem and leaves nodes To allow mapgen bushes in green-grass and savanna grasslands. Nodes for a generic bush and an acacia bush. Stem nodes are craftable to a single wood node to provide a small amount of wood resource in grasslands. Fuel times are that of corresponding 'wood' nodes, 1/4 that of corresponding tree nodes. No leafdecay to enable use as hedges or without a nearby tree trunk. Uses 'default leaves simple' texture for extra visual thickness. --- mods/default/README.txt | 2 + mods/default/crafting.lua | 26 +++++++++ mods/default/nodes.lua | 54 ++++++++++++++++++ .../textures/default_acacia_bush_stem.png | Bin 0 -> 476 bytes mods/default/textures/default_bush_stem.png | Bin 0 -> 428 bytes 5 files changed, 82 insertions(+) create mode 100644 mods/default/textures/default_acacia_bush_stem.png create mode 100644 mods/default/textures/default_bush_stem.png diff --git a/mods/default/README.txt b/mods/default/README.txt index 9ae2c00..1990167 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -92,6 +92,8 @@ paramat (CC BY-SA 3.0): default_acacia_tree.png default_acacia_tree_top.png default_acacia_wood.png + default_acacia_bush_stem.png + default_bush_stem.png default_junglewood.png default_jungletree_top.png default_sandstone_brick.png diff --git a/mods/default/crafting.lua b/mods/default/crafting.lua index 7ce62d2..a7a0daa 100644 --- a/mods/default/crafting.lua +++ b/mods/default/crafting.lua @@ -35,6 +35,20 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:wood', + recipe = { + {'default:bush_stem'}, + } +}) + +minetest.register_craft({ + output = 'default:acacia_wood', + recipe = { + {'default:acacia_bush_stem'}, + } +}) + minetest.register_craft({ output = 'default:stick 4', recipe = { @@ -929,6 +943,18 @@ minetest.register_craft({ }) +minetest.register_craft({ + type = "fuel", + recipe = "default:bush_stem", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_bush_stem", + burntime = 8, +}) + minetest.register_craft({ type = "fuel", recipe = "default:junglegrass", diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index f185bde..23b9145 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -131,6 +131,11 @@ default:dry_grass_3 default:dry_grass_4 default:dry_grass_5 +default:bush_stem +default:bush_leaves +default:acacia_bush_stem +default:acacia_bush_leaves + Corals ------ @@ -1216,6 +1221,55 @@ for i = 2, 5 do end +minetest.register_node("default:bush_stem", { + description = "Bush Stem", + drawtype = "plantlike", + visual_scale = 1.18, + tiles = {"default_bush_stem.png"}, + inventory_image = "default_bush_stem.png", + wield_image = "default_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:bush_leaves", { + description = "Bush Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"default_leaves_simple.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("default:acacia_bush_stem", { + description = "Acacia Bush Stem", + drawtype = "plantlike", + visual_scale = 1.18, + tiles = {"default_acacia_bush_stem.png"}, + inventory_image = "default_acacia_bush_stem.png", + wield_image = "default_acacia_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:acacia_bush_leaves", { + description = "Acacia Bush Leaves", + drawtype = "allfaces_optional", + waving = 1, + visual_scale = 1.3, + tiles = {"default_acacia_leaves.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + sounds = default.node_sound_leaves_defaults(), +}) + + -- -- Corals -- diff --git a/mods/default/textures/default_acacia_bush_stem.png b/mods/default/textures/default_acacia_bush_stem.png new file mode 100644 index 0000000000000000000000000000000000000000..290391526e7bb902bb49076399868d936f0f073e GIT binary patch literal 476 zcmV<20VDp2P)+b|S`KgqI*Z6-}p`aHN@)Y%j=eb7!AHlYg&@6!Q>#(%P;+l3*6sasy4 z+DS*}N4f|8FZDNIvo0jfb9(D>y=A+*p1iBi*B@mH5D|Lk3EuH96P@K5oAswZMU*Di z5n5^V1o^x?6>~HjFq0&FeI=qq&_?5fC%kqp3(2x$LhsPYEWz29Ko}(nKpe-2_)&th zvXI656>ZxN>F$5tvskTAD#AqOAfgaN2_~5x5}cKVEKim^+}$DKao!D6*p!8&Sx(n= zgL?=B39LSx&@~NB)qn&RPy4?21Z(-WyH*-tdv&AgdXJ6`Ix?hLidLGYZb;JR1ltm}G`4DcJfIke(r Sq7MrI0000PyFB&2tgp)BDSdi|2Y-gDt)L`Ng$ZSvC~CLMMc6F)VnLs%$=(l z_SkcgMp5AK#TR1mZ}>1%yO zetZ9-s%r{sn-tELj41%9oX2~|dc99HrWMfc0g-|6q3n!h!B!A zJu(T0*q;+|jk(KM#o69A*#-I0Fd7d4m_{M{{Q*-p