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:
178db04
)
sethome.get: Copy a return value
author
Rui
<rui.minetest@gmail.com>
Sat, 5 Nov 2016 02:17:05 +0000
(11:17 +0900)
committer
Auke Kok
<sofar+github@foo-projects.org>
Sun, 6 Nov 2016 02:59:15 +0000
(19:59 -0700)
mods/sethome/init.lua
patch
|
blob
|
history
diff --git
a/mods/sethome/init.lua
b/mods/sethome/init.lua
index 4246f7a52baa4a611cd02aebf7d6302f9eb16688..28bfcef6c9f73f58d3093eb18c0018fdb3be5f53 100644
(file)
--- a/
mods/sethome/init.lua
+++ b/
mods/sethome/init.lua
@@
-41,7
+41,12
@@
sethome.set = function(name, pos)
end
sethome.get = function(name)
- return homepos[name]
+ local pos = homepos[name]
+ if pos then
+ return vector.new(pos)
+ else
+ return nil
+ end
end
sethome.go = function(name)