mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 14:42:24 +01:00
Add minetest.get_gen_notify to mapgen env (#14568)
This commit is contained in:
parent
2bdd0a6bdb
commit
ac4f13e78f
@ -1052,14 +1052,15 @@ int ModApiMapgen::l_get_gen_notify(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
|
||||
EmergeManager *emerge = getServer(L)->getEmergeManager();
|
||||
auto *emerge = getEmergeManager(L);
|
||||
|
||||
push_flags_string(L, flagdesc_gennotify, emerge->gen_notify_on,
|
||||
emerge->gen_notify_on);
|
||||
|
||||
lua_createtable(L, emerge->gen_notify_on_deco_ids.size(), 0);
|
||||
int i = 1;
|
||||
for (u32 id : emerge->gen_notify_on_deco_ids) {
|
||||
lua_pushnumber(L, id);
|
||||
lua_pushinteger(L, id);
|
||||
lua_rawseti(L, -2, i++);
|
||||
}
|
||||
|
||||
@ -2054,6 +2055,7 @@ void ModApiMapgen::InitializeEmerge(lua_State *L, int top)
|
||||
API_FCT(get_mapgen_setting);
|
||||
API_FCT(get_mapgen_setting_noiseparams);
|
||||
API_FCT(get_noiseparams);
|
||||
API_FCT(get_gen_notify);
|
||||
API_FCT(get_decoration_id);
|
||||
API_FCT(save_gen_notify);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user