mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Put up a warning about not using BaseObject.at_init() at this time (it's not called, as per issue 188). Also removed the deprecated at_cache() hook (it doesn't work anymore now that the caching system is much more efficient and only caches once).
This commit is contained in:
parent
f1d743f14c
commit
1995f61d46
5 changed files with 18 additions and 23 deletions
|
|
@ -100,7 +100,9 @@ class Evennia(object):
|
|||
reactor.addSystemEventTrigger('before', 'shutdown', self.shutdown, _abrupt=True)
|
||||
|
||||
self.game_running = True
|
||||
|
||||
|
||||
self.run_init_hooks()
|
||||
|
||||
# Server startup methods
|
||||
|
||||
def sqlite3_prep(self):
|
||||
|
|
@ -140,6 +142,16 @@ class Evennia(object):
|
|||
initial_setup.handle_setup(int(last_initial_setup_step))
|
||||
print '-'*50
|
||||
|
||||
def run_init_hooks(self):
|
||||
"""
|
||||
Called every server start
|
||||
"""
|
||||
from src.objects.models import ObjectDB
|
||||
from src.players.models import PlayerDB
|
||||
|
||||
print "run_init_hooks:", ObjectDB.get_all_cached_instances()
|
||||
[(o.typeclass(o), o.at_init()) for o in ObjectDB.get_all_cached_instances()]
|
||||
[(p.typeclass(p), p.at_init()) for p in PlayerDB.get_all_cached_instances()]
|
||||
|
||||
def terminal_output(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue