Merge pull request #3541 from InspectorCaracal/improve-obj-search
Rework Object searching to behave more consistently
This commit is contained in:
commit
e01f79acc2
4 changed files with 110 additions and 106 deletions
|
|
@ -527,6 +527,9 @@ class CmdRemove(MuxCommand):
|
|||
help_category = "clothing"
|
||||
|
||||
def func(self):
|
||||
if not self.args:
|
||||
self.caller.msg("Usage: remove <worn clothing object>")
|
||||
return
|
||||
clothing = self.caller.search(self.args, candidates=self.caller.contents)
|
||||
if not clothing:
|
||||
self.caller.msg("You don't have anything like that.")
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class TestClothingCmd(BaseEvenniaCommandTest):
|
|||
)
|
||||
|
||||
# Test remove command.
|
||||
self.call(clothing.CmdRemove(), "", "Could not find ''.", caller=self.wearer)
|
||||
self.call(clothing.CmdRemove(), "", "Usage: remove <worn clothing object>", caller=self.wearer)
|
||||
self.call(
|
||||
clothing.CmdRemove(),
|
||||
"hat",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue