summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilepick.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-10 17:58:53 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-10 18:20:18 +1000
commitc06a6dcbe24d55c008a4179fc28892ad67ab073e (patch)
tree5e4fa6b3bfd5b788513613f9f4b199702663325b /crawl-ref/source/tilepick.cc
parent2c6f84f7b21882feeded0a197803acd612afe659 (diff)
downloadcrawl-ref-c06a6dcbe24d55c008a4179fc28892ad67ab073e.tar.gz
crawl-ref-c06a6dcbe24d55c008a4179fc28892ad67ab073e.zip
Overriding monster tiles in vault definitions.
It is now possible to specify a tile for monsters when specifying monsters in vault definitions. The syntax is "tile:<tile name>". All tiles that don't start with "mons_" will have this prefixed, therefore "tile:giant_bat" will become "tile:mons_giant_bat", but "tile:mons_rat" will remain unchanged.
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r--crawl-ref/source/tilepick.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index f7f8c104c2..4af9a4e880 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -126,6 +126,9 @@ int tileidx_monster_base(const monsters *mon, bool detected)
if (detected)
type = mons_detected_base(mon->type);
+ if (mon->props.exists("monster_tile"))
+ return int(mon->props["monster_tile"].get_short());
+
switch (type)
{
// program bug