Don't allow 3-box with only two boxes in room. Resolve #2206.
This commit is contained in:
parent
5f8911ec72
commit
490c4f11cf
2 changed files with 8 additions and 1 deletions
|
|
@ -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.
|
- New EvMenu templating system for quickly building simpler EvMenus without as much code.
|
||||||
- Add `Command.client_height()` method to match existing `.client_width` (stricako)
|
- Add `Command.client_height()` method to match existing `.client_width` (stricako)
|
||||||
- Include more Web-client info in `session.protocol_flags`.
|
- 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)
|
## Evennia 0.9 (2018-2019)
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,12 @@ class ObjectDBManager(TypedObjectManager):
|
||||||
matches = _searcher(searchdata, candidates, typeclass, exact=exact)
|
matches = _searcher(searchdata, candidates, typeclass, exact=exact)
|
||||||
|
|
||||||
# deal with result
|
# 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
|
# multiple matches, but a number was given to separate them
|
||||||
if 0 <= match_number < len(matches):
|
if 0 <= match_number < len(matches):
|
||||||
# limit to one match
|
# limit to one match
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue