diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-18 17:32:38 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-18 17:32:38 +0000 |
commit | 6953c233808fe5c5cbc1b9f7143e7986a6e09439 (patch) | |
tree | b581491eb26cbf737e8ba352938d2a76e00007c6 /crawl-ref/source/clua.cc | |
parent | 2a619ef23aef3ae97a6c73a67c7162c273c5a8dd (diff) | |
download | crawl-ref-6953c233808fe5c5cbc1b9f7143e7986a6e09439.tar.gz crawl-ref-6953c233808fe5c5cbc1b9f7143e7986a6e09439.zip |
Lua accessors for you.x_pos, you.y_pos and you.pos
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2488 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r-- | crawl-ref/source/clua.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index f76fbabe70..6065b4ebba 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -741,6 +741,10 @@ LUARET1(you_see_grid, boolean, see_grid(luaL_checkint(ls, 1), luaL_checkint(ls, 2))) LUARET1(you_see_grid_no_trans, boolean, see_grid_no_trans(luaL_checkint(ls, 1), luaL_checkint(ls, 2))) +LUARET1(you_x_pos, number, you.x_pos) +LUARET1(you_y_pos, number, you.y_pos) +LUARET2(you_pos, number, you.x_pos, you.y_pos) + // increase by 1 because check happens on old level void lua_push_floor_items(lua_State *ls); @@ -822,7 +826,11 @@ static const struct luaL_reg you_lib[] = { "see_grid", you_see_grid }, { "see_grid_no_trans", you_see_grid_no_trans }, - + + { "x_pos", you_x_pos }, + { "y_pos", you_y_pos }, + { "pos", you_pos }, + { NULL, NULL }, }; |