Adjusted search() functionality to handle also a list of location(s) to search. Changed "get" command to not search inventory (which could lead to multimatch errors).

This commit is contained in:
Griatch 2012-09-21 08:36:59 +02:00
parent 8ad58a3e19
commit e874343387
2 changed files with 10 additions and 5 deletions

View file

@ -275,7 +275,7 @@ class CmdGet(MuxCommand):
if not self.args:
caller.msg("Get what?")
return
obj = caller.search(self.args)
obj = caller.search(self.args, location=caller.location)
if not obj:
return
if caller == obj:
@ -326,7 +326,7 @@ class CmdDrop(MuxCommand):
# 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)