當前位置: 首頁>>代碼示例>>Python>>正文


Python ArenaType類代碼示例

本文整理匯總了Python中ArenaType的典型用法代碼示例。如果您正苦於以下問題:Python ArenaType類的具體用法?Python ArenaType怎麽用?Python ArenaType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ArenaType類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: init

def init(scriptConfig, engineConfig, userPreferences, loadingScreenGUI = None):
    global g_replayCtrl
    try:
        if constants.IS_DEVELOPMENT:
            autoFlushPythonLog()
        LOG_DEBUG('init')
        BigWorld.wg_initCustomSettings()
        Settings.g_instance = Settings.Settings(scriptConfig, engineConfig, userPreferences)
        CommandMapping.g_instance = CommandMapping.CommandMapping()
        from helpers import DecalMap
        DecalMap.g_instance = DecalMap.DecalMap(scriptConfig['decal'])
        from helpers import EdgeDetectColorController
        EdgeDetectColorController.g_instance = EdgeDetectColorController.EdgeDetectColorController(scriptConfig['silhouetteColors'])
        import SoundGroups
        SoundGroups.g_instance = SoundGroups.SoundGroups()
        import BattleReplay
        g_replayCtrl = BattleReplay.g_replayCtrl = BattleReplay.BattleReplay()
        g_replayCtrl.registerWotReplayFileExtension()
        try:
            import Vibroeffects
            Vibroeffects.VibroManager.g_instance = Vibroeffects.VibroManager.VibroManager()
            Vibroeffects.VibroManager.g_instance.connect()
        except:
            LOG_CURRENT_EXCEPTION()

        tutorialLoaderInit()
        BigWorld.callback(0.1, asyncore_call)
        MessengerEntry.g_instance.init()
        import items
        items.init(True, None if not constants.IS_DEVELOPMENT else {})
        import ArenaType
        ArenaType.init()
        import dossiers1
        dossiers1.init()
        import dossiers2
        dossiers2.init()
        BigWorld.worldDrawEnabled(False)
        import LcdKeyboard
        LcdKeyboard.enableLcdKeyboardSpecificKeys(True)
        gui_personality.init(loadingScreenGUI=loadingScreenGUI)
        AreaDestructibles.init()
        MusicController.init()
        TriggersManager.init()
        RSSDownloader.init()
        g_postProcessing.init()
        try:
            from LightFx import LightManager
            LightManager.g_instance = LightManager.LightManager()
            import AuxiliaryFx
            AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager()
        except:
            LOG_CURRENT_EXCEPTION()

    except Exception:
        LOG_CURRENT_EXCEPTION()
        BigWorld.quit()

    return
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:58,代碼來源:game.py

示例2: _migrateTo6

def _migrateTo6(core, data, initialized):
    from account_helpers.settings_core.ServerSettingsManager import SETTINGS_SECTIONS
    storedValue = g_settingsCache.getSectionSettings(SETTINGS_SECTIONS.GAME, 0)
    maskOffset = 7168
    currentMask = (storedValue & maskOffset) >> 10
    import ArenaType
    newMask = currentMask | ArenaType.getVisibilityMask(ArenaType.getGameplayIDForName('nations'))
    data['gameplayData'][GAME.GAMEPLAY_MASK] = newMask
    clear = data['clear']
    clear[SETTINGS_SECTIONS.GAME] = clear.get(SETTINGS_SECTIONS.GAME, 0) | maskOffset
開發者ID:aevitas,項目名稱:wotsdk,代碼行數:10,代碼來源:settings_coremigrations.py

