From e362a71223bd447b334ff3b2966675e6eeda4c2b Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 24 Nov 2009 01:27:21 -0800 Subject: craw.more_autoclear() --- crawl-ref/source/l_crawl.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crawl-ref') 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 }, -- cgit v1.2.3-54-g00ecf