summaryrefslogtreecommitdiff
path: root/library/lua
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-13 13:58:41 +0400
committerAlexander Gavrilov2012-05-13 13:58:41 +0400
commit87ec1de891625e9dc68924c570ede0fe23b4b6b7 (patch)
treebedeb0dbfa1ba179c6ad803ed0c253515d73bdc6 /library/lua
parentc6b52067bd90a2f7832a94a74cfd0e4ec0a8641c (diff)
downloaddfhack-87ec1de891625e9dc68924c570ede0fe23b4b6b7.tar.gz
dfhack-87ec1de891625e9dc68924c570ede0fe23b4b6b7.tar.bz2
dfhack-87ec1de891625e9dc68924c570ede0fe23b4b6b7.tar.xz
Improve lua api for tile biome access.
Diffstat (limited to 'library/lua')
-rw-r--r--library/lua/dfhack.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/lua/dfhack.lua b/library/lua/dfhack.lua
index c0ba6437..926600c0 100644
--- a/library/lua/dfhack.lua
+++ b/library/lua/dfhack.lua
@@ -111,9 +111,11 @@ function copyall(table)
end
function pos2xyz(pos)
- local x = pos.x
- if x and x ~= -30000 then
- return x, pos.y, pos.z
+ if pos then
+ local x = pos.x
+ if x and x ~= -30000 then
+ return x, pos.y, pos.z
+ end
end
end