def init(scriptConfig, engineConfig, userPreferences, loadingScreenGUI=None): global g_replayCtrl try: if constants.IS_DEVELOPMENT: autoFlushPythonLog() BigWorld.wg_initCustomSettings() g_postProcessing.init() 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: from Vibroeffects import VibroManager VibroManager.g_instance = VibroManager.VibroManager() VibroManager.g_instance.connect() except: LOG_CURRENT_EXCEPTION() tutorialLoaderInit() BigWorld.callback(0.1, asyncore_call) import items items.init(True, None if not constants.IS_DEVELOPMENT else {}) import win_points win_points.init() import rage rage.init() import ArenaType ArenaType.init() import dossiers2 dossiers2.init() import fortified_regions fortified_regions.init() import clubs_settings clubs_settings.init() import potapov_quests potapov_quests.init() import clubs_quests clubs_quests.init() import motivation_quests motivation_quests.init() BigWorld.worldDrawEnabled(False) import LcdKeyboard LcdKeyboard.enableLcdKeyboardSpecificKeys(True) dependency.configure(services_config.getClientServicesConfig) gui_personality.init(loadingScreenGUI=loadingScreenGUI) EdgeDetectColorController.g_instance.create() g_replayCtrl.subscribe() MessengerEntry.g_instance.init() AreaDestructibles.init() MusicControllerWWISE.create() TriggersManager.init() RSSDownloader.init() SoundGroups.loadLightSoundsDB() try: from LightFx import LightManager LightManager.g_instance = LightManager.LightManager() import AuxiliaryFx AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager() except: LOG_CURRENT_EXCEPTION() from AvatarInputHandler.cameras import FovExtended FovExtended.instance().resetFov() BigWorld.pauseDRRAutoscaling(True) except Exception: LOG_CURRENT_EXCEPTION() BigWorld.quit() return
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() import fortified_regions fortified_regions.init() import potapov_quests potapov_quests.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() SoundGroups.loadLightSoundsDB() try: from LightFx import LightManager LightManager.g_instance = LightManager.LightManager() import AuxiliaryFx AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager() except: LOG_CURRENT_EXCEPTION() from AvatarInputHandler.cameras import FovExtended FovExtended.instance().resetFov() SoundGroups.loadPluginDB() except Exception: LOG_CURRENT_EXCEPTION() BigWorld.quit()