projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96c34d3
)
Add minetest.registered_biomes
author
Novatux
<nathanael.courant@laposte.net>
Mon, 5 Aug 2013 07:50:41 +0000
(09:50 +0200)
committer
PilzAdam
<pilzadam@minetest.net>
Tue, 6 Aug 2013 11:24:54 +0000
(13:24 +0200)
builtin/misc_register.lua
patch
|
blob
|
history
diff --git
a/builtin/misc_register.lua
b/builtin/misc_register.lua
index d5e0867024c4f739da8b3b0943122ef1d2974a28..f1d8161245c2ef8a9ebfb6dc8195e63fc010c33b 100644
(file)
--- a/
builtin/misc_register.lua
+++ b/
builtin/misc_register.lua
@@
-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