1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

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.
This commit is contained in:
Duane Robertson 2015-09-29 12:38:08 -05:00 committed by est31
parent 21944a0d3c
commit a5bdfb6b3c
3 changed files with 32 additions and 0 deletions

View file

@ -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)`