diff options
author | paramat <paramat@users.noreply.github.com> | 2017-09-22 12:38:55 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2018-01-16 08:47:07 +0000 |
commit | d45e5da8ca808e552123bcd94e76b0b435a6ea79 (patch) | |
tree | 356623d2625c8e2aab94de35f7b1790dfe998d71 /src/script/lua_api/l_mapgen.h | |
parent | 4c0d4e4105d2f2e63b9a43bb83fecf92288f63b3 (diff) | |
download | minetest-d45e5da8ca808e552123bcd94e76b0b435a6ea79.tar.xz |
Biomes: Add 'get heat', 'get humidity', 'get biome data' APIs
'get biome data' returns biome id, heat and humidity.
Clean up nearby lines in lua_api.txt.
Diffstat (limited to 'src/script/lua_api/l_mapgen.h')
-rw-r--r-- | src/script/lua_api/l_mapgen.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mapgen.h b/src/script/lua_api/l_mapgen.h index 89b825be2..f6a821b4e 100644 --- a/src/script/lua_api/l_mapgen.h +++ b/src/script/lua_api/l_mapgen.h @@ -25,9 +25,21 @@ class ModApiMapgen : public ModApiBase { private: // get_biome_id(biomename) - // returns the biome id used in biomemap + // returns the biome id as used in biomemap and returned by 'get_biome_data()' static int l_get_biome_id(lua_State *L); + // get_heat(pos) + // returns the heat at the position + static int l_get_heat(lua_State *L); + + // get_humidity(pos) + // returns the humidity at the position + static int l_get_humidity(lua_State *L); + + // get_biome_data(pos) + // returns a table containing the biome id, heat and humidity at the position + static int l_get_biome_data(lua_State *L); + // get_mapgen_object(objectname) // returns the requested object used during map generation static int l_get_mapgen_object(lua_State *L); |