Exemplo n.º 1
0
 def pe_onKickedFromRandomQueue(self):
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     SystemMessages.pushMessage(messages.getKickReasonMessage('timeout'),
                                type=SystemMessages.SM_TYPE.Warning)
Exemplo n.º 2
0
 def prb_onTeamStatesReceived(self):
     super(SquadFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     if self.getPlayerInfo().isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue():
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Exemplo n.º 3
0
 def prb_onTeamStatesReceived(self):
     super(SquadFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     if self.getPlayerInfo().isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue():
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Exemplo n.º 4
0
 def pe_onPrebattleAutoInvitesChanged(self):
     if GUI_SETTINGS.specPrebatlesVisible:
         isHidden = areSpecBattlesHidden()
         if isHidden:
             events_dispatcher.removeSpecBattlesFromCarousel()
         else:
             events_dispatcher.addSpecBattlesToCarousel()
     events_dispatcher.updateUI()
Exemplo n.º 5
0
 def pe_onPrebattleAutoInvitesChanged(self):
     if GUI_SETTINGS.specPrebatlesVisible:
         isHidden = areSpecBattlesHidden()
         if isHidden:
             events_dispatcher.removeSpecBattlesFromCarousel()
         else:
             events_dispatcher.addSpecBattlesToCarousel()
     events_dispatcher.updateUI()
Exemplo n.º 6
0
 def unitMgr_onUnitErrorReceived(self, requestID, unitMgrID, unitIdx, errorCode, errorString):
     if errorCode not in IGNORED_UNIT_MGR_ERRORS:
         msgType, msgBody = messages.getUnitMessage(errorCode, errorString)
         SystemMessages.pushMessage(msgBody, type=msgType)
         if errorCode in RETURN_INTRO_UNIT_MGR_ERRORS:
             self.__unitFunctional.setExit(FUNCTIONAL_EXIT.INTRO_UNIT)
         self.__requestCtx.stopProcessing(result=False)
         events_dispatcher.updateUI()
Exemplo n.º 7
0
 def unitMgr_onUnitErrorReceived(self, requestID, unitMgrID, unitIdx,
                                 errorCode, errorString):
     if errorCode not in IGNORED_UNIT_MGR_ERRORS:
         msgType, msgBody = messages.getUnitMessage(errorCode, errorString)
         SystemMessages.pushMessage(msgBody, type=msgType)
         if errorCode in RETURN_INTRO_UNIT_MGR_ERRORS:
             self.__unitFunctional.setExit(FUNCTIONAL_EXIT.INTRO_UNIT)
         self.__requestCtx.stopProcessing(result=False)
         events_dispatcher.updateUI()
Exemplo n.º 8
0
 def _changeUnitFunctional(self, exit=None):
     if exit is not None:
         self.__unitFunctional.setExit(exit)
     self.__unitFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     events_dispatcher.updateUI()
     return
Exemplo n.º 9
0
 def _changeUnitFunctional(self, exit = None):
     if exit is not None:
         self.__unitFunctional.setExit(exit)
     self.__unitFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     events_dispatcher.updateUI()
     return
Exemplo n.º 10
0
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue() and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Exemplo n.º 11
0
 def prb_onTeamStatesReceived(self):
     super(CompanyFunctional, self).prb_onTeamStatesReceived()
     events_dispatcher.updateUI()
     playerInfo = self.getPlayerInfo()
     if playerInfo.isReady() or self.isCreator():
         if self.getTeamState(team=1).isInQueue(
         ) and playerInfo.roster == PREBATTLE_ROSTER.ASSIGNED_IN_TEAM1:
             events_dispatcher.loadBattleQueue()
         else:
             events_dispatcher.loadHangar()
Exemplo n.º 12
0
 def start(self, ctx):
     self.__requestCtx = context._PrbRequestCtx()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=ctx.isInRandomQueue)
     self._startListening()
     functional.initDevFunctional()
     if not self.__prbFunctional.hasGUIPage() and not self.__prbFunctional.isGUIProcessed():
         self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     events_dispatcher.addCompaniesToCarousel()
     if GUI_SETTINGS.specPrebatlesVisible and not areSpecBattlesHidden():
         events_dispatcher.addSpecBattlesToCarousel()
Exemplo n.º 13
0
 def start(self, ctx):
     self.__requestCtx = context._PrbRequestCtx()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     self.__unitFunctional = functional.createUnitFunctional(self)
     self.__unitFunctional.init()
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=ctx.isInRandomQueue)
     self._startListening()
     functional.initDevFunctional()
     if not self.__prbFunctional.hasGUIPage(
     ) and not self.__prbFunctional.isGUIProcessed():
         self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     events_dispatcher.addCompaniesToCarousel()
     if GUI_SETTINGS.specPrebatlesVisible and not areSpecBattlesHidden():
         events_dispatcher.addSpecBattlesToCarousel()
