moved mg tree handling to trees.lua

master
Sokomine 2020-09-20 11:58:23 +02:00
parent 2fcdaa4534
commit 4229e3a504
2 changed files with 7 additions and 7 deletions

View File

@ -764,13 +764,6 @@ mg_villages.change_village_height = function( village, new_height )
end
-- those functions from the mg mod do not have their own namespace
if( minetest.get_modpath( 'mg' )) then
mg_villages.add_savannatree = add_savannatree;
mg_villages.add_pinetree = add_pinetree;
end
-- places trees and plants at empty spaces
mg_villages.village_area_fill_with_plants = function( village_area, villages, minp, maxp, data, param2_data, a, cid, trees_to_grow_via_voxelmanip )
-- do not place any plants if we are working on the mapchunk above

View File

@ -2,6 +2,13 @@
-- schematics placed in villages and in the flattened/partly
-- flattened area around the village
-- those functions from the mg mod do not have their own namespace
-- (and this is too little to warrant a trees_mg.lua)
if( minetest.get_modpath( 'mg' )) then
mg_villages.add_savannatree = add_savannatree
mg_villages.add_pinetree = add_pinetree
end
-- figure out which tree to grow in RealTest
-- (this is also accessed in mapgen.lua)
mg_villages.sapling_to_tree_realtest = {}