Added minetest.registered... for ore, biome and decoration

This commit is contained in:
Gael-de-Sailly 2014-10-24 18:37:19 +02:00
parent 73bf791fe1
commit f4b1b62173
1 changed files with 32 additions and 0 deletions

View File

@ -10,6 +10,15 @@ core.register_item_raw = nil
local register_alias_raw = core.register_alias_raw
core.register_alias_raw = nil
local register_ore_raw = core.register_ore
core.register_ore = nil
local register_decoration_raw = core.register_decoration
core.register_decoration = nil
local register_biome_raw = core.register_biome
core.register_biome = nil
--
-- Item / entity / ABM registration functions
--
@ -371,6 +380,29 @@ function core.run_callbacks(callbacks, mode, ...)
return ret
end
--
-- Mapgen registrations functions
--
core.registered_ores = {}
core.registered_decorations = {}
core.registered_biomes = {}
function core.register_ore(def)
table.insert(core.registered_ores, def)
register_ore_raw(def)
end
function core.register_decoration(def)
table.insert(core.registered_decorations, def)
register_decoration_raw(def)
end
function core.register_biome(def)
table.insert(core.registered_biomes, def)
register_biome_raw(def)
end
--
-- Callback registration
--