From 79e8160a87a87101bb11e338f0d4cdbff3405436 Mon Sep 17 00:00:00 2001 From: Fernando Carmona Varo Date: Fri, 23 Oct 2015 19:45:31 +0200 Subject: Save state to disk on shutdown as well --- gamestate.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gamestate.lua b/gamestate.lua index 2e56307..1cad7f4 100755 --- a/gamestate.lua +++ b/gamestate.lua @@ -289,3 +289,8 @@ minetest.register_chatcommand("mypacman_exit", { end end }) + +minetest.register_on_shutdown(function() + minetest.log("action", "Server shuts down. Saving pacman data") + gamestate_save() +end) -- cgit v1.2.3