diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-10 17:58:53 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-10 18:20:18 +1000 |
commit | c06a6dcbe24d55c008a4179fc28892ad67ab073e (patch) | |
tree | 5e4fa6b3bfd5b788513613f9f4b199702663325b /crawl-ref/source/dungeon.cc | |
parent | 2c6f84f7b21882feeded0a197803acd612afe659 (diff) | |
download | crawl-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/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 652d9370f0..1da42f3958 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4970,6 +4970,7 @@ int dgn_place_monster(mons_spec &mspec, mg.mname = mspec.monname; mg.hd = mspec.hd; mg.hp = mspec.hp; + mg.props = mspec.props; // Marking monsters as summoned mg.abjuration_duration = mspec.abjuration_duration; @@ -5016,6 +5017,8 @@ int dgn_place_monster(mons_spec &mspec, _dgn_give_mon_spec_items(mspec, mindex, mid, monster_level); if (mspec.explicit_spells) mons.spells = mspec.spells; + if (mspec.props.exists("monster_tile")) + mons.props["monster_tile"] = mspec.props["monster_tile"].get_short(); // These are applied earlier to prevent issues with renamed monsters // and "<monster> comes into view" (see delay.cc:_monster_warning). //mons.flags |= mspec.extra_monster_flags; |