diff options
author | Pete Hurst <pete@streamuniverse.tv> | 2013-05-05 17:36:24 +0100 |
---|---|---|
committer | Pete Hurst <pete@streamuniverse.tv> | 2013-05-05 17:36:24 +0100 |
commit | 4b56dfe87de353a55ee98bae9721b933083bbcd8 (patch) | |
tree | 500187f628202cc566c5b12ce2ad883b180dad5f /crawl-ref/source/l_dgnbld.cc | |
parent | 45c757964c230cb4a7bf7a9b0e1ece9313cff43f (diff) | |
download | crawl-ref-4b56dfe87de353a55ee98bae9721b933083bbcd8.tar.gz crawl-ref-4b56dfe87de353a55ee98bae9721b933083bbcd8.zip |
Add a check for MMT_VAULT in find_in_area
Set find_vault = true in the parameters table to
check for vaults as well. (Default is still false.)
Diffstat (limited to 'crawl-ref/source/l_dgnbld.cc')
-rw-r--r-- | crawl-ref/source/l_dgnbld.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/l_dgnbld.cc b/crawl-ref/source/l_dgnbld.cc index f4950672da..4b33d7cc06 100644 --- a/crawl-ref/source/l_dgnbld.cc +++ b/crawl-ref/source/l_dgnbld.cc @@ -573,6 +573,7 @@ LUAFN(dgn_find_in_area) TABLE_INT(ls, y1, -1); TABLE_INT(ls, x2, -1); TABLE_INT(ls, y2, -1); + TABLE_BOOL(ls, find_vault, false); if (!_coords(ls, lines, x1, y1, x2, y2)) return 0; @@ -583,7 +584,9 @@ LUAFN(dgn_find_in_area) for (x = x1; x <= x2; x++) for (y = y1; y <= y2; y++) - if (strchr(find, lines(x, y))) + if (strchr(find, lines(x, y)) + || (find_vault && (env.level_map_mask(coord_def(x,y)) + & MMT_VAULT))) { lua_pushboolean(ls, true); return 1; |