fix args-validation oversight in clothing contrib CmdRemove

This commit is contained in:
Cal 2024-09-06 15:38:23 -06:00
parent fdfb2019cf
commit 0444465e5c
2 changed files with 4 additions and 4 deletions

View file

@ -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.")

View file

@ -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",