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."""
|
"""The script is started or restarted."""
|
||||||
if self.db.need_reset:
|
if self.db.need_reset:
|
||||||
self.db.need_reset = False
|
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):
|
def at_repeat(self):
|
||||||
"""Call the callback and reset interval."""
|
"""Call the callback and reset interval."""
|
||||||
|
|
@ -270,9 +271,3 @@ class GametimeScript(DefaultScript):
|
||||||
def at_server_shutdown(self):
|
def at_server_shutdown(self):
|
||||||
"""The server is about to shutdown. Put the script in need of reset."""
|
"""The server is about to shutdown. Put the script in need of reset."""
|
||||||
self.db.need_reset = True
|
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