Expose mapgen chunksize in on_mapgen_init callbacks

master
kwolekr 2014-12-14 18:46:19 -05:00
parent df0ca45ee2
commit 8fe1d3fc2e
1 changed files with 10 additions and 7 deletions

View File

@ -99,6 +99,9 @@ void ScriptApiEnv::environment_OnMapgenInit(MapgenParams *mgparams)
lua_pushinteger(L, mgparams->water_level);
lua_setfield(L, -2, "water_level");
lua_pushinteger(L, mgparams->chunksize);
lua_setfield(L, -2, "chunksize");
std::string flagstr = writeFlagString(mgparams->flags,
flagdesc_mapgen, (u32)-1);
lua_pushstring(L, flagstr.c_str());