summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_crawl.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-06-28 01:47:02 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-06-28 01:47:02 +0200
commit0c8e6fc58f795c23f28994764781d757048206de (patch)
tree9ba4e02f71ff9313d492b7b48f4798481429be4e /crawl-ref/source/l_crawl.cc
parentc2af7258da88fad2ccd46ea284d21fbb1636a7b1 (diff)
downloadcrawl-ref-0c8e6fc58f795c23f28994764781d757048206de.tar.gz
crawl-ref-0c8e6fc58f795c23f28994764781d757048206de.zip
Put tutorial messages for tutorial 5 into the database.
Diffstat (limited to 'crawl-ref/source/l_crawl.cc')
-rw-r--r--crawl-ref/source/l_crawl.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/l_crawl.cc b/crawl-ref/source/l_crawl.cc
index b7ba583b2d..7f96a1331b 100644
--- a/crawl-ref/source/l_crawl.cc
+++ b/crawl-ref/source/l_crawl.cc
@@ -21,6 +21,7 @@ module "crawl"
#include "directn.h"
#include "format.h"
#include "hiscores.h"
+#include "hints.h"
#include "initfile.h"
#include "itemname.h"
#include "libutil.h"
@@ -768,6 +769,15 @@ static int crawl_err_trace(lua_State *ls)
return (lua_gettop(ls));
}
+static int crawl_tutorial_msg(lua_State *ls)
+{
+ const char *key = luaL_checkstring(ls, 1);
+ if (!key)
+ return 0;
+ tutorial_msg(key, lua_isboolean(ls, 2) && lua_toboolean(ls, 2));
+ return 0;
+}
+
#ifdef WIZARD
static int crawl_call_dlua(lua_State *ls)
{
@@ -874,6 +884,7 @@ static const struct luaL_reg crawl_clib[] =
{ "err_trace", crawl_err_trace },
{ "get_command", crawl_get_command },
{ "endgame", crawl_endgame },
+ { "tutorial_msg", crawl_tutorial_msg },
#ifdef WIZARD
{ "call_dlua", crawl_call_dlua },
#endif