From 0444465e5ca8e963b5ffcb17909f4fa1e85d5ae5 Mon Sep 17 00:00:00 2001 From: Cal Date: Fri, 6 Sep 2024 15:38:23 -0600 Subject: [PATCH] fix args-validation oversight in clothing contrib CmdRemove --- evennia/contrib/game_systems/clothing/clothing.py | 3 +++ evennia/contrib/game_systems/clothing/tests.py | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evennia/contrib/game_systems/clothing/clothing.py b/evennia/contrib/game_systems/clothing/clothing.py index 6fe957eb72..11ba05e4b3 100644 --- a/evennia/contrib/game_systems/clothing/clothing.py +++ b/evennia/contrib/game_systems/clothing/clothing.py @@ -527,6 +527,9 @@ class CmdRemove(MuxCommand): help_category = "clothing" def func(self): + if not self.args: + self.caller.msg("Usage: remove ") + return clothing = self.caller.search(self.args, candidates=self.caller.contents) if not clothing: self.caller.msg("You don't have anything like that.") diff --git a/evennia/contrib/game_systems/clothing/tests.py b/evennia/contrib/game_systems/clothing/tests.py index 92b669e59a..4cc207b7e5 100644 --- a/evennia/contrib/game_systems/clothing/tests.py +++ b/evennia/contrib/game_systems/clothing/tests.py @@ -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 ", caller=self.wearer) self.call( clothing.CmdRemove(), "hat",