def test_repeat_schedule(self): callback = Mock() script = gametime.schedule(callback, repeat=True, min=32) self.timescripts.append(script) self.assertIsInstance(script, gametime.TimeScript) self.assertAlmostEqual(script.interval, 12) self.assertEqual(script.repeats, -1)
def test_schedule(self): callback = Mock() script = gametime.schedule(callback, day=19) self.timescripts.append(script) self.assertIsInstance(script, gametime.TimeScript) self.assertAlmostEqual(script.interval, 17280) self.assertEqual(script.repeats, 1)
def start_nightstart_event(): """Schedule nightstart event to happen every day at 6 AM.""" script = gametime.schedule(at_nightstart, repeat=True, hour=20, min=0, sec=0) script.key = "at nightstart"
def start_sunset_event(): script = gametime.schedule(at_sunset, repeat=True, hour=19, min=53, sec=0) script.key = "flavor 2"
def start_sunrise_event(): """Schedule an sunrise event to happen every day at 6 AM.""" script = gametime.schedule(at_sunrise, repeat=True, hour=6, min=0, sec=0) script.key = "flavor 1"
def incipe_sōlem_occidere(): """ schedule a sunset event to happen every day at 6 PM """ script = gametime.schedule(occāsū, repeat=True, hour=18, min=0, sec=0) script.key = "occāsū"
def incipe_sōlem_orīrī(): """ schedule a sunrise event to happen every day at 6 AM """ script = gametime.schedule(prīmā_lūce, repeat=True, hour=6, min=0, sec=0) script.key = "prīmā lūce"
def start_sunset_event(): """Schedule an sunrise event to happen every day at 6 pm.""" script = gametime.schedule(at_sunrise, repeat=True, hour=18, min=0, sec=0) script.key = "at sunset"
def start_sunrise_event(): """Schedule at_sunrise()""" script = gametime.schedule(at_sunrise, repeat=True, hour=6, min=0, sec=0) script.key = "at sunrise"
def start_midnight_event(): """Schedule a midnight event message to happen every day at 6 AM.""" script = gametime.schedule(at_sunrise, repeat=True, hour=0, min=0, sec=0) script.key = "at midnight"
def start_sunset_event(): """Schedule sunset.""" script = gametime.schedule(at_sunrise, repeat=True, hour=17, min=0, sec=0) script.key = "at sunset"
def start_noon_event(): """Schedule a noon event to happen every day at 6 AM.""" script = gametime.schedule(at_sunrise, repeat=True, hour=12, min=0, sec=0) script.key = "at noon"