Пример #1
0
 def _removeGameListeners(self):
     g_eventBus.removeListener(GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade)
     g_critMemHandler.onMemCrit -= self.__handleMemoryCriticalMessage
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleMessageByCode -= self.__onShowVehicleMessageByCode
         ctrl.onShowVehicleMessageByKey -= self.__onShowVehicleMessageByKey
     super(VehicleMessages, self)._removeGameListeners()
Пример #2
0
 def __changeVehicleSetting(self, tag, entityName):
     result, error = g_sessionProvider.getEquipmentsCtrl().changeSettingByTag(
         tag, entityName=entityName, avatar=BigWorld.player()
     )
     if not result and error:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.onShowVehicleErrorByKey(error.key, error.ctx)
Пример #3
0
 def __changeVehicleSetting(self, tag, entityName):
     result, error = g_sessionProvider.getEquipmentsCtrl(
     ).changeSettingByTag(tag,
                          entityName=entityName,
                          avatar=BigWorld.player())
     if not result and error:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.onShowVehicleErrorByKey(error.key, error.ctx)
Пример #4
0
 def _removeGameListeners(self):
     g_eventBus.removeListener(GameEvent.SCREEN_SHOT_MADE,
                               self.__handleScreenShotMade)
     g_critMemHandler.onMemCrit -= self.__handleMemoryCriticalMessage
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleMessageByCode -= self.__onShowVehicleMessageByCode
         ctrl.onShowVehicleMessageByKey -= self.__onShowVehicleMessageByKey
     super(VehicleMessages, self)._removeGameListeners()
Пример #5
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowPlayerMessageByCode -= self.__onShowPlayerMessageByCode
         ctrl.onShowPlayerMessageByKey -= self.__onShowPlayerMessageByKey
     ctrl = g_sessionProvider.getEquipmentsCtrl()
     if ctrl:
         ctrl.onEquipmentUpdated -= self.__onCombatEquipmentUpdated
     arena = avatar_getter.getArena()
     if arena:
         arena.onCombatEquipmentUsed -= self.__onCombatEquipmentUsed
     super(PlayerMessages, self)._removeGameListeners()
Пример #6
0
    def _addGameListeners(self):
        super(VehicleMessages, self)._addGameListeners()
        g_eventBus.addListener(GameEvent.SCREEN_SHOT_MADE, self.__handleScreenShotMade)
        for message in g_critMemHandler.messages:
            self.__handleMemoryCriticalMessage(message)

        g_critMemHandler.onMemCrit += self.__handleMemoryCriticalMessage
        ctrl = g_sessionProvider.getBattleMessagesCtrl()
        if ctrl:
            ctrl.onShowVehicleMessageByCode += self.__onShowVehicleMessageByCode
            ctrl.onShowVehicleMessageByKey += self.__onShowVehicleMessageByKey
            ctrl.onUIPopulated()
Пример #7
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowPlayerMessageByCode -= self.__onShowPlayerMessageByCode
         ctrl.onShowPlayerMessageByKey -= self.__onShowPlayerMessageByKey
     ctrl = g_sessionProvider.getEquipmentsCtrl()
     if ctrl:
         ctrl.onEquipmentUpdated -= self.__onCombatEquipmentUpdated
     arena = avatar_getter.getArena()
     if arena:
         arena.onCombatEquipmentUsed -= self.__onCombatEquipmentUsed
     super(PlayerMessages, self)._removeGameListeners()
Пример #8
0
    def _addGameListeners(self):
        super(VehicleMessages, self)._addGameListeners()
        g_eventBus.addListener(GameEvent.SCREEN_SHOT_MADE,
                               self.__handleScreenShotMade)
        for message in g_critMemHandler.messages:
            self.__handleMemoryCriticalMessage(message)

        g_critMemHandler.onMemCrit += self.__handleMemoryCriticalMessage
        ctrl = g_sessionProvider.getBattleMessagesCtrl()
        if ctrl:
            ctrl.onShowVehicleMessageByCode += self.__onShowVehicleMessageByCode
            ctrl.onShowVehicleMessageByKey += self.__onShowVehicleMessageByKey
            ctrl.onUIPopulated()
Пример #9
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleErrorByKey -= self.__onShowVehicleErrorByKey
     super(VehicleErrorMessages, self)._removeGameListeners()
Пример #10
0
 def __showInfoMessage(self, msg, args = None):
     from gui.battle_control import g_sessionProvider
     if not self.isTimeWarpInProgress:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.showInfoMessage(msg, True, args)
Пример #11
0
 def _removeGameListeners(self):
     ctrl = g_sessionProvider.getBattleMessagesCtrl()
     if ctrl:
         ctrl.onShowVehicleErrorByKey -= self.__onShowVehicleErrorByKey
     super(VehicleErrorMessages, self)._removeGameListeners()
Пример #12
0
 def __showInfoMessage(self, msg, args=None):
     from gui.battle_control import g_sessionProvider
     if not self.isTimeWarpInProgress:
         ctrl = g_sessionProvider.getBattleMessagesCtrl()
         if ctrl:
             ctrl.showInfoMessage(msg, True, args)