mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 01:06:32 +01:00
Added lazy-loading of on-model handlers.
This commit is contained in:
parent
6f90149506
commit
4e3789cede
8 changed files with 83 additions and 29 deletions
|
|
@ -157,7 +157,7 @@ class CmdSetHandler(object):
|
|||
will re-calculate the 'current' cmdset.
|
||||
"""
|
||||
|
||||
def __init__(self, obj):
|
||||
def __init__(self, obj, init_true=True):
|
||||
"""
|
||||
This method is called whenever an object is recreated.
|
||||
|
||||
|
|
@ -178,7 +178,8 @@ class CmdSetHandler(object):
|
|||
# the subset of the cmdset_paths that are to be stored in the database
|
||||
self.permanent_paths = [""]
|
||||
|
||||
#self.update(init_mode=True) is then called from the object __init__.
|
||||
if init_true:
|
||||
self.update(init_mode=True) #is then called from the object __init__
|
||||
|
||||
def __str__(self):
|
||||
"Display current commands"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue