summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mapgen.cpp
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2017-09-03 21:32:21 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-09-03 22:32:21 +0200
commit9f6d90aa811dd8f523b137d602127d31307ea15c (patch)
treefa92018a3ddd212f30fbfe08804313218153d0b9 /src/script/lua_api/l_mapgen.cpp
parent5bef3393889e0a29155a7e777d19344eaaae96b7 (diff)
downloadminetest-9f6d90aa811dd8f523b137d602127d31307ea15c.tar.gz
minetest-9f6d90aa811dd8f523b137d602127d31307ea15c.tar.bz2
minetest-9f6d90aa811dd8f523b137d602127d31307ea15c.zip
Ores: Add stratum ore (#6352)
Creates a single undulating ore stratum that is continuous across mapchunk borders and horizontally spans the world. Due to being continuous is ideal for creating bands of alternative stone type running through cliffs and mountains, or underground layers. Add missing documentation of 'ore_param2' parameter.
Diffstat (limited to 'src/script/lua_api/l_mapgen.cpp')
-rw-r--r--src/script/lua_api/l_mapgen.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 0875e2c95..c2b256228 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -73,6 +73,7 @@ struct EnumString ModApiMapgen::es_OreType[] =
{ORE_PUFF, "puff"},
{ORE_BLOB, "blob"},
{ORE_VEIN, "vein"},
+ {ORE_STRATUM, "stratum"},
{0, NULL},
};
@@ -1149,6 +1150,15 @@ int ModApiMapgen::l_register_ore(lua_State *L)
break;
}
+ case ORE_STRATUM: {
+ OreStratum *orestratum = (OreStratum *)ore;
+
+ lua_getfield(L, index, "np_stratum_thickness");
+ read_noiseparams(L, -1, &orestratum->np_stratum_thickness);
+ lua_pop(L, 1);
+
+ break;
+ }
default:
break;
}