Exemplo n.º 14
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(SquadFunctional, self).prb_onPlayerStateChanged(pID, roster)
     if self.__doTeamReady:
         self.__doTeamReady = False
         self.__setTeamReady()
     events_dispatcher.updateUI()
Exemplo n.º 15
0
 def prb_onRosterReceived(self):
     super(BattleSessionFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Exemplo n.º 16
0
 def pe_onPrebattleLeft(self):
     self.__prbFunctional.fini()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     events_dispatcher.updateUI()
Exemplo n.º 17
0
 def pe_onPrebattleJoinFailure(self, errorCode):
     SystemMessages.pushMessage(messages.getJoinFailureMessage(errorCode),
                                type=SystemMessages.SM_TYPE.Error)
     self.__requestCtx.stopProcessing(result=False)
     events_dispatcher.updateUI()
Exemplo n.º 18
0
 def pe_onKickedFromRandomQueue(self):
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
     SystemMessages.pushMessage(messages.getKickReasonMessage('timeout'), type=SystemMessages.SM_TYPE.Warning)
Exemplo n.º 19
0
 def pe_onPrebattleLeft(self):
     self.__prbFunctional.fini()
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init()
     events_dispatcher.updateUI()
Exemplo n.º 20
0
 def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID):
     super(CompanyFunctional,
           self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID)
     events_dispatcher.updateUI()
Exemplo n.º 21
0
 def prb_onRosterReceived(self):
     super(CompanyFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Exemplo n.º 22
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerStateChanged(pID, roster)
     if self.__doTeamReady:
         self.__doTeamReady = False
         self.__setTeamReady()
     events_dispatcher.updateUI()
Exemplo n.º 23
0
 def prb_onSettingUpdated(self, settingName):
     super(CompanyFunctional, self).prb_onSettingUpdated(settingName)
     if settingName == PREBATTLE_SETTING_NAME.LIMITS:
         events_dispatcher.updateUI()
Exemplo n.º 24
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(BattleSessionFunctional,
           self).prb_onPlayerStateChanged(pID, roster)
     events_dispatcher.updateUI()
Exemplo n.º 25
0
 def prb_onPlayerAdded(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerAdded(pID, roster)
     events_dispatcher.updateUI()
Exemplo n.º 26
0
 def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID):
     super(SquadFunctional, self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID)
     events_dispatcher.updateUI()
Exemplo n.º 27
0
 def prb_onPlayerRemoved(self, pID, roster, name):
     super(SquadFunctional, self).prb_onPlayerRemoved(pID, roster, name)
     events_dispatcher.updateUI()
Exemplo n.º 28
0
 def ctrl_onPrebattleInited(self):
     self.__prbFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init(ctx=self.__requestCtx)
     events_dispatcher.updateUI()
Exemplo n.º 29
0
 def pe_onDequeuedRandom(self):
     self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
Exemplo n.º 30
0
 def prb_onPlayerAdded(self, pID, roster):
     super(CompanyFunctional, self).prb_onPlayerAdded(pID, roster)
     events_dispatcher.updateUI()
Exemplo n.º 31
0
 def prb_onPlayerRemoved(self, pID, roster, name):
     super(CompanyFunctional, self).prb_onPlayerRemoved(pID, roster, name)
     events_dispatcher.updateUI()
Exemplo n.º 32
0
 def prb_onSettingUpdated(self, settingName):
     super(BattleSessionFunctional, self).prb_onSettingUpdated(settingName)
     if settingName == PREBATTLE_SETTING_NAME.LIMITS:
         events_dispatcher.updateUI()
Exemplo n.º 33
0
 def pe_onPrebattleJoinFailure(self, errorCode):
     SystemMessages.pushMessage(messages.getJoinFailureMessage(errorCode), type=SystemMessages.SM_TYPE.Error)
     self.__requestCtx.stopProcessing(result=False)
     events_dispatcher.updateUI()
Exemplo n.º 34
0
 def prb_onPlayerStateChanged(self, pID, roster):
     super(BattleSessionFunctional, self).prb_onPlayerStateChanged(pID, roster)
     events_dispatcher.updateUI()
Exemplo n.º 35
0
 def ctrl_onPrebattleInited(self):
     self.__prbFunctional.fini()
     self.__requestCtx.stopProcessing(result=True)
     self.__prbFunctional = functional.createPrbFunctional(self)
     self.__prbFunctional.init(ctx=self.__requestCtx)
     events_dispatcher.updateUI()
Exemplo n.º 36
0
 def prb_onRosterReceived(self):
     super(BattleSessionFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()
Exemplo n.º 37
0
 def pe_onDequeuedRandom(self):
     self.__queueFunctional = functional.createQueueFunctional(
         isInRandomQueue=False)
     self.__queueFunctional.onChanged()
     events_dispatcher.updateUI()
Exemplo n.º 38
0
 def prb_onRosterReceived(self):
     super(CompanyFunctional, self).prb_onRosterReceived()
     events_dispatcher.updateUI()