diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-24 17:07:13 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-24 17:07:13 +0000 |
commit | bafc68317f7089c0cc8e29fdb8715ba59a86156b (patch) | |
tree | badd1d5cb8c941989413eda93726a71ad4f34e32 /crawl-ref/source/initfile.cc | |
parent | 574bf92a37ea1b51d11d0535e0c05af592ef7f23 (diff) | |
download | crawl-ref-bafc68317f7089c0cc8e29fdb8715ba59a86156b.tar.gz crawl-ref-bafc68317f7089c0cc8e29fdb8715ba59a86156b.zip |
Warn user if mon_glyph lines use bad monster names.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2908 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r-- | crawl-ref/source/initfile.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 4bc4c05ecf..cf8f53f406 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -867,6 +867,7 @@ void game_options::add_mon_glyph_overrides(const std::string &mons, if (mons.length() == 1) letter = mons[0] == '_' ? ' ' : mons[0]; + bool found = false; for (int i = 0; i < NUM_MONSTERS; ++i) { const monsterentry *me = get_monster_data(i); @@ -874,8 +875,14 @@ void game_options::add_mon_glyph_overrides(const std::string &mons, continue; if (me->showchar == letter || me->name == mons) + { + found = true; add_mon_glyph_override(static_cast<monster_type>(i), mdisp); + } } + if (!found) + crawl_state.add_startup_error( + make_stringf("Unknown monster: \"%s\"", mons.c_str())); } mon_display game_options::parse_mon_glyph(const std::string &s) const |