diff options
author | kwolekr <kwolekr@minetest.net> | 2013-12-14 01:52:06 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-12-14 01:52:24 -0500 |
commit | c3708b456e90bccf19e7c82c54a93c8cb7c8896c (patch) | |
tree | 2f23bf39c67a34fc9582db07220b6f72209e1c39 /src/mapgen.cpp | |
parent | 83853ccd413c06a4a37a3c91f8c2cb270e42109c (diff) | |
download | minetest-c3708b456e90bccf19e7c82c54a93c8cb7c8896c.tar.gz minetest-c3708b456e90bccf19e7c82c54a93c8cb7c8896c.tar.bz2 minetest-c3708b456e90bccf19e7c82c54a93c8cb7c8896c.zip |
Add map feature generation notify Lua API
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r-- | src/mapgen.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 20fc4459b..3d5c7b3cc 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -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]; } |