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
|
from evennia import Command
|
||||||
|
|
||||||
class CmdQuickFind(Command):
|
class CmdQuickFind(Command):
|
||||||
"""
|
"""
|
||||||
Find an item in your current location.
|
Find an item in your current location.
|
||||||
|
|
||||||
Usage:
|
|
||||||
quickfind <query>
|
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
quickfind <query>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
key = "quickfind"
|
key = "quickfind"
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
query = self.args
|
query = self.args
|
||||||
result = self.caller.search(query)
|
result = self.caller.search(query)
|
||||||
if not result
|
if not result:
|
||||||
return
|
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
|
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