mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 23:22:24 +01:00
Expose mapgen chunksize in on_mapgen_init callbacks
This commit is contained in:
parent
df0ca45ee2
commit
8fe1d3fc2e
@ -99,6 +99,9 @@ void ScriptApiEnv::environment_OnMapgenInit(MapgenParams *mgparams)
|
|||||||
lua_pushinteger(L, mgparams->water_level);
|
lua_pushinteger(L, mgparams->water_level);
|
||||||
lua_setfield(L, -2, "water_level");
|
lua_setfield(L, -2, "water_level");
|
||||||
|
|
||||||
|
lua_pushinteger(L, mgparams->chunksize);
|
||||||
|
lua_setfield(L, -2, "chunksize");
|
||||||
|
|
||||||
std::string flagstr = writeFlagString(mgparams->flags,
|
std::string flagstr = writeFlagString(mgparams->flags,
|
||||||
flagdesc_mapgen, (u32)-1);
|
flagdesc_mapgen, (u32)-1);
|
||||||
lua_pushstring(L, flagstr.c_str());
|
lua_pushstring(L, flagstr.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user