mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API
This commit is contained in:
parent
18882a4d26
commit
2e292b67a0
18 changed files with 163 additions and 14 deletions
|
@ -807,7 +807,12 @@ Server::Server(
|
|||
ServerMap *servermap = new ServerMap(path_world, this, m_emerge);
|
||||
m_env = new ServerEnvironment(servermap, m_script, this, this);
|
||||
|
||||
m_emerge->initMapgens(servermap->getMapgenParams());
|
||||
// Run some callbacks after the MG params have been set up but before activation
|
||||
MapgenParams *mgparams = servermap->getMapgenParams();
|
||||
m_script->environment_OnMapgenInit(mgparams);
|
||||
|
||||
// Initialize mapgens
|
||||
m_emerge->initMapgens(mgparams);
|
||||
|
||||
// Give environment reference to scripting api
|
||||
m_script->initializeEnvironment(m_env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue