1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add emerge completion callback mechanism

Major refactor of emerge.cpp and Map::init/finishBlockMake
This commit is contained in:
kwolekr 2015-10-04 02:54:25 -04:00
parent 1f9c5a4a7b
commit 0850d3bb93
6 changed files with 624 additions and 572 deletions

View file

@ -61,8 +61,9 @@ FlagDesc flagdesc_gennotify[] = {
};
///////////////////////////////////////////////////////////////////////////////
////
//// Mapgen
////
Mapgen::Mapgen()
{
@ -340,8 +341,9 @@ void Mapgen::spreadLight(v3s16 nmin, v3s16 nmax)
}
///////////////////////////////////////////////////////////////////////////////
////
//// GenerateNotifier
////
GenerateNotifier::GenerateNotifier()
{
@ -407,7 +409,10 @@ void GenerateNotifier::getEvents(
m_notify_events.clear();
}
///////////////////////////////////////////////////////////////////////////////
////
//// MapgenParams
////
void MapgenParams::load(const Settings &settings)
{
@ -429,9 +434,11 @@ void MapgenParams::load(const Settings &settings)
settings.getNoiseParams("mg_biome_np_humidity_blend", np_biome_humidity_blend);
delete sparams;
sparams = EmergeManager::createMapgenParams(mg_name);
if (sparams)
MapgenFactory *mgfactory = EmergeManager::getMapgenFactory(mg_name);
if (mgfactory) {
sparams = mgfactory->createMapgenParams();
sparams->readParams(&settings);
}
}