projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d2a897
)
sethome: Do not write empty homes file
author
sfan5
<sfan5@live.de>
Wed, 10 Jun 2020 12:50:49 +0000
(14:50 +0200)
committer
sfan5
<sfan5@live.de>
Wed, 10 Jun 2020 18:29:50 +0000
(20:29 +0200)
mods/sethome/init.lua
patch
|
blob
|
history
diff --git
a/mods/sethome/init.lua
b/mods/sethome/init.lua
index bad7806de83dd05dc22ad76392c5b98704758f77..71874a99172972f883b9a68f35b5c037ca6fccf2 100644
(file)
--- a/
mods/sethome/init.lua
+++ b/
mods/sethome/init.lua
@@
-32,6
+32,9
@@
sethome.set = function(name, pos)
player:set_attribute("sethome:home", minetest.pos_to_string(pos))
-- remove `name` from the old storage file
+ if not homepos[name] then
+ return true
+ end
local data = {}
local output = io.open(homes_file, "w")
if output then