diff --git a/CHANGELOG.md b/CHANGELOG.md index af47d8e7e9..d6ce8f5702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,6 +101,8 @@ without arguments starts a full interactive Python console. - New EvMenu templating system for quickly building simpler EvMenus without as much code. - Add `Command.client_height()` method to match existing `.client_width` (stricako) - Include more Web-client info in `session.protocol_flags`. +- Fixes in multi-match situations - don't allow finding/listing multimatches for 3-box when + only two boxes in location. ## Evennia 0.9 (2018-2019) diff --git a/evennia/objects/manager.py b/evennia/objects/manager.py index 0a3dbc90fa..2286f784c5 100644 --- a/evennia/objects/manager.py +++ b/evennia/objects/manager.py @@ -471,7 +471,12 @@ class ObjectDBManager(TypedObjectManager): matches = _searcher(searchdata, candidates, typeclass, exact=exact) # deal with result - if len(matches) > 1 and match_number is not None: + if len(matches) == 1 and match_number is not None and match_number != 0: + # this indicates trying to get a single match with a match-number + # targeting some higher-number match (like 2-box when there is only + # one box in the room). This leads to a no-match. + matches = [] + elif len(matches) > 1 and match_number is not None: # multiple matches, but a number was given to separate them if 0 <= match_number < len(matches): # limit to one match