summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDuane Robertson <duane@duanerobertson.com>2015-09-29 12:38:08 -0500
committerest31 <MTest31@outlook.com>2015-10-02 22:49:31 +0200
commita5bdfb6b3cfddaac1e961bd8c8780c74ccde3567 (patch)
tree3844d522cc817395be35dfac4d9d61f562d0854e /doc
parent21944a0d3c5284f6bf1e61286ddbcc2ab2f1e2aa (diff)
downloadminetest-a5bdfb6b3cfddaac1e961bd8c8780c74ccde3567.tar.gz
minetest-a5bdfb6b3cfddaac1e961bd8c8780c74ccde3567.tar.bz2
minetest-a5bdfb6b3cfddaac1e961bd8c8780c74ccde3567.zip
Add get_biome_id(biome_name) callback
It returns the index used in mg->biomemap for a given biome name. The biomemap is useless without this unless you re-register all existing biomes, which could cause problems for anyone else trying to use biomemap. With this, you can quickly create a lookup table of ids and names.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 5b6e55ef3..7b0f1e2aa 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1999,6 +1999,9 @@ and `minetest.auth_reload` call the authetification handler.
* `get_gen_notify()`: returns a flagstring and a table with the deco_ids
* `minetest.get_mapgen_object(objectname)`
* Return requested mapgen object if available (see "Mapgen objects")
+* `minetest.get_biome_id(biome_name)`
+ * Returns the biome id, as used in the biomemap Mapgen object, for a
+ given biome_name string.
* `minetest.get_mapgen_params()` Returns mapgen parameters, a table containing
`mgname`, `seed`, `chunksize`, `water_level`, and `flags`.
* `minetest.set_mapgen_params(MapgenParams)`