Further caching and optimization, making some operations noticeable faster in the end.
This commit is contained in:
parent
1a6ef5d983
commit
6e08c011a1
13 changed files with 78 additions and 73 deletions
|
|
@ -105,9 +105,10 @@ def get_and_merge_cmdsets(caller):
|
|||
|
||||
# Gather cmdsets from location, objects in location or carried
|
||||
local_objects_cmdsets = [None]
|
||||
location = None
|
||||
if hasattr(caller, "location"):
|
||||
try:
|
||||
location = caller.location
|
||||
except Exception:
|
||||
location = None
|
||||
if location and not caller_cmdset.no_objs:
|
||||
# Gather all cmdsets stored on objects in the room and
|
||||
# also in the caller's inventory and the location itself
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ def at_search_result(msg_obj, ostring, results, global_search=False):
|
|||
if hasattr(result, "location") and result.location == msg_obj:
|
||||
invtext = " (carried)"
|
||||
if show_dbref:
|
||||
dbreftext = "(#%i)" % result.id
|
||||
dbreftext = "(#%i)" % result.dbid
|
||||
string += "\n %i-%s%s%s" % (num+1, result.name,
|
||||
dbreftext, invtext)
|
||||
results = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue