summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:45:31 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-23 19:45:31 +0200
commit79e8160a87a87101bb11e338f0d4cdbff3405436 (patch)
treebd02c2c61e82d7fede635829801e247230e0e754
parent6ace1a5e3a8892253c0e744650419d7dc20898f4 (diff)
Save state to disk on shutdown as well
-rwxr-xr-xgamestate.lua5
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)