Skip to content
Snippets Groups Projects
Commit af045dcd authored by sfan5's avatar sfan5
Browse files

sethome: Do not write empty homes file

parent 6d2a897e
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,9 @@ sethome.set = function(name, pos) ...@@ -32,6 +32,9 @@ sethome.set = function(name, pos)
player:set_attribute("sethome:home", minetest.pos_to_string(pos)) player:set_attribute("sethome:home", minetest.pos_to_string(pos))
-- remove `name` from the old storage file -- remove `name` from the old storage file
if not homepos[name] then
return true
end
local data = {} local data = {}
local output = io.open(homes_file, "w") local output = io.open(homes_file, "w")
if output then if output then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment