mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +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:
parent
21944a0d3c
commit
a5bdfb6b3c
3 changed files with 32 additions and 0 deletions
|
@ -24,6 +24,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
class ModApiMapgen : public ModApiBase {
|
||||
private:
|
||||
// get_biome_id(biomename)
|
||||
// returns the biome id used in biomemap
|
||||
static int l_get_biome_id(lua_State *L);
|
||||
|
||||
// get_mapgen_object(objectname)
|
||||
// returns the requested object used during map generation
|
||||
static int l_get_mapgen_object(lua_State *L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue