summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-01 16:07:21 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-01 16:07:21 +0000
commitfc78d02aee0c39be4fb45b3b640a17f2af18cd45 (patch)
tree8826cfb101f01e3a0d2abe855e8dff8ef2ffc87c /crawl-ref/source/util
parent0645520057d5b630626c5e6ce7bf3099c9500ea1 (diff)
downloadcrawl-ref-fc78d02aee0c39be4fb45b3b640a17f2af18cd45.tar.gz
crawl-ref-fc78d02aee0c39be4fb45b3b640a17f2af18cd45.zip
Added NSUBST.
Should not highlight unvisited stairs in the Vestibule, since travel cache doesn't track visited-ness of Vestibule stairs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1706 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util')
-rw-r--r--crawl-ref/source/util/levcomp.lpp1
-rw-r--r--crawl-ref/source/util/levcomp.ypp19
2 files changed, 19 insertions, 1 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp
index 49a7456ecc..b4010596c5 100644
--- a/crawl-ref/source/util/levcomp.lpp
+++ b/crawl-ref/source/util/levcomp.lpp
@@ -175,6 +175,7 @@ WEIGHT: return CHANCE;
FLAGS: { BEGIN(KEYWORDS); return TAGS; }
TAGS: { BEGIN(KEYWORDS); return TAGS; }
SUBST: { BEGIN(ITEM_LIST); return SUBST; }
+NSUBST: { BEGIN(ITEM_LIST); return NSUBST; }
MONS: { BEGIN(MNAME); return MONS; }
ITEM: { BEGIN(ITEM_LIST); return ITEM; }
MARKER: { BEGIN(ITEM_LIST); return MARKER; }
diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp
index 136b03673c..d3470e7baf 100644
--- a/crawl-ref/source/util/levcomp.ypp
+++ b/crawl-ref/source/util/levcomp.ypp
@@ -67,7 +67,7 @@ level_range set_range(const char *s, int start, int end)
%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS
%token <i> NAME DEPTH ORIENT PLACE CHANCE MONS ITEM MARKER
-%token <i> PRELUDE MAIN VALIDATE VETO
+%token <i> PRELUDE MAIN VALIDATE VETO NSUBST
%token <i> COMMA INTEGER CHARACTER
@@ -167,6 +167,7 @@ metaline : place
| items
| marker
| subst
+ | nsubst
| shuffle
| tags
| kfeat
@@ -308,6 +309,22 @@ marker_spec : ITEM_INFO
}
;
+nsubst : NSUBST nsubst_specifiers { }
+ ;
+
+nsubst_specifiers : nsubst_spec
+ | nsubst_specifiers COMMA nsubst_spec
+ ;
+
+nsubst_spec : ITEM_INFO
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("nsubst(\"%s\")",
+ quote_lua_string($1).c_str()));
+ }
+ ;
+
subst : SUBST subst_specifiers { }
;