Expose mapgen parameters on scripting init

Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
This commit is contained in:
kwolekr 2014-12-29 12:58:55 -05:00 committed by Nils Dagsson Moskopp
parent 5ee1b776ba
commit c06d3f19e4
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 6 additions and 1 deletions

View File

@ -390,7 +390,6 @@ end
core.registered_on_chat_messages, core.register_on_chat_message = make_registration()
core.registered_globalsteps, core.register_globalstep = make_registration()
core.registered_playerevents, core.register_playerevent = make_registration()
core.registered_on_mapgen_inits, core.register_on_mapgen_init = make_registration()
core.registered_on_shutdown, core.register_on_shutdown = make_registration()
core.registered_on_punchnodes, core.register_on_punchnode = make_registration()
core.registered_on_placenodes, core.register_on_placenode = make_registration()
@ -409,3 +408,9 @@ core.registered_craft_predicts, core.register_craft_predict = make_registration(
core.registered_on_protection_violation, core.register_on_protection_violation = make_registration()
core.registered_on_item_eats, core.register_on_item_eat = make_registration()
--
-- Compatibility for on_mapgen_init()
--
core.register_on_mapgen_init = function(func) func(core.get_mapgen_params()) end