Various fixes from game jam
This commit is contained in:
parent
e6aec78cce
commit
ed187ad05f
12 changed files with 45 additions and 28 deletions
|
|
@ -618,7 +618,7 @@ class _ObjDummy:
|
|||
lock_storage = ''
|
||||
|
||||
|
||||
def check_lockstring(self, accessing_obj, lockstring, no_superuser_bypass=False,
|
||||
def check_lockstring(accessing_obj, lockstring, no_superuser_bypass=False,
|
||||
default=False, access_type=None):
|
||||
"""
|
||||
Do a direct check against a lockstring ('atype:func()..'),
|
||||
|
|
@ -643,9 +643,9 @@ def check_lockstring(self, accessing_obj, lockstring, no_superuser_bypass=False,
|
|||
access (bool): If check is passed or not.
|
||||
|
||||
"""
|
||||
global _LOCKHANDLER
|
||||
if not _LOCKHANDLER:
|
||||
_LOCKHANDLER = LockHandler(_ObjDummy())
|
||||
global _LOCK_HANDLER
|
||||
if not _LOCK_HANDLER:
|
||||
_LOCK_HANDLER = LockHandler(_ObjDummy())
|
||||
return _LOCK_HANDLER.check_lockstring(
|
||||
accessing_obj, lockstring, no_superuser_bypass=no_superuser_bypass,
|
||||
default=default, access_type=access_type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue