mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix of code in searching-things tutorial. Resolve #3213
This commit is contained in:
parent
0523264aae
commit
2e70be96b1
1 changed files with 8 additions and 8 deletions
|
|
@ -57,22 +57,22 @@ So this method handles error messaging for you. A very common way to use it is i
|
|||
from evennia import Command
|
||||
|
||||
class CmdQuickFind(Command):
|
||||
"""
|
||||
Find an item in your current location.
|
||||
|
||||
Usage:
|
||||
quickfind <query>
|
||||
"""
|
||||
Find an item in your current location.
|
||||
|
||||
Usage:
|
||||
quickfind <query>
|
||||
|
||||
"""
|
||||
|
||||
key = "quickfind"
|
||||
|
||||
def func(self):
|
||||
query = self.args
|
||||
query = self.args
|
||||
result = self.caller.search(query)
|
||||
if not result
|
||||
if not result:
|
||||
return
|
||||
self.caller.msg(f"Found match for {query}: {foo}")
|
||||
self.caller.msg(f"Found match for {query}: {result}")
|
||||
```
|
||||
|
||||
Remember, `self.caller` is the one calling the command. This is usually a Character, which
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue