From 337bdab4afc207df77c95bdaf025e8a5dad9b2ad Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 11 May 2022 23:17:57 +0200 Subject: [PATCH] Add more growth variants for saplings --- mods/rp_default/functions.lua | 30 +++++++++++++++++- .../rp_default_swamp_apple_tree.mts | Bin 0 -> 148 bytes 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 mods/rp_default/schematics/rp_default_swamp_apple_tree.mts diff --git a/mods/rp_default/functions.lua b/mods/rp_default/functions.lua index e97c140..68f8665 100644 --- a/mods/rp_default/functions.lua +++ b/mods/rp_default/functions.lua @@ -107,6 +107,7 @@ local sapling_data = { ["rp_default:sapling"] = { grows_to = { ["dry"] = "normal_tiny", + ["swamp"] = "apple_swamp", ["default"] = "apple", }, grow_time_min = 300, @@ -124,6 +125,7 @@ local sapling_data = { ["rp_default:sapling_birch"] = { grows_to = { ["dry"] = "birch_tiny", + ["swamp"] = "birch_swamp", ["default"] = "birch", }, grows_to = "birch", @@ -132,6 +134,8 @@ local sapling_data = { }, ["rp_default:sapling_dry_bush"] = { grows_to = { + ["dry"] = "dry_bush", + ["swamp"] = "dry_bush_small", ["default"] = "dry_bush", }, grows_to = "dry_bush", @@ -157,6 +161,14 @@ local tree_data = { { vector.new(-1,2,-1), vector.new(1,4,1) }, }, }, + ["apple_swamp"] = { + schem = "rp_default_swamp_apple_tree.mts", + offset = vector.new(-2, -1, -2), + space = { + { vector.new(0,0,0), vector.new(0,2,0) }, + { vector.new(-2,3,-2), vector.new(2,4,2) }, + }, + }, ["oak"] = { schem = "default_oaktree.mts", offset = vector.new(-2, -1, -2), @@ -194,6 +206,14 @@ local tree_data = { { vector.new(-1,2,-1), vector.new(1,4,1) }, }, }, + ["birch_swamp"] = { + schem = "rp_default_swamp_birch.mts", + offset = vector.new(-2, -1, -2), + space = { + { vector.new(0,0,0), vector.new(0,3,0) }, + { vector.new(-1,4,-1), vector.new(1,6,1) }, + }, + }, ["birch_tiny"] = { schem = "rp_default_tiny_birch.mts", offset = vector.new(-1, -1, -1), @@ -209,6 +229,14 @@ local tree_data = { { vector.new(0,0,0), vector.new(0,1,0) }, }, }, + ["dry_bush_small"] = { + schem = "default_shrub.mts", + replacements = {["default:leaves"] = "rp_default:dry_leaves"}, + offset = vector.new(-1, -1, -1), + space = { + { vector.new(0,0,0), vector.new(0,1,0) }, + }, + }, } function default.check_sapling_space(pos, variety) @@ -276,7 +304,7 @@ function default.grow_sapling(pos) minetest.place_schematic( opos, minetest.get_modpath("rp_default") .. "/schematics/" .. tdata.schem, - "0", replacements, false) + "random", replacements, false) end local node = minetest.get_node(pos) diff --git a/mods/rp_default/schematics/rp_default_swamp_apple_tree.mts b/mods/rp_default/schematics/rp_default_swamp_apple_tree.mts new file mode 100644 index 0000000000000000000000000000000000000000..7a6a7ac4b25bfbcc8439a555c8134c27ac50627d GIT binary patch literal 148 zcmeYb3HD`RVPIuoV_>ZZ10at%F|&w4pr{}|B{eOvG^fNWv7jI)l|c|mBqueoEVY<{ zA4#aBC^fZWPI7_*hr~h?VTno1Gad+B6-nE{bw_7HR+>(g=EmtFcYiq8a$LXuIFNxU fKs6!t|HRH;zy23Q{;AsNE&S<#0~3S6Z{ZaH9;!E~ literal 0 HcmV?d00001