summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-05 14:48:04 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-05 14:48:04 +1000
commit01c241d0589cd53226c71eea517392ed3a442b26 (patch)
tree0e07eed894e6f27bf405168b0dc3adafe5be7d81 /crawl-ref/source/mapdef.cc
parent75be79355430d15ed4783ef7fa2725a940642646 (diff)
downloadcrawl-ref-01c241d0589cd53226c71eea517392ed3a442b26.tar.gz
crawl-ref-01c241d0589cd53226c71eea517392ed3a442b26.zip
Add a "seen" flag.
This allows dgn.create_monster to create monsters as though summoned, without generating "XYZ comes into view" messages (if the player happens to be resting at the time).
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 0882e6fc6d..4e9247e553 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -3029,6 +3029,10 @@ mons_list::mons_spec_slot mons_list::parse_mons_spec(std::string spec)
mspec.patrolling = strip_tag(mon_str, "patrolling");
mspec.band = strip_tag(mon_str, "band");
+ // Useful for summoned monsters.
+ if (strip_tag(mon_str, "seen"))
+ mspec.extra_monster_flags |= MF_SEEN;
+
if (!mon_str.empty() && isdigit(mon_str[0]))
{
// Look for space after initial digits.