From d45e5da8ca808e552123bcd94e76b0b435a6ea79 Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 22 Sep 2017 12:38:55 +0100 Subject: 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. --- src/script/lua_api/l_mapgen.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/script/lua_api/l_mapgen.h') 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); -- cgit v1.2.3