diff options
author | Jun Zhang <zhangjunphy@gmail.com> | 2015-12-05 21:00:11 +0800 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-12-06 11:38:03 +0100 |
commit | a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4 (patch) | |
tree | ace45f38b9a951185b158fb7e3435680afb5d376 /src/script | |
parent | 70ece71ee4e8f8bff5cbc572710c0fa6fc3b355f (diff) | |
download | minetest-a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4.tar.gz minetest-a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4.tar.bz2 minetest-a78dd7f2b6b0e1fefdbaa1ae21b722dd4459e4f4.zip |
Fix spelling of noise_threshold
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_mapgen.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index d5cf54f24..b29fd96ca 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -944,10 +944,19 @@ int ModApiMapgen::l_register_ore(lua_State *L) ore->clust_scarcity = getintfield_default(L, index, "clust_scarcity", 1); ore->clust_num_ores = getintfield_default(L, index, "clust_num_ores", 1); ore->clust_size = getintfield_default(L, index, "clust_size", 0); - ore->nthresh = getfloatfield_default(L, index, "noise_threshhold", 0); ore->noise = NULL; ore->flags = 0; + //// Get noise_threshold + warn_if_field_exists(L, index, "noise_threshhold", + "Deprecated: new name is \"noise_threshold\"."); + + int nthresh; + if (!getintfield(L, index, "noise_threshold", nthresh) && + !getintfield(L, index, "noise_threshhold", nthresh)) + nthresh = 0; + ore->nthresh = nthresh; + //// Get y_min/y_max warn_if_field_exists(L, index, "height_min", "Deprecated: new name is \"y_min\"."); |