示例3: onClientReady

 def onClientReady(self):
     if not (self.isPlaying or self.isRecording):
         return
     elif self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
         self.stop(None, True)
         return
     else:
         self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
         self.__replayCtrl.onClientReady()
         if self.isPlaying:
             AreaDestructibles.g_destructiblesManager.onAfterReplayTimeWarp()
             if isPlayerAvatar():
                 BigWorld.player().onVehicleEnterWorld += self.__onVehicleEnterWorld
         if self.isRecording:
             player = BigWorld.player()
             arena = player.arena
             arenaName = arena.arenaType.geometry
             i = arenaName.find('/')
             if i != -1:
                 arenaName = arenaName[i + 1:]
             now = datetime.datetime.now()
             now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
              now.month,
              now.year,
              now.hour,
              now.minute,
              now.second)
             vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
             vehicleName = vehicleName.replace(':', '-')
             vehicles = self.__getArenaVehiclesInfo()
             gameplayID = player.arenaTypeID >> 16
             clientVersionFromXml = getFullClientVersion()
             clientVersionFromExe = BigWorld.wg_getProductVersion()
             arenaInfo = {'dateTime': now,
              'playerName': player.name,
              'playerID': self.__playerDatabaseID,
              'playerVehicle': vehicleName,
              'mapName': arenaName,
              'mapDisplayName': arena.arenaType.name,
              'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
              'vehicles': vehicles,
              'battleType': arena.bonusType,
              'clientVersionFromExe': clientVersionFromExe,
              'clientVersionFromXml': clientVersionFromXml,
              'serverName': connectionManager.serverUserName,
              'regionCode': constants.AUTH_REALM,
              'serverSettings': self.__serverSettings}
             self.__replayCtrl.recMapName = arenaName
             self.__replayCtrl.recPlayerVehicleName = vehicleName
             self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
         else:
             self.__showInfoMessage('replayControlsHelp1')
             self.__showInfoMessage('replayControlsHelp2')
             self.__showInfoMessage('replayControlsHelp3')
             if self.replayTimeout > 0:
                 LOG_DEBUG('replayTimeout set for %.2f' % float(self.replayTimeout))
                 BigWorld.callback(float(self.replayTimeout), BigWorld.quit)
         return
開發者ID:webiumsk,項目名稱:WOT-0.9.15.1,代碼行數:58,代碼來源:battlereplay.py

示例4: setMaskByNames

def setMaskByNames(names):
    gameplayNames = {'ctf'}
    for name in names:
        if name in ArenaType.g_gameplayNames:
            gameplayNames.add(name)
        else:
            LOG_ERROR('Gameplay is not available', name)

    gameplayMask = ArenaType.getGameplaysMask(gameplayNames)
    LOG_DEBUG('Set gameplay (names, mask)', gameplayNames, gameplayMask)
    _setMask(gameplayMask)
開發者ID:krzcho,項目名稱:WOTDecompiled,代碼行數:11,代碼來源:gameplay_ctx.py

示例5: onClientReady

 def onClientReady(self):
     if not (self.isPlaying or self.isRecording):
         return
     if self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
         self.stop()
         return
     self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
     self.__replayCtrl.onClientReady()
     if self.isRecording:
         player = BigWorld.player()
         arena = player.arena
         arenaName = arena.arenaType.geometry
         i = arenaName.find('/')
         if i != -1:
             arenaName = arenaName[i + 1:]
         now = datetime.datetime.now()
         now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
          now.month,
          now.year,
          now.hour,
          now.minute,
          now.second)
         vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
         vehicleName = vehicleName.replace(':', '-')
         vehicles = self.__getArenaVehiclesInfo()
         gameplayID = player.arenaTypeID >> 16
         sec = ResMgr.openSection(VERSION_FILE_PATH)
         clientVersionFromXml = i18n.makeString(sec.readString('appname')) + ' ' + sec.readString('version')
         clientVersionFromExe = BigWorld.wg_getProductVersion()
         arenaInfo = {'dateTime': now,
          'playerName': player.name,
          'playerID': self.__playerDatabaseID,
          'playerVehicle': vehicleName,
          'mapName': arenaName,
          'mapDisplayName': arena.arenaType.name,
          'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
          'vehicles': vehicles,
          'battleType': arena.bonusType,
          'clientVersionFromExe': clientVersionFromExe,
          'clientVersionFromXml': clientVersionFromXml,
          'serverName': connectionManager.serverUserName,
          'regionCode': constants.AUTH_REALM,
          'roamingSettings': self.__roamingSettings}
         self.__replayCtrl.recMapName = arenaName
         self.__replayCtrl.recPlayerVehicleName = vehicleName
         self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
     else:
         self.isPlaying = True
         self.__enableTimeWarp = True
         currReplayTime = self.__replayCtrl.getTimeMark(REPLAY_TIME_MARK_CURRENT_TIME)
         self.__timeWarp(currReplayTime + 30.0)
         self.triggerRecord()
         self.__disableSidePanelContextMenu()
