Add shutdown hook interface to Lua API

Scripts can call minetest.register_on_shutdown() to register a
shutdown hook.

Document that minetest.register_on_shutdown() callbacks may not be run

If the server crashes, it is unlikely that callbacks registered using
minetest.register_on_shutdown() will be called.
This commit is contained in:
Matthew I 2012-09-08 14:44:26 -04:00 committed by Nils Dagsson Moskopp
parent 2d07416f38
commit f171cb855f
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 0 deletions

View File

@ -303,6 +303,7 @@ end
minetest.registered_on_chat_messages, minetest.register_on_chat_message = make_registration()
minetest.registered_globalsteps, minetest.register_globalstep = make_registration()
minetest.registered_on_shutdown, minetest.register_on_shutdown = make_registration()
minetest.registered_on_punchnodes, minetest.register_on_punchnode = make_registration()
minetest.registered_on_placenodes, minetest.register_on_placenode = make_registration()
minetest.registered_on_dignodes, minetest.register_on_dignode = make_registration()