Ejemplo n.º 1
0
 def __doStartTraining(self):
     result = yield self.prbDispatcher.sendPrbRequest(SetTeamStateCtx(1, True))
     if result:
         result = yield self.prbDispatcher.sendPrbRequest(SetTeamStateCtx(2, True))
         if not result:
             yield self.prbDispatcher.sendPrbRequest(SetTeamStateCtx(1, False))
     if not result:
         self.__showActionErrorMessage()
         self.as_disableControlsS(False)
         self.__updateStartButton(self.prbEntity)
Ejemplo n.º 2
0
 def __setTeamReady(self):
     """
     Set team ready method
     """
     if self.isCommander():
         self.setTeamState(
             SetTeamStateCtx(1,
                             True,
                             waitingID='prebattle/team_ready',
                             gamePlayMask=gameplay_ctx.getMask()))
Ejemplo n.º 3
0
 def exitFromQueue(self):
     if self.isCommander():
         self.setTeamState(
             SetTeamStateCtx(1, False,
                             waitingID='prebattle/team_not_ready'))
     else:
         self.setPlayerState(
             SetPlayerStateCtx(False,
                               waitingID='prebattle/player_not_ready'))
     return True