diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-24 02:36:29 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-24 03:19:36 -0800 |
commit | dad87859c83fb353c991442a734b4bc6072c0fee (patch) | |
tree | d5dbd715fe1670e59fed86fa5f27394a4d7495da /crawl-ref/source/luaterp.cc | |
parent | db67164e0ffcc0aa6679294f720d39f75016a90a (diff) | |
download | crawl-ref-dad87859c83fb353c991442a734b4bc6072c0fee.tar.gz crawl-ref-dad87859c83fb353c991442a734b4bc6072c0fee.zip |
Auto-clear more while luaterp is running
Diffstat (limited to 'crawl-ref/source/luaterp.cc')
-rw-r--r-- | crawl-ref/source/luaterp.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/luaterp.cc b/crawl-ref/source/luaterp.cc index 745cfbc12c..48093d1eb6 100644 --- a/crawl-ref/source/luaterp.cc +++ b/crawl-ref/source/luaterp.cc @@ -106,8 +106,12 @@ static int _report(lua_State *ls, int status) return status; } +static bool _luaterp_running = false; + void run_clua_interpreter(lua_State *ls) { + _luaterp_running = true; + int status; mpr("[Hit ESC to exit interpreter.]"); while ((status = _loadline(ls)) != -1) @@ -127,6 +131,13 @@ void run_clua_interpreter(lua_State *ls) } } lua_settop(ls, 0); // clear stack + + _luaterp_running = false; +} + +bool luaterp_running() +{ + return (_luaterp_running); } static bool _loaded_terp_files = false; @@ -135,6 +146,7 @@ void debug_terp_dlua() { if (!_loaded_terp_files) { + dlua.execfile("clua/debug.lua", false, false); for (unsigned int i = 0; i < Options.terp_files.size(); i++) { dlua.execfile(Options.terp_files[i].c_str(), false, false); |