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

Add map feature generation notify Lua API

This commit is contained in:
kwolekr 2013-12-14 01:52:06 -05:00
parent 83853ccd41
commit c3708b456e
12 changed files with 252 additions and 151 deletions

View file

@ -64,6 +64,16 @@ FlagDesc flagdesc_deco_schematic[] = {
{NULL, 0}
};
FlagDesc flagdesc_gennotify[] = {
{"dungeon", 1 << GENNOTIFY_DUNGEON},
{"temple", 1 << GENNOTIFY_TEMPLE},
{"cave_begin", 1 << GENNOTIFY_CAVE_BEGIN},
{"cave_end", 1 << GENNOTIFY_CAVE_END},
{"large_cave_begin", 1 << GENNOTIFY_LARGECAVE_BEGIN},
{"large_cave_end", 1 << GENNOTIFY_LARGECAVE_END},
{NULL, 0}
};
///////////////////////////////////////////////////////////////////////////////
@ -896,6 +906,15 @@ Mapgen::Mapgen() {
ndef = NULL;
heightmap = NULL;
biomemap = NULL;
for (unsigned int i = 0; i != NUM_GEN_NOTIFY; i++)
gen_notifications[i] = new std::vector<v3s16>;
}
Mapgen::~Mapgen() {
for (unsigned int i = 0; i != NUM_GEN_NOTIFY; i++)
delete gen_notifications[i];
}