diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-19 02:08:13 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-19 02:08:13 -0800 |
commit | 4f887ce918b8cda1334e14a93123dc0f4691b45f (patch) | |
tree | f3c0833cdffed3e4eec5eee26a38864e988683bf /crawl-ref/source/l_crawl.cc | |
parent | b742e25f68bacaa9f6b39b649253635e66ecf3f8 (diff) | |
download | crawl-ref-4f887ce918b8cda1334e14a93123dc0f4691b45f.tar.gz crawl-ref-4f887ce918b8cda1334e14a93123dc0f4691b45f.zip |
you.is_tiles(): check if build is tiles or not
Diffstat (limited to 'crawl-ref/source/l_crawl.cc')
-rw-r--r-- | crawl-ref/source/l_crawl.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc index 0918a9f099..33dc9afacf 100644 --- a/crawl-ref/source/l_crawl.cc +++ b/crawl-ref/source/l_crawl.cc @@ -459,6 +459,17 @@ LUARET1(crawl_roll_dice, number, ? roll_dice( 1, luaL_checkint(ls, 1) ) : roll_dice( luaL_checkint(ls, 1), luaL_checkint(ls, 2) )) +static int crawl_is_tiles(lua_State *ls) +{ +#ifdef USE_TILE + lua_pushboolean(ls, true); +#else + lua_pushboolean(ls, false); +#endif + + return (1); +} + static int crawl_random_element(lua_State *ls) { const int table_idx = 1; @@ -583,6 +594,7 @@ static const struct luaL_reg crawl_clib[] = { "grammar", _crawl_grammar }, { "article_a", crawl_article_a }, { "game_started", crawl_game_started }, + { "is_tiles", crawl_is_tiles }, { "err_trace", crawl_err_trace }, { NULL, NULL }, |