2014-08-04 22:18:20 +02:00
-- reserve namespace for the villages
mg_villages = { }
mg_villages.all_villages = { }
mg_villages.mg_generated_map = { }
mg_villages.anz_villages = 0 ;
mg_villages.modpath = minetest.get_modpath ( " mg_villages " ) ;
dofile ( mg_villages.modpath .. " /save_restore.lua " )
mg_villages.all_villages = save_restore.restore_data ( ' mg_all_villages.data ' ) ; -- read mg_villages.all_villages data saved for this world from previous runs
mg_villages.mg_generated_map = save_restore.restore_data ( ' mg_generated_map.data ' ) ;
2014-10-13 17:59:48 +02:00
dofile ( mg_villages.modpath .. " /config.lua " )
2014-08-04 22:18:20 +02:00
dofile ( mg_villages.modpath .. " /we.lua " )
dofile ( mg_villages.modpath .. " /rotate.lua " )
-- read size from schematics files directly
-- analyze_mts_file.lua uses handle_schematics.* namespace
dofile ( mg_villages.modpath .. " /analyze_mts_file.lua " )
2014-08-05 19:49:02 +02:00
-- adds a special gravel node which will neither fall nor be griefed by mapgen
dofile ( mg_villages.modpath .. " /nodes.lua " )
2014-08-04 22:18:20 +02:00
-- Note: the "buildings" talbe is not in the mg_villages.* namespace
dofile ( mg_villages.modpath .. " /buildings.lua " )
-- replace some materials for entire villages randomly
dofile ( mg_villages.modpath .. " /replacements.lua " )
2014-09-20 17:53:20 +02:00
-- generate village names
dofile ( mg_villages.modpath .. " /name_gen.lua " ) ;
2014-10-08 00:23:29 +02:00
dofile ( mg_villages.modpath .. " /place_buildings.lua " )
2014-08-04 22:18:20 +02:00
dofile ( mg_villages.modpath .. " /villages.lua " )
-- adds a command that allows to teleport to a known village
dofile ( mg_villages.modpath .. " /chat_commands.lua " )
-- protect villages from griefing
dofile ( mg_villages.modpath .. " /protection.lua " )
-- create and show a map of the world
dofile ( mg_villages.modpath .. " /map_of_world.lua " )
2014-08-05 01:24:11 +02:00
2014-09-28 03:56:24 +02:00
dofile ( mg_villages.modpath .. " /fill_chest.lua " )
2014-08-05 01:24:11 +02:00
-- the interface for the mapgen;
-- also takes care of spawning the player
dofile ( mg_villages.modpath .. " /mapgen.lua " )
2014-10-13 17:17:42 +02:00
dofile ( mg_villages.modpath .. " /spawn_player.lua " )