aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-12-14 01:52:06 -0500
committerkwolekr <kwolekr@minetest.net>2013-12-14 01:52:24 -0500
commitc3708b456e90bccf19e7c82c54a93c8cb7c8896c (patch)
tree2f23bf39c67a34fc9582db07220b6f72209e1c39 /src/mapgen.cpp
parent83853ccd413c06a4a37a3c91f8c2cb270e42109c (diff)
downloadminetest-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.cpp19
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];
}