aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/luaapi.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-07-06 02:21:35 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-06 02:21:54 -0400
commit18d7bc7fa1f2621eb593969b7bcccfeb4918c05f (patch)
treeeaff36cef37b8a219732d7a85357f0755b608181 /src/script/lua_api/luaapi.cpp
parent3607fae75a00a1d0fee1b5caf58d04dcd9e2bc3a (diff)
downloadminetest-18d7bc7fa1f2621eb593969b7bcccfeb4918c05f.tar.gz
minetest-18d7bc7fa1f2621eb593969b7bcccfeb4918c05f.tar.bz2
minetest-18d7bc7fa1f2621eb593969b7bcccfeb4918c05f.zip
Mapgen V7: Huge rewrite, also tweaks to cavegen et al.
Diffstat (limited to 'src/script/lua_api/luaapi.cpp')
-rw-r--r--src/script/lua_api/luaapi.cpp40
1 files changed, 27 insertions, 13 deletions
diff --git a/src/script/lua_api/luaapi.cpp b/src/script/lua_api/luaapi.cpp
index de0c3a670..020d1cf32 100644
--- a/src/script/lua_api/luaapi.cpp
+++ b/src/script/lua_api/luaapi.cpp
@@ -204,19 +204,33 @@ int ModApiBasic::l_register_biome(lua_State *L)
"terrain_type", es_BiomeTerrainType, BIOME_TERRAIN_NORMAL);
Biome *b = bmgr->createBiome(terrain);
- b->name = getstringfield_default(L, index, "name", "");
- b->top_nodename = getstringfield_default(L, index, "top_node", "");
- b->top_depth = getintfield_default(L, index, "top_depth", 0);
- b->filler_nodename = getstringfield_default(L, index, "filler_node", "");
- b->filler_height = getintfield_default(L, index, "filler_height", 0);
- b->height_min = getintfield_default(L, index, "height_min", 0);
- b->height_max = getintfield_default(L, index, "height_max", 0);
- b->heat_point = getfloatfield_default(L, index, "heat_point", 0.);
- b->humidity_point = getfloatfield_default(L, index, "humidity_point", 0.);
-
- b->flags = 0; //reserved
- b->c_top = CONTENT_IGNORE;
- b->c_filler = CONTENT_IGNORE;
+ b->name = getstringfield_default(L, index, "name",
+ "<no name>");
+ b->nname_top = getstringfield_default(L, index, "node_top",
+ "mapgen_dirt_with_grass");
+ b->nname_filler = getstringfield_default(L, index, "node_filler",
+ "mapgen_dirt");
+ b->nname_water = getstringfield_default(L, index, "node_water",
+ "mapgen_water_source");
+ b->nname_dust = getstringfield_default(L, index, "node_dust",
+ "air");
+ b->nname_dust_water = getstringfield_default(L, index, "node_dust_water",
+ "mapgen_water_source");
+
+ b->depth_top = getintfield_default(L, index, "depth_top", 1);
+ b->depth_filler = getintfield_default(L, index, "depth_filler", 3);
+ b->height_min = getintfield_default(L, index, "height_min", 0);
+ b->height_max = getintfield_default(L, index, "height_max", 0);
+ b->heat_point = getfloatfield_default(L, index, "heat_point", 0.);
+ b->humidity_point = getfloatfield_default(L, index, "humidity_point", 0.);
+
+ b->flags = 0; //reserved
+ b->c_top = CONTENT_IGNORE;
+ b->c_filler = CONTENT_IGNORE;
+ b->c_water = CONTENT_IGNORE;
+ b->c_dust = CONTENT_IGNORE;
+ b->c_dust_water = CONTENT_IGNORE;
+
verbosestream << "register_biome: " << b->name << std::endl;
bmgr->addBiome(b);