Add minetest.registered_biomes
authorNovatux <nathanael.courant@laposte.net>
Mon, 5 Aug 2013 07:50:41 +0000 (09:50 +0200)
committerPilzAdam <pilzadam@minetest.net>
Tue, 6 Aug 2013 11:24:54 +0000 (13:24 +0200)
builtin/misc_register.lua

index d5e0867024c4f739da8b3b0943122ef1d2974a28..f1d8161245c2ef8a9ebfb6dc8195e63fc010c33b 100644 (file)
@@ -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