fix args-validation oversight in clothing contrib CmdRemove
This commit is contained in:
parent
fdfb2019cf
commit
0444465e5c
2 changed files with 4 additions and 4 deletions
|
|
@ -527,6 +527,9 @@ class CmdRemove(MuxCommand):
|
||||||
help_category = "clothing"
|
help_category = "clothing"
|
||||||
|
|
||||||
def func(self):
|
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)
|
clothing = self.caller.search(self.args, candidates=self.caller.contents)
|
||||||
if not clothing:
|
if not clothing:
|
||||||
self.caller.msg("You don't have anything like that.")
|
self.caller.msg("You don't have anything like that.")
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,7 @@ class TestClothingCmd(BaseEvenniaCommandTest):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Test remove command.
|
# Test remove command.
|
||||||
# NOTE: commenting out due to failing via the search refactor - however, this command
|
self.call(clothing.CmdRemove(), "", "Usage: remove <worn clothing object>", caller=self.wearer)
|
||||||
# SHOULD be providing standard wrong-args feedback, like CmdWear.
|
|
||||||
# this will be fixed and the test amended in a separate PR
|
|
||||||
# self.call(clothing.CmdRemove(), "", "Could not find ''.", caller=self.wearer)
|
|
||||||
self.call(
|
self.call(
|
||||||
clothing.CmdRemove(),
|
clothing.CmdRemove(),
|
||||||
"hat",
|
"hat",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue