mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Update the convert_gametime contrib (stable reload/restart)
This commit is contained in:
parent
ec63d43905
commit
ee1fc0b648
1 changed files with 2 additions and 7 deletions
|
|
@ -252,7 +252,8 @@ class GametimeScript(DefaultScript):
|
|||
"""The script is started or restarted."""
|
||||
if self.db.need_reset:
|
||||
self.db.need_reset = False
|
||||
self.restart(interval=real_seconds_until(**self.db.gametime))
|
||||
seconds = real_seconds_until(**self.db.gametime)
|
||||
self.restart(interval=seconds)
|
||||
|
||||
def at_repeat(self):
|
||||
"""Call the callback and reset interval."""
|
||||
|
|
@ -270,9 +271,3 @@ class GametimeScript(DefaultScript):
|
|||
def at_server_shutdown(self):
|
||||
"""The server is about to shutdown. Put the script in need of reset."""
|
||||
self.db.need_reset = True
|
||||
|
||||
|
||||
def dummy():
|
||||
from typeclasses.rooms import Room
|
||||
for room in Room.objects.all():
|
||||
room.msg_contents("The script ticks...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue