diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-23 19:45:31 +0200 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-10-23 19:45:31 +0200 |
commit | 79e8160a87a87101bb11e338f0d4cdbff3405436 (patch) | |
tree | bd02c2c61e82d7fede635829801e247230e0e754 | |
parent | 6ace1a5e3a8892253c0e744650419d7dc20898f4 (diff) |
Save state to disk on shutdown as well
-rwxr-xr-x | gamestate.lua | 5 |
1 files changed, 5 insertions, 0 deletions
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) |