diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-12 20:42:42 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-12 20:42:42 +0000 |
commit | 6bb8ebbe1d9b86ce5cb492bd0a59cd8b29e831ef (patch) | |
tree | a03f43abc8a2fca032968b7792c6ac6da31fe989 /crawl-ref/source/util/levcomp.ypp | |
parent | d2037387cfc89ae80196bcbd816a76c910312e7d (diff) | |
download | crawl-ref-6bb8ebbe1d9b86ce5cb492bd0a59cd8b29e831ef.tar.gz crawl-ref-6bb8ebbe1d9b86ce5cb492bd0a59cd8b29e831ef.zip |
Added KFEAT:, KITEM: and KMONS: map directives to allow placing specific
monsters, terrain (named altars, traps, shops) and items all on the same
square.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1028 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/levcomp.ypp')
-rw-r--r-- | crawl-ref/source/util/levcomp.ypp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp index 4adbdfb486..b6ee732330 100644 --- a/crawl-ref/source/util/levcomp.ypp +++ b/crawl-ref/source/util/levcomp.ypp @@ -41,7 +41,7 @@ void yyerror(const char *e) } %token <i> BRANCHDEF BRANCH DESC DEFAULT -%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS +%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS %token <i> NAME DEPTH ORIENT PLACE CHANCE FLAGS MONS ITEM %token <i> ROOT_DEPTH ENTRY_MSG EXIT_MSG %token <i> ROCK_COLOUR FLOOR_COLOUR @@ -162,8 +162,41 @@ metaline : place | symbol | tags | shuffle + | kfeat + | kitem + | kmons ; +kfeat : KFEAT { } + | KFEAT STRING + { + std::string err = lc_map.add_key_feat($2); + if (!err.empty()) + yyerror( + make_stringf("Bad arg to KFEAT: '%s' (%s)", + $2, err.c_str()).c_str()); + } + +kmons : KMONS { } + | KMONS STRING + { + std::string err = lc_map.add_key_mons($2); + if (!err.empty()) + yyerror( + make_stringf("Bad arg to KMONS: '%s' (%s)", + $2, err.c_str()).c_str()); + } + +kitem : KITEM { } + | KITEM STRING + { + std::string err = lc_map.add_key_item($2); + if (!err.empty()) + yyerror( + make_stringf("Bad arg to KITEM: '%s' (%s)", + $2, err.c_str()).c_str()); + } + shuffle : SHUFFLE { } | SHUFFLE STRING { |