Skip to content

Commit

Permalink
Add minetest.registered_biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekdohibs authored and PilzAdam committed Aug 6, 2013
1 parent 96c34d3 commit 14eab22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/misc_register.lua
Expand Up @@ -223,6 +223,13 @@ function minetest.register_alias(name, convert_to)
end
end

local register_biome_raw = minetest.register_biome
minetest.registered_biomes = {}
function minetest.register_biome(biome)
minetest.registered_biomes[biome.name] = biome
register_biome_raw(biome)
end

-- Alias the forbidden item names to "" so they can't be
-- created via itemstrings (e.g. /give)
local name
Expand Down

2 comments on commit 14eab22

@4Evergreen4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me thinks someone forgot to add this to the lua_api.txt.

@PilzAdam
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@4Evergreen4 no, since register_biome() is not in lua-api.txt

Please sign in to comment.