開發者ID:thesilvervestgroup,項目名稱:wotpotato-mods,代碼行數:53,代碼來源:battlereplay.py

示例6: setMaskByNames

def setMaskByNames(names):
    gameplayNames = {'ctf'}
    for name in names:
        if name in ArenaType.g_gameplayNames:
            gameplayNames.add(name)
        else:
            LOG_ERROR('Gameplay is not available', name)

    gameplayMask = ArenaType.getGameplaysMask(gameplayNames)
    LOG_DEBUG('Set gameplay (names, mask)', gameplayNames, gameplayMask)
    from account_helpers.settings_core.SettingsCore import g_settingsCore
    g_settingsCore.serverSettings.setGameplaySettings({'gameplayMask': gameplayMask})
開發者ID:wotmods,項目名稱:WOTDecompiled,代碼行數:12,代碼來源:gameplay_ctx.py

示例7: onClientReady

 def onClientReady(self):
     if not self.isPlaying:
         if not self.isRecording:
             return
         if self.isRecording and BigWorld.player().arena.guiType == constants.ARENA_GUI_TYPE.TUTORIAL:
             self.stop()
             return
         self.__replayCtrl.playerVehicleID = BigWorld.player().playerVehicleID
         self.__replayCtrl.onClientReady()
         if self.isRecording:
             player = BigWorld.player()
             arena = player.arena
             arenaName = arena.arenaType.geometry
             i = arenaName.find('/')
             arenaName = i != -1 and arenaName[i + 1:]
         now = datetime.datetime.now()
         now = '%02d.%02d.%04d %02d:%02d:%02d' % (now.day,
          now.month,
          now.year,
          now.hour,
          now.minute,
          now.second)
         vehicleName = BigWorld.entities[player.playerVehicleID].typeDescriptor.name
         vehicleName = vehicleName.replace(':', '-')
         vehicles = self.__getArenaVehiclesInfo()
         gameplayID = player.arenaTypeID >> 16
         sec = ResMgr.openSection(VERSION_FILE_PATH)
         clientVersionFromXml = i18n.makeString(sec.readString('appname')) + ' ' + sec.readString('version')
         clientVersionFromExe = BigWorld.wg_getProductVersion()
         arenaInfo = {'dateTime': now,
          'playerName': player.name,
          'playerID': self.__playerDatabaseID,
          'playerVehicle': vehicleName,
          'mapName': arenaName,
          'mapDisplayName': arena.arenaType.name,
          'gameplayID': ArenaType.getGameplayName(gameplayID) or gameplayID,
          'vehicles': vehicles,
          'battleType': arena.bonusType,
          'clientVersionFromExe': clientVersionFromExe,
          'clientVersionFromXml': clientVersionFromXml}
         self.__replayCtrl.recMapName = arenaName
         self.__replayCtrl.recPlayerVehicleName = vehicleName
         self.__replayCtrl.setArenaInfoStr(json.dumps(arenaInfo))
     else:
         self.__showInfoMessage('replayControlsHelp1')
         self.__showInfoMessage('replayControlsHelp2')
         self.__showInfoMessage('replayControlsHelp3')
         self.__disableSidePanelContextMenu()
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:48,代碼來源:battlereplay.py

示例8: __startWGPhysics

 def __startWGPhysics(self):
     if not hasattr(self.filter, 'setVehiclePhysics'):
         return
     typeDescr = self.typeDescriptor
     physics = BigWorld.WGVehiclePhysics()
     physics_shared.initVehiclePhysics(physics, typeDescr)
     arenaMinBound, arenaMaxBound = (-10000, -10000), (10000, 10000)
     physics.setArenaBounds(arenaMinBound, arenaMaxBound)
     physics.enginePower = typeDescr.physics['enginePower'] / 1000.0
     physics.owner = weakref.ref(self)
     physics.staticMode = False
     physics.movementSignals = 0
     physics.damageDestructibleCb = None
     physics.destructibleHealthRequestCb = None
     self.filter.setVehiclePhysics(physics)
     physics.visibilityMask = ArenaType.getVisibilityMask(BigWorld.player().arenaTypeID >> 16)
     yaw, pitch = decodeGunAngles(self.gunAnglesPacked, typeDescr.gun['pitchLimits']['absolute'])
     self.filter.syncGunAngles(yaw, pitch)
     self.appearance.fashion.placingCompensationMatrix = self.filter.placingCompensationMatrix
