From 6823ce99a7deabe410dd8b143b688cd364490cec Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sat, 16 Mar 2013 17:06:11 -0400 Subject: Re-add jungles, apple trees --- src/content_abm.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/content_abm.cpp') diff --git a/src/content_abm.cpp b/src/content_abm.cpp index a88450095..e50edddd7 100644 --- a/src/content_abm.cpp +++ b/src/content_abm.cpp @@ -99,6 +99,7 @@ public: { std::set s; s.insert("sapling"); + s.insert("junglesapling"); return s; } virtual float getTriggerInterval() @@ -111,16 +112,25 @@ public: INodeDefManager *ndef = env->getGameDef()->ndef(); ServerMap *map = &env->getServerMap(); - actionstream<<"A sapling grows into a tree at " - <getId("junglesapling"); + + actionstream <<"A " << (is_jungle_tree ? "jungle " : "") + << "sapling grows into a tree at " + << PP(p) << std::endl; std::map modified_blocks; v3s16 tree_p = p; ManualMapVoxelManipulator vmanip(map); v3s16 tree_blockp = getNodeBlockPos(tree_p); vmanip.initialEmerge(tree_blockp - v3s16(1,1,1), tree_blockp + v3s16(1,1,1)); - bool is_apple_tree = myrand()%4 == 0; - treegen::make_tree(vmanip, tree_p, is_apple_tree, ndef, myrand()); + + if (is_jungle_tree) { + treegen::make_jungletree(vmanip, tree_p, ndef, myrand()); + } else { + bool is_apple_tree = myrand() % 4 == 0; + treegen::make_tree(vmanip, tree_p, is_apple_tree, ndef, myrand()); + } + vmanip.blitBackAll(&modified_blocks); // update lighting -- cgit v1.2.3