From e748d6d5ae97b01381b101a2b66998d0e196b0fa Mon Sep 17 00:00:00 2001 From: Adam_ASE Date: Thu, 20 Sep 2012 23:50:34 -0400 Subject: [PATCH] Addressing original issue 254 - Fixed DROP command multi-match error for similarly or identically named items when one or more of the items are at the location but not in character's inventory. --- src/commands/default/general.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/default/general.py b/src/commands/default/general.py index c00c469c87..9bad725951 100644 --- a/src/commands/default/general.py +++ b/src/commands/default/general.py @@ -323,10 +323,10 @@ class CmdDrop(MuxCommand): caller.msg("Drop what?") return - results = caller.search(self.args, ignore_errors=True) - # we process the results ourselves since we want to sift out only - # those in our inventory. - results = [obj for obj in results if obj in caller.contents] + # Because the DROP command by definition looks for items + # in inventory, call the search function using location = caller + results = caller.search(self.args, location=caller, ignore_errors=True) + # now we send it into the error handler (this will output consistent # error messages if there are problems). obj = AT_SEARCH_RESULT(caller, self.args, results, False)