mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 05:16:31 +01:00
Adds appropriate object checking to 'inside()' lockfunc (partial fix for #2227).
This commit is contained in:
parent
976835eced
commit
e645ccdbb8
1 changed files with 2 additions and 0 deletions
|
|
@ -557,6 +557,8 @@ def inside(accessing_obj, accessed_obj, *args, **kwargs):
|
|||
want also nested objects to pass the lock, use the `insiderecursive`
|
||||
lockfunc.
|
||||
"""
|
||||
if hasattr(accessed_obj, "obj"):
|
||||
accessed_obj = accessed_obj.obj
|
||||
return accessing_obj.location == accessed_obj
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue