summaryrefslogtreecommitdiff
path: root/library/lua
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-08-19 14:27:44 +0400
committerAlexander Gavrilov2012-08-19 14:27:44 +0400
commit30f71ff5106d271d04bfa26b976441cfa9b2abf6 (patch)
treeced0b058f615b90a75c495be1f4db6045100b972 /library/lua
parentb8ee52131bccd174f06c9124980bbcb8df7c80e4 (diff)
downloaddfhack-30f71ff5106d271d04bfa26b976441cfa9b2abf6.tar.gz
dfhack-30f71ff5106d271d04bfa26b976441cfa9b2abf6.tar.bz2
dfhack-30f71ff5106d271d04bfa26b976441cfa9b2abf6.tar.xz
Implement support for lua-backed viewscreens.
Diffstat (limited to 'library/lua')
-rw-r--r--library/lua/dfhack.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/lua/dfhack.lua b/library/lua/dfhack.lua
index 86ea1459..8c8a75aa 100644
--- a/library/lua/dfhack.lua
+++ b/library/lua/dfhack.lua
@@ -188,6 +188,12 @@ function dfhack.buildings.getSize(bld)
return bld.x2+1-x, bld.y2+1-y, bld.centerx-x, bld.centery-y
end
+dfhack.screen.__index = dfhack.screen
+
+function dfhack.screen:__tostring()
+ return "<lua viewscreen: "..tostring(self._native)..">"
+end
+
-- Interactive
local print_banner = true