Exemplo n.º 1
0
 def display_hints(self):
     display_hints = []
     minutes = time_in_minutes(get_timedelta_with_now(self.start_time))
     hints = self.mission.hints()
     for hint in hints:
         if hint.abs_delay <= minutes:
             display_hints.append(hint)
     return display_hints
Exemplo n.º 2
0
 def next_hint_time(self):
     next_hint_time = None
     minutes = time_in_minutes(get_timedelta_with_now(self.start_time))
     hints = self.mission.hints()
     for hint in hints:
         if hint.abs_delay > minutes:
             next_hint_time = self.start_time + timedelta(minutes=hint.abs_delay)
             break
     return next_hint_time
Exemplo n.º 3
0
 def hints_in_nl(quest, missions):
     display_hints = []
     rest_hints = []
     if quest.nonlinear:
         minutes = time_in_minutes(get_timedelta_with_now(quest.start))
         for mission in missions:
             hints = mission.hints()
             for hint in hints:
                 if hint.abs_delay <= minutes:
                     display_hints.append(hint)
                 else:
                     rest_hints.append(hint)
     return display_hints, rest_hints
Exemplo n.º 4
0
 def alarm(self):
     if self.mission.is_start or self.mission.is_finish:
         return False
     minutes = time_in_minutes(get_timedelta_with_now(self.start_time))
     threshold = self.mission.total_hints_time + 30
     return minutes >= threshold