diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-20 10:32:52 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-20 10:32:52 +0000 |
commit | 40d686b7f05b03bb1b63dbb062acea1c0415b1b2 (patch) | |
tree | e171511065231ff16824407bd36f672b12d04a21 /crawl-ref/source | |
parent | f57fa3bedc9a99e53729c8d0d05dbbe4a6ba0216 (diff) | |
download | crawl-ref-40d686b7f05b03bb1b63dbb062acea1c0415b1b2.tar.gz crawl-ref-40d686b7f05b03bb1b63dbb062acea1c0415b1b2.zip |
Fixed KMONS not accepting comma-separated list of alternative monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7291 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/mapdef.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 651f475253..0f9cb1f838 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -2993,7 +2993,14 @@ std::string keyed_mapspec::set_mons(const std::string &s, bool fix) err.clear(); mons.clear(); - return (mons.add_mons(s, fix)); + std::vector<std::string> segments = split_string(",", s); + for (int i = 0, size = segments.size(); i < size; ++i) + { + const std::string error = mons.add_mons(segments[i], fix); + if (!error.empty()) + return (error); + } + return (""); } std::string keyed_mapspec::set_item(const std::string &s, bool fix) |