mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
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"
|
||||
|
||||
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,10 +85,7 @@ class TestClothingCmd(BaseEvenniaCommandTest):
|
|||
)
|
||||
|
||||
# Test remove command.
|
||||
# NOTE: commenting out due to failing via the search refactor - however, this command
|
||||
# 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(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