summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_crawl.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-24 01:27:21 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-24 03:19:36 -0800
commite362a71223bd447b334ff3b2966675e6eeda4c2b (patch)
tree04886179a7d1895d05175eb826b4cdd6d6c314a6 /crawl-ref/source/l_crawl.cc
parent2805b3beebfd7913794a412cc5a2d68042051257 (diff)
downloadcrawl-ref-e362a71223bd447b334ff3b2966675e6eeda4c2b.tar.gz
crawl-ref-e362a71223bd447b334ff3b2966675e6eeda4c2b.zip
craw.more_autoclear()
Diffstat (limited to 'crawl-ref/source/l_crawl.cc')
-rw-r--r--crawl-ref/source/l_crawl.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc
index c1cf529245..22901c08be 100644
--- a/crawl-ref/source/l_crawl.cc
+++ b/crawl-ref/source/l_crawl.cc
@@ -92,6 +92,18 @@ LUAWRAP(crawl_more, more())
LUAWRAP(crawl_mesclr, mesclr())
LUAWRAP(crawl_redraw_screen, redraw_screen())
+static int crawl_set_more_autoclear(lua_State *ls)
+{
+ if (lua_isnone(ls, 1))
+ {
+ luaL_argerror(ls, 1, "needs a boolean argument");
+ return (0);
+ }
+ set_more_autoclear( lua_toboolean(ls, 1) );
+
+ return (0);
+}
+
static int crawl_input_line(lua_State *ls)
{
// This is arbitrary, but anybody entering so many characters is psychotic.
@@ -561,6 +573,7 @@ static const struct luaL_reg crawl_clib[] =
{ "mpr", crawl_mpr },
{ "formatted_mpr", crawl_formatted_mpr },
{ "more", crawl_more },
+ { "more_autoclear", crawl_set_more_autoclear },
{ "mesclr", crawl_mesclr },
{ "random2", crawl_random2 },
{ "one_chance_in", crawl_one_chance_in },