dont save if its not necessary on shutdown

This commit is contained in:
HybridDog 2015-12-25 14:21:16 +01:00
parent b657ea2c3a
commit 918d27db1f
1 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,11 @@ local function save()
end)
end
minetest.register_on_shutdown(save_to_file)
minetest.register_on_shutdown(function()
if saving then
save_to_file()
end
end)
-- test if it works