Beispiel #1
0
 def ended(self, info=None):
     DefaultMissionsService.ended(self, info)
     if self.current_mission is None:
         return
     self.cl_client.chat_all(unicode(_("Mission '{0}' was stopped.")
                             .format(self.current_mission.name)))
     self._on_ended()
Beispiel #2
0
    def began(self, info=None):
        DefaultMissionsService.began(self, info)
        if self.current_mission is None:
            return

        self.time_left = self.current_mission.duration * 60
        self._timer.start(interval=1, now=False)
        self._set_status(MISSION_STATUS.PLAYING)

        self.cl_client.chat_all(unicode(_("Mission '{0}' is playing.")
                                .format(self.current_mission.name)))
        self.cl_client.chat_all(unicode(self.time_left_verbose_str))
 def startService(self):
     DefaultMissionsService.startService(self)
     return self.cl_client.mission_status()
 def ended(self, info=None):
     DefaultMissionsService.ended(self, info)
 def began(self, info=None):
     DefaultMissionsService.began(self, info)
Beispiel #6
0
 def stopService(self):
     self.mission_was_running = self.is_mission_playing
     yield DefaultMissionsService.stopService(self)
     self._on_ended()
Beispiel #7
0
 def startService(self):
     DefaultMissionsService.startService(self)
     if self.connection_was_lost and self.mission_was_running:
         return self.mission_run()
Beispiel #8
0
 def __init__(self, log_watcher=None):
     self._timer = LoopingCall(self._timer_tick)
     DefaultMissionsService.__init__(self, log_watcher)
 def startService(self):
     DefaultMissionsService.startService(self)
     return self.cl_client.mission_status()
 def ended(self, info=None):
     DefaultMissionsService.ended(self, info)
 def began(self, info=None):
     DefaultMissionsService.began(self, info)