mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 16:56:32 +01:00
Save the game time before shutting down the server (avoids drfts)
This commit is contained in:
parent
c05a0a58bf
commit
95c8bf348b
1 changed files with 4 additions and 0 deletions
|
|
@ -346,6 +346,7 @@ class Evennia(object):
|
|||
from evennia.objects.models import ObjectDB
|
||||
#from evennia.players.models import PlayerDB
|
||||
from evennia.server.models import ServerConfig
|
||||
from evennia.utils import gametime as _GAMETIME_MODULE
|
||||
|
||||
if mode == 'reload':
|
||||
# call restart hooks
|
||||
|
|
@ -394,6 +395,9 @@ class Evennia(object):
|
|||
# kill the server
|
||||
reactor.callLater(1, reactor.stop)
|
||||
|
||||
# we make sure the proper gametime is saved as late as possible
|
||||
ServerConfig.objects.conf("runtime", _GAMETIME_MODULE.runtime())
|
||||
|
||||
# server start/stop hooks
|
||||
|
||||
def at_server_start(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue