mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
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.
|
||||
- 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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue