Revert some objtag lockfunc changes, related to #2227.

This commit is contained in:
Griatch 2020-10-12 19:49:18 +02:00
parent 199cb5682c
commit fbfd662937

View file

@ -539,8 +539,6 @@ def objtag(accessing_obj, accessed_obj, *args, **kwargs):
Only true if accessed_obj has the specified tag and optional
category.
"""
if hasattr(accessed_obj, "obj"):
accessed_obj = accessed_obj.obj
tagkey = args[0] if args else None
category = args[1] if len(args) > 1 else None
return bool(accessed_obj.tags.get(tagkey, category=category))
@ -572,6 +570,9 @@ def inside_rec(accessing_obj, accessed_obj, *args, **kwargs):
in your inventory will also pass the lock).
"""
if hasattr(accessed_obj, "obj"):
accessed_obj = accessed_obj.obj
def _recursive_inside(obj, accessed_obj, lvl=1):
if obj.location:
if obj.location == accessed_obj: