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)
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()
def pe_onPrebattleAutoInvitesChanged(self): if GUI_SETTINGS.specPrebatlesVisible: isHidden = areSpecBattlesHidden() if isHidden: events_dispatcher.removeSpecBattlesFromCarousel() else: events_dispatcher.addSpecBattlesToCarousel() events_dispatcher.updateUI()
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()
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
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
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()
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()
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()
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()
def prb_onPlayerStateChanged(self, pID, roster): super(SquadFunctional, self).prb_onPlayerStateChanged(pID, roster) if self.__doTeamReady: self.__doTeamReady = False self.__setTeamReady() events_dispatcher.updateUI()
def prb_onRosterReceived(self): super(BattleSessionFunctional, self).prb_onRosterReceived() events_dispatcher.updateUI()
def pe_onPrebattleLeft(self): self.__prbFunctional.fini() self.__prbFunctional = functional.createPrbFunctional(self) self.__prbFunctional.init() events_dispatcher.updateUI()
def pe_onPrebattleJoinFailure(self, errorCode): SystemMessages.pushMessage(messages.getJoinFailureMessage(errorCode), type=SystemMessages.SM_TYPE.Error) self.__requestCtx.stopProcessing(result=False) events_dispatcher.updateUI()
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)
def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID): super(CompanyFunctional, self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID) events_dispatcher.updateUI()
def prb_onRosterReceived(self): super(CompanyFunctional, self).prb_onRosterReceived() events_dispatcher.updateUI()
def prb_onPlayerStateChanged(self, pID, roster): super(CompanyFunctional, self).prb_onPlayerStateChanged(pID, roster) if self.__doTeamReady: self.__doTeamReady = False self.__setTeamReady() events_dispatcher.updateUI()
def prb_onSettingUpdated(self, settingName): super(CompanyFunctional, self).prb_onSettingUpdated(settingName) if settingName == PREBATTLE_SETTING_NAME.LIMITS: events_dispatcher.updateUI()
def prb_onPlayerStateChanged(self, pID, roster): super(BattleSessionFunctional, self).prb_onPlayerStateChanged(pID, roster) events_dispatcher.updateUI()
def prb_onPlayerAdded(self, pID, roster): super(CompanyFunctional, self).prb_onPlayerAdded(pID, roster) events_dispatcher.updateUI()
def prb_onPlayerRosterChanged(self, pID, prevRoster, roster, actorID): super(SquadFunctional, self).prb_onPlayerRosterChanged(pID, prevRoster, roster, actorID) events_dispatcher.updateUI()
def prb_onPlayerRemoved(self, pID, roster, name): super(SquadFunctional, self).prb_onPlayerRemoved(pID, roster, name) events_dispatcher.updateUI()
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()
def pe_onDequeuedRandom(self): self.__queueFunctional = functional.createQueueFunctional(isInRandomQueue=False) self.__queueFunctional.onChanged() events_dispatcher.updateUI()
def prb_onPlayerRemoved(self, pID, roster, name): super(CompanyFunctional, self).prb_onPlayerRemoved(pID, roster, name) events_dispatcher.updateUI()
def prb_onSettingUpdated(self, settingName): super(BattleSessionFunctional, self).prb_onSettingUpdated(settingName) if settingName == PREBATTLE_SETTING_NAME.LIMITS: events_dispatcher.updateUI()
def pe_onDequeuedRandom(self): self.__queueFunctional = functional.createQueueFunctional( isInRandomQueue=False) self.__queueFunctional.onChanged() events_dispatcher.updateUI()