Exemple #1
0
        public static TerrariaWrapper Initialize()
        {
            Thread.CurrentThread.Name = "Main Thread";

            // Program.LaunchParameters = Utils.ParseArguements(args);
            //ThreadPool.SetMinThreads(8, 8);
            LanguageManager.Instance.SetLanguage(GameCulture.DefaultCulture);
            //Program.InitializeConsoleOutput();
            //Program.SetupLogging();
            //Platform.Get<IWindowService>().SetQuickEditEnabled(false);
            var main = new TerrariaWrapper();

            try
            {
                Lang.InitializeLegacyLocalization();
                SocialAPI.Initialize(null);
                LaunchInitializer.LoadParameters(main);
                Task.Factory.StartNew(() => main.DedServ());
                //main.Run();
                return(main);
            }
            catch (Exception exception)
            {
            }
            return(null);
        }
Exemple #2
0
        public static TerrariaWrapper Initialize()
        {
            Thread.CurrentThread.Name = "Main Thread";

            var terrariaAsm = typeof(Terraria.Program).Assembly;

            //var init = typeof(Terraria.Program).GetMethod("ForceLoadAssembly", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static, null, new Type[] { typeof(Assembly), typeof(bool) }, null);
            //init.Invoke((object)null, new object[] { terrariaAsm, true });
            // Program.LaunchParameters = Utils.ParseArguements(args);
            //ThreadPool.SetMinThreads(8, 8);
            LanguageManager.Instance.SetLanguage(GameCulture.DefaultCulture);
            //Program.InitializeConsoleOutput();
            //Program.SetupLogging();
            //Platform.Get<IWindowService>().SetQuickEditEnabled(false);
            var main = new TerrariaWrapper();

            try
            {
                Lang.InitializeLegacyLocalization();
                SocialAPI.Initialize(null);
                LaunchInitializer.LoadParameters(main);
                main.InitBase();
                //Task.Factory.StartNew(() => main.DedServ());
                //Thread.Sleep(10000);
                //main.Run();
                return(main);
            }
            catch (Exception exception)
            {
            }
            return(null);
        }