def __init__(self, **settings): self.logger = getLogger('Backend:{}'.format(self.__class__.__name__)) self._settings = settings self._cache = {} notProvided = set(self.__class__.REQUIRED) - set(settings.keys()) if notProvided: raise ValueError('Not all settings passed to backend. Missed [{}]'.format(list(notProvided))) self.prepare()
def __init__(self, features): self._db = features.require(Feature.DB_LOGIC) self._model = features.require(Feature.GAME_MODEL).player self._playerAvatar = features.require(Feature.PLAYER_AVATAR) self._clientArena = features.require(Feature.CLIENT_ARENA) self._gameEnv = features.require(Feature.GAME_ENVIRONMENT) self._input = features.require(Feature.INPUT) self._playerAvatar.eTacticalSpectator += self._reFillModel self._input.eBattleModeChange += self._onSetBattleMod self._battleMod = BATTLE_MODE.COMBAT_MODE self._log = getLogger(self) self._fellModel()
def __init__(self, player): self._player = player self._bombTarget = BombTargetProxy self._visibleBombing = True self._isTabActive = False self._isHudVisible = True self._player.eTacticalRespawnEnd += self._onTacticalRespawnEnd self._player.eTacticalSpectator += self._onTacticalRespawnEnd self._log = getLogger(self) self._input = GameEnvironment.getInput().commandProcessor self._input.addListeners(InputMapping.CMD_VISIBILITY_HUD, None, None, self._onHUDVisibilityCommand) self._input.addListeners(InputMapping.CMD_SHOW_TEAMS, None, None, self._setTabStateActive) return
def __init__(self, features): self.regicToExecutionManager() self._logger = getLogger(self.__class__.__name__) self._model = features.require(Feature.GAME_MODEL).combatLog self._playerAvatar = features.require(Feature.PLAYER_AVATAR) self._gameEnvironment = features.require(Feature.GAME_ENVIRONMENT) self._clientArena = features.require(Feature.CLIENT_ARENA) self._economics = features.require(Feature.CLIENT_ECONOMICS) self._input = features.require(Feature.INPUT) self._processor = self._input.commandProcessor self._economics.assignModelView(self) self._filterManager = FilterManager() self._processor.addListeners(InputMapping.CMD_SHOW_CURSOR, None, None, self.activateCombatLog) self._clientArena.onVehicleKilled += self.onAvatarDestroyed self._model.planeModelFlag = SETTINGS.flags[SETTINGS.PLANE_MODEL] self._model.clanFlag = SETTINGS.flags[SETTINGS.PLAYER_CLAN] self._model.isActive = False return
def __init__(self, features): self._modelCrosshair = features.require(Feature.GAME_MODEL).crosshair self._model = features.require(Feature.GAME_MODEL).crosshair.simple self._playerAvatar = features.require(Feature.PLAYER_AVATAR) self._input = features.require(Feature.INPUT) self._camera = features.require(Feature.CAMERA) self._timer = features.require(Feature.TIMER_SERVICE) self._gameEnvironment = features.require(Feature.GAME_ENVIRONMENT) self._model.heatShowLimit = clientConsts.WEAPON_OVERHEAT_DELTA self._model.maxPulsationLength = clientConsts.MAX_PULSATION_LENGTH self._log = getLogger(self) self._pulsationChangeTrigger = False self._updateEnabled = True self._timer.eUpdate += self._update self._playerAvatar.eOnGunGroupFire += self._onGunGroupFire self._updateCrossImage(None) self._playerAvatar.eTacticalRespawnEnd += self._updateCrossImage self._playerAvatar.eTacticalSpectator += self._updateCrossImage self._gameEnvironment.eOnCrossSizeChanged += self.setCrossSize self._camera.eSetCrosshairVisible += self.__setCrosshairVisible return
# Embedded file name: scripts/common/debug_ipc.py import cProfile import os import sys import time from datetime import datetime import BigWorld from BWLogging import getLogger logger = getLogger(__name__) profiler = None def initDebug(configSection): global profiler if not configSection: return else: import importlib import db.DBLogic import ResMgr if configSection.readBool('dbCache'): db.DBLogic.CACHED_DB_FILE = ResMgr.resolveToAbsolutePath( db.DBLogic.CACHED_DB_FILE) db.DBLogic.initDB(loadFromCache=True) if BigWorld.component == 'service' and not os.path.exists( db.DBLogic.CACHED_DB_FILE): db.DBLogic.tryPicleDB(db.DBLogic.g_instance) if configSection['pythonpath']: for name, pathSection in configSection['pythonpath'].items(): path = pathSection.asString if path in sys.path:
def __init__(self): type(self).instance = self self.objects = {} self.calls = [] self.logger = getLogger(type(self).__name__)
import Keys import consts from db.DBHelpers import readValue if consts.IS_CLIENT: from Helpers.i18n import makeString, localizeOptions from MathExt import * import math import threading from debug_utils import * from input.ProfileLoader.DummyDeviceLoader import MouseDummy from input.ProfileLoader.MouseLoader import MouseLoader from input.ProfileLoader.JoystickLoader import JoystickSettings from input.ProfileLoader.KeyMapingLoader import Keyboard, prepareLoadMapping from input.ProfileLoader.GamepadLoader import GamepadProfileLoader from BWLogging import getLogger logger = getLogger('settings') g_instance = None g_descriptions = None FORCE_DEFAULT_INPUT_PATH = False AXES = { 'AXIS_LX': Keys.AXIS_LX, 'AXIS_LY': Keys.AXIS_LY, 'AXIS_LZ': Keys.AXIS_LZ, 'AXIS_RX': Keys.AXIS_RX, 'AXIS_RY': Keys.AXIS_RY, 'AXIS_RZ': Keys.AXIS_RZ, 'AXIS_U': Keys.AXIS_U, 'AXIS_V': Keys.AXIS_V } MODIFIERS = { 'MODIFIER_SHIFT': Keys.MODIFIER_SHIFT,