Init() 공개 메소드

public Init ( ) : void
리턴 void
예제 #1
0
        private void PluginManagerMain(object sender, EventArgs e)
        {
            if (!Server.Instance.IsRunning)
            {
                m_pluginMainLoop.Stop();
                return;
            }

            if (m_pluginManager == null)
            {
                m_pluginMainLoop.Stop();
                return;
            }

            if (!m_pluginManager.Initialized && !m_pluginManager.Loaded)
            {
                if (SandboxGameAssemblyWrapper.Instance.IsGameStarted)
                {
                    m_pluginManager.LoadPlugins();
                    m_pluginManager.Init();
                }
            }
            else
            {
                //Force a refresh of the chat messages before running the plugin update
                List <string> messages = ChatManager.Instance.ChatMessages;

                //Run the plugin update
                m_pluginManager.Update();
            }
        }
예제 #2
0
        private void PluginManagerMain(object sender, EventArgs e)
        {
            if (!Server.Instance.IsRunning)
            {
                m_pluginMainLoop.Stop();
                return;
            }

            if (m_pluginManager == null)
            {
                m_pluginMainLoop.Stop();
                return;
            }

            if (!m_pluginManager.Initialized)
            {
                if (SandboxGameAssemblyWrapper.Instance.IsGameStarted)
                {
                    m_pluginManager.LoadPlugins();
                    m_pluginManager.Init();
                }
            }
            else
            {
                m_pluginManager.Update();
            }
        }
예제 #3
0
        private void PluginManagerMain(object sender, EventArgs e)
        {
            if (!Instance.IsRunning)
            {
                _pluginMainLoop.Stop( );
                return;
            }

            if (_pluginManager == null)
            {
                _pluginMainLoop.Stop( );
                return;
            }

            if (!_pluginManager.Initialized && !_pluginManager.Loaded)
            {
                if (MySandboxGameWrapper.IsGameStarted)
                {
                    if (CommandLineArgs.WorldRequestReplace)
                    {
                        ServerNetworkManager.Instance.ReplaceWorldJoin( );
                    }

                    if (CommandLineArgs.WorldDataModify)
                    {
                        ServerNetworkManager.Instance.ReplaceWorldData( );
                    }

                    if (CommandLineArgs.WorldVoxelModify)
                    {
                        ServerNetworkManager.WorldVoxelModify = true;
                    }

                    //SandboxGameAssemblyWrapper.InitAPIGateway();
                    _pluginManager.LoadPlugins( );
                    _pluginManager.Init( );

                    //SandboxGameAssemblyWrapper.Instance.GameAction( ( ) => AppDomain.CurrentDomain.ClearEventInvocations( "_unhandledException" ) );

                    AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                    //AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                    Application.ThreadException += Application_ThreadException;
                    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                }
            }
            else
            {
                //Force a refresh of the chat messages before running the plugin update
                List <string> messages = ChatManager.Instance.ChatMessages;

                //Run the plugin update
                _pluginManager.Update( );
            }
        }