開發者ID:Bouilloire,項目名稱:WoTConfig,代碼行數:19,代碼來源:vehicle.py

示例9: getValue

 def getValue(name):
     return ArenaType.getVisibilityMask(ArenaType.getGameplayIDForName(name))
開發者ID:krzcho,項目名稱:WOTDecompiled,代碼行數:2,代碼來源:gameplay_ctx.py

示例10: __getSettings

    def __getSettings(self):
        settings = [self.graphicsPresets.getGraphicsPresetsData()]
        import VOIP
        rh = VOIP.getVOIPManager()
        g_windowsStoredData.start()
        vManager = VibroManager.g_instance
        vEffGroups = vManager.getGroupsSettings()
        vEffDefGroup = VibroManager.VibroManager.GroupSettings()
        vEffDefGroup.enabled = False
        vEffDefGroup.gain = 0
        markers = {'enemy': g_settingsCore.getSetting('enemy'),
         'dead': g_settingsCore.getSetting('dead'),
         'ally': g_settingsCore.getSetting('ally')}
        config = {'locale': getClientOverride(),
         'aspectRatio': {'current': self.resolutions.aspectRatioIndex,
                         'options': self.resolutions.aspectRatiosList},
         'vertSync': self.resolutions.isVideoVSync,
         'tripleBuffered': self.resolutions.isTripleBuffered,
         'multisampling': {'current': self.resolutions.multisamplingTypeIndex,
                           'options': self.resolutions.multisamplingTypesList},
         'customAA': {'current': self.resolutions.customAAModeIndex,
                      'options': self.resolutions.customAAModesList},
         'gamma': self.resolutions.gamma,
         'masterVolume': round(SoundGroups.g_instance.getMasterVolume() * 100),
         'musicVolume': round(SoundGroups.g_instance.getVolume('music') * 100),
         'voiceVolume': round(SoundGroups.g_instance.getVolume('voice') * 100),
         'vehiclesVolume': round(SoundGroups.g_instance.getVolume('vehicles') * 100),
         'effectsVolume': round(SoundGroups.g_instance.getVolume('effects') * 100),
         'guiVolume': round(SoundGroups.g_instance.getVolume('gui') * 100),
         'ambientVolume': round(SoundGroups.g_instance.getVolume('ambient') * 100),
         'masterVivoxVolume': round(SoundGroups.g_instance.getVolume('masterVivox') * 100),
         'micVivoxVolume': round(SoundGroups.g_instance.getVolume('micVivox') * 100),
         'masterFadeVivoxVolume': round(SoundGroups.g_instance.getVolume('masterFadeVivox') * 100),
         'captureDevice': self.__getCaptureDeviceSettings(),
         'voiceChatNotSupported': rh.vivoxDomain == '' or not VoiceChatInterface.g_instance.ready,
         'datetimeIdx': g_settingsCore.serverSettings.getGameSetting('datetimeIdx', 2),
         'enableOlFilter': g_settingsCore.getSetting('enableOlFilter'),
         'enableSpamFilter': g_settingsCore.getSetting('enableSpamFilter'),
         'enableStoreChatMws': g_settingsCore.getSetting('enableStoreMws'),
         'enableStoreChatCws': g_settingsCore.getSetting('enableStoreCws'),
         'invitesFromFriendsOnly': g_settingsCore.getSetting('invitesFromFriendsOnly'),
         'storeReceiverInBattle': g_settingsCore.getSetting('storeReceiverInBattle'),
         'dynamicCamera': g_settingsCore.getSetting('dynamicCamera'),
         'horStabilizationSnp': g_settingsCore.getSetting('horStabilizationSnp'),
         'enableVoIP': VOIP.getVOIPManager().channelsMgr.enabled,
         'enablePostMortemEffect': g_settingsCore.getSetting('enablePostMortemEffect'),
         'nationalVoices': AccountSettings.getSettings('nationalVoices'),
         'isColorBlind': AccountSettings.getSettings('isColorBlind'),
         'useServerAim': g_settingsCore.getSetting('useServerAim'),
         'showVehiclesCounter': g_settingsCore.getSetting('showVehiclesCounter'),
         'minimapAlpha': g_settingsCore.getSetting('minimapAlpha'),
         'vibroIsConnected': vManager.connect(),
         'vibroGain': vManager.getGain() * 100,
         'vibroEngine': vEffGroups.get('engine', vEffDefGroup).gain * 100,
         'vibroAcceleration': vEffGroups.get('acceleration', vEffDefGroup).gain * 100,
         'vibroShots': vEffGroups.get('shots', vEffDefGroup).gain * 100,
         'vibroHits': vEffGroups.get('hits', vEffDefGroup).gain * 100,
         'vibroCollisions': vEffGroups.get('collisions', vEffDefGroup).gain * 100,
         'vibroDamage': vEffGroups.get('damage', vEffDefGroup).gain * 100,
         'vibroGUI': vEffGroups.get('gui', vEffDefGroup).gain * 100,
         'ppShowLevels': g_settingsCore.getSetting('ppShowLevels'),
         'ppShowTypes': AccountSettings.getSettings('players_panel')['showTypes'],
         'replayEnabled': g_settingsCore.getSetting('replayEnabled'),
         'fpsPerfomancer': g_settingsCore.getSetting('fpsPerfomancer'),
         'arcade': {'values': g_settingsCore.options.getSetting('arcade').toAccountSettings(),
                    'options': SettingsInterface.CURSOR_VALUES},
         'sniper': {'values': g_settingsCore.options.getSetting('sniper').toAccountSettings(),
                    'options': SettingsInterface.SNIPER_VALUES},
         'markers': {'values': markers,
                     'options': SettingsInterface.MARKER_VALUES,
                     'types': SettingsInterface.MARKER_TYPES}}
        if self.__altVoiceSetting.isOptionEnabled():
            altVoices = []
            for idx, desc in enumerate(self.__altVoiceSetting.getOptions()):
                altVoices.append({'data': idx,
                 'label': desc})

            config['alternativeVoices'] = {'current': self.__altVoiceSetting.get(),
             'options': altVoices}
        gameplayMask = gameplay_ctx.getMask()
        for name in ArenaType.g_gameplayNames:
            key = self.GAMEPLAY_KEY_FORMAT.format(name)
            bit = ArenaType.getVisibilityMask(ArenaType.getGameplayIDForName(name))
            config[key] = gameplayMask & bit > 0

        settings.append(config)
        if not LogitechMonitor.isPresentColor():
            if self.KEYBOARD_MAPPING_BLOCKS.has_key('logitech_keyboard'):
                del self.KEYBOARD_MAPPING_BLOCKS['logitech_keyboard']
        else:
            self.KEYBOARD_MAPPING_BLOCKS['logitech_keyboard'] = ('switch_view',)
        cmdMap = CommandMapping.g_instance
        defaults = cmdMap.getDefaults()
        keyboard = []
        for group_name in self.KEYBOARD_MAPPING_BLOCKS_ORDER:
            if group_name in self.KEYBOARD_MAPPING_BLOCKS.keys():
                group = {'id': group_name,
                 'commands': []}
                keyboard.append(group)
                for key_setting in self.KEYBOARD_MAPPING_BLOCKS[group_name]:
#.........這裏部分代碼省略.........
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:101,代碼來源:settingsinterface.py

示例11: __init__

 def __init__(self, settingName, gameplayName, storage):
     super(GameplaySetting, self).__init__(settingName, storage)
     self.gameplayName = gameplayName
     self.bit = ArenaType.getVisibilityMask(ArenaType.getGameplayIDForName(self.gameplayName))
開發者ID:19colt87,項目名稱:WOTDecompiled,代碼行數:4,代碼來源:options.py


注:本文中的ArenaType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。