diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-28 12:48:41 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-28 12:51:30 +0100 |
commit | ed83b86f12e6ad5b8362d96bbe512303b2141d55 (patch) | |
tree | 2cc17ab192c40ff4b3a8eac8ba9d6307bc5ed28e /crawl-ref | |
parent | de5375ccbc459165132ecb26c466ba677a3247a8 (diff) | |
download | crawl-ref-ed83b86f12e6ad5b8362d96bbe512303b2141d55.tar.gz crawl-ref-ed83b86f12e6ad5b8362d96bbe512303b2141d55.zip |
Luaterp: introductory comments and renaming.
To use, set "delay_message_clear = true" and call wizard mode Ctrl+T.
To echo return values from statements, prefix them with '=' and
define the global __echo. (__echo = crawl.mpr will work for single
return values.)
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/luaterp.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/luaterp.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 5548e9ae3d..9171b9bbcb 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -479,7 +479,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail) case CONTROL('H'): wizard_set_hunger_state(); break; case CONTROL('I'): debug_item_statistics(); break; case CONTROL('L'): wizard_set_xl(); break; - case CONTROL('T'): debug_call_dlua(); break; + case CONTROL('T'): debug_terp_dlua(); break; case 'O': debug_test_explore(); break; case 'S': wizard_set_skill_level(); break; diff --git a/crawl-ref/source/luaterp.cc b/crawl-ref/source/luaterp.cc index 5ccbfffbc1..1b60e1d013 100644 --- a/crawl-ref/source/luaterp.cc +++ b/crawl-ref/source/luaterp.cc @@ -3,6 +3,13 @@ * Summary: An interactive lua interpreter. * * Based heavily on lua.c from the Lua distribution. + * + * Deficiencies: + * - Currently requires defining a global function __echo + * to echo results. + * - Currently requires prefixing with '=' if you want results echoed. + * - Appears to require delay_message_clear = true. + * - Old input lines are not visible. */ #include "AppHdr.h" @@ -122,8 +129,7 @@ void run_clua_interpreter(lua_State *ls) lua_settop(ls, 0); // clear stack } -void debug_call_dlua() +void debug_terp_dlua() { run_clua_interpreter(dlua); } - diff --git a/crawl-ref/source/luaterp.h b/crawl-ref/source/luaterp.h index aa8cd6b9cf..6e8a2b7d74 100644 --- a/crawl-ref/source/luaterp.h +++ b/crawl-ref/source/luaterp.h @@ -1,7 +1,7 @@ #ifndef DEBUGLUA_H #define DEBUGLUA_H -void debug_call_dlua(); +void debug_terp_dlua(); #endif |