Пример #1
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            IoCManager.Resolve <IStatusHost>().SetAczInfo("Content.Client",
                                                          new[] { "Content.Client", "Content.Shared", "Content.Shared.Database" });

            var factory    = IoCManager.Resolve <IComponentFactory>();
            var prototypes = IoCManager.Resolve <IPrototypeManager>();

            factory.DoAutoRegistrations();

            foreach (var ignoreName in IgnoredComponents.List)
            {
                factory.RegisterIgnore(ignoreName);
            }

            prototypes.RegisterIgnore("parallax");

            ServerContentIoC.Register();

            foreach (var callback in TestingCallbacks)
            {
                var cast = (ServerModuleTestingCallbacks)callback;
                cast.ServerBeforeIoC?.Invoke();
            }

            IoCManager.BuildGraph();
            factory.GenerateNetIds();
            var configManager = IoCManager.Resolve <IConfigurationManager>();
            var dest          = configManager.GetCVar(CCVars.DestinationFile);

            if (string.IsNullOrEmpty(dest)) //hacky but it keeps load times for the generator down.
            {
                _euiManager    = IoCManager.Resolve <EuiManager>();
                _voteManager   = IoCManager.Resolve <IVoteManager>();
                _updateManager = IoCManager.Resolve <ServerUpdateManager>();

                var playerManager = IoCManager.Resolve <IPlayerManager>();

                var logManager = IoCManager.Resolve <ILogManager>();
                logManager.GetSawmill("Storage").Level = LogLevel.Info;
                logManager.GetSawmill("db.ef").Level   = LogLevel.Info;

                IoCManager.Resolve <IAdminLogManager>().Initialize();
                IoCManager.Resolve <IConnectionManager>().Initialize();
                IoCManager.Resolve <IServerDbManager>().Init();
                IoCManager.Resolve <IServerPreferencesManager>().Init();
                IoCManager.Resolve <INodeGroupFactory>().Initialize();
                IoCManager.Resolve <IGamePrototypeLoadManager>().Initialize();
                IoCManager.Resolve <NetworkResourceManager>().Initialize();
                IoCManager.Resolve <GhostKickManager>().Initialize();

                _voteManager.Initialize();
                _updateManager.Initialize();
            }
        }
Пример #2
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            IoCManager.Resolve <IStatusHost>().SetAczInfo("Content.Client",
                                                          new[] { "Content.Client", "Content.Shared", "Content.Shared.Database" });

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.DoAutoRegistrations();

            foreach (var ignoreName in IgnoredComponents.List)
            {
                factory.RegisterIgnore(ignoreName);
            }

            ServerContentIoC.Register();

            foreach (var callback in TestingCallbacks)
            {
                var cast = (ServerModuleTestingCallbacks)callback;
                cast.ServerBeforeIoC?.Invoke();
            }

            IoCManager.BuildGraph();
            factory.GenerateNetIds();

            _euiManager  = IoCManager.Resolve <EuiManager>();
            _voteManager = IoCManager.Resolve <IVoteManager>();

            IoCManager.Resolve <IChatSanitizationManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;
            logManager.GetSawmill("db.ef").Level   = LogLevel.Info;

            IoCManager.Resolve <IConnectionManager>().Initialize();
            IoCManager.Resolve <IServerDbManager>().Init();
            IoCManager.Resolve <IServerPreferencesManager>().Init();
            IoCManager.Resolve <INodeGroupFactory>().Initialize();
            IoCManager.Resolve <IGamePrototypeLoadManager>().Initialize();
            _voteManager.Initialize();
        }
Пример #3
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.DoAutoRegistrations();

            foreach (var ignoreName in IgnoredComponents.List)
            {
                factory.RegisterIgnore(ignoreName);
            }

            ServerContentIoC.Register();

            foreach (var callback in TestingCallbacks)
            {
                var cast = (ServerModuleTestingCallbacks)callback;
                cast.ServerBeforeIoC?.Invoke();
            }

            IoCManager.BuildGraph();

            _gameTicker  = IoCManager.Resolve <IGameTicker>();
            _euiManager  = IoCManager.Resolve <EuiManager>();
            _voteManager = IoCManager.Resolve <IVoteManager>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;
            logManager.GetSawmill("db.ef").Level   = LogLevel.Info;

            IoCManager.Resolve <IConnectionManager>().Initialize();
            IoCManager.Resolve <IServerDbManager>().Init();
            IoCManager.Resolve <IServerPreferencesManager>().Init();
            IoCManager.Resolve <INodeGroupFactory>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IAccentManager>().Initialize();
            _voteManager.Initialize();
        }