summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.ypp
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 02:22:31 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-01 02:22:31 +0000
commit2e4aeb705dc8383ddc846ea17613251df8601847 (patch)
treedca212cd8072eccc0fc259a3a677bafc739ecee8 /crawl-ref/source/util/levcomp.ypp
parenta2bd3ea6e687bee89ff41074c713af99e8bd9886 (diff)
downloadcrawl-ref-2e4aeb705dc8383ddc846ea17613251df8601847.tar.gz
crawl-ref-2e4aeb705dc8383ddc846ea17613251df8601847.zip
[2054793] Partial implementation of the request to have COLOUR tags affect tile choice. Vaults can now override the default tileset (walls and floors) for an entire level. This has been pushed to vaults where it makes sense (sewers, ice caves, ziggurats, bazaars, Shoals:5, Zot).
ROCKTILE and FLOORTILE can be used when authoring vaults to set these values, both of which take a single tile name as a string. These values are ignored in console builds. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7700 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/levcomp.ypp')
-rw-r--r--crawl-ref/source/util/levcomp.ypp22
1 files changed, 21 insertions, 1 deletions
diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp
index 23549491b6..ea059cd991 100644
--- a/crawl-ref/source/util/levcomp.ypp
+++ b/crawl-ref/source/util/levcomp.ypp
@@ -55,7 +55,7 @@ level_range set_range(const char *s, int start, int end)
%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS KMASK
%token <i> NAME DEPTH ORIENT PLACE CHANCE WEIGHT MONS ITEM MARKER COLOUR
%token <i> PRELUDE MAIN VALIDATE VETO NSUBST WELCOME LFLAGS BFLAGS
-%token <i> FLOORCOL ROCKCOL
+%token <i> FLOORCOL ROCKCOL FLOORTILE ROCKTILE
%token <i> COMMA COLON PERC INTEGER CHARACTER
@@ -163,6 +163,8 @@ metaline : place
| colour
| floorcol
| rockcol
+ | floortile
+ | rocktile
| shuffle
| tags
| lflags
@@ -372,6 +374,24 @@ rockcol : ROCKCOL { }
quote_lua_string($2).c_str()));
}
+floortile : FLOORTILE { }
+ | FLOORTILE STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("floortile(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+
+rocktile : ROCKTILE { }
+ | ROCKTILE STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("rocktile(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+
colour_specifiers : colour_specifier { }
| colour_specifiers COMMA colour_specifier { }
;