From 1a2eb89f17d1228d81b44516c62cabfe13d093c3 Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 18 Jul 2016 22:50:00 +0100 Subject: [PATCH] Default/trees: Update to 'get_mapgen_setting()' --- mods/default/trees.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/default/trees.lua b/mods/default/trees.lua index 07071c74..dbcdcfaf 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -43,12 +43,12 @@ function default.grow_sapling(pos) return end - local mapgen = minetest.get_mapgen_params().mgname + local mg_name = minetest.get_mapgen_setting("mg_name") local node = minetest.get_node(pos) if node.name == "default:sapling" then minetest.log("action", "A sapling grows into a tree at ".. minetest.pos_to_string(pos)) - if mapgen == "v6" then + if mg_name == "v6" then default.grow_tree(pos, random(1, 4) == 1) else default.grow_new_apple_tree(pos) @@ -56,7 +56,7 @@ function default.grow_sapling(pos) elseif node.name == "default:junglesapling" then minetest.log("action", "A jungle sapling grows into a tree at ".. minetest.pos_to_string(pos)) - if mapgen == "v6" then + if mg_name == "v6" then default.grow_jungle_tree(pos) else default.grow_new_jungle_tree(pos) @@ -65,7 +65,7 @@ function default.grow_sapling(pos) minetest.log("action", "A pine sapling grows into a tree at ".. minetest.pos_to_string(pos)) local snow = is_snow_nearby(pos) - if mapgen == "v6" then + if mg_name == "v6" then default.grow_pine_tree(pos, snow) elseif snow then default.grow_new_snowy_pine_tree(pos)