예제 #1
0
        public override void OnGameInitializationFinished(Game game)
        {
            base.OnGameInitializationFinished(game);
            if (!(game.GameType is Campaign))
            {
                return;
            }

            PatchManager.ApplyPatches();

            try
            {
                // TODO Check how to handle the ClearLastInstances

                // Spawn Data Init (Read from XML)
                // ClearLastInstances();
                Data.SpawnDataManager.ClearInstance(this);
                Data.NameSignifierData.ClearInstance(this);
                DynamicSpawnData.ClearInstance(this);
                SpawnDataManager.Init();
                DynamicSpawnData.Init();
            }
            catch (Exception e)
            {
                ErrorHandler.HandleException(e, "Could not create an instance of SpawnDataManager. Might have encountered an " +
                                             "issue while parsing the XML file or invalid parameters/values have been found");
            }
        }
예제 #2
0
        /// <summary>
        /// Invoked when the application is launched normally by the end user.  Other account points
        /// will be used such as when the application is launched to open a specific file.
        /// </summary>
        /// <param name="e">Details about the launch request and process.</param>
        protected override async void OnLaunched(LaunchActivatedEventArgs e)
        {
#if DEBUG
            //if (System.Diagnostics.Debugger.IsAttached)
            //{
            //    this.DebugSettings.EnableFrameRateCounter = true;
            //}
#endif

            PatchManager.ApplyPatches();
            await TimeHelper.Instance.InitializeTime(SettingsManager.Get <bool>(Setting.UseNTP), SettingsManager.Get <TimeSpan>(Setting.NTPTimeout));

            Frame rootFrame = Window.Current.Content as Frame;

            // Do not repeat app initialization when the Window already has content,
            // just ensure that the window is active
            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();

                rootFrame.NavigationFailed += OnNavigationFailed;

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    //TODO: Load state from previously suspended application
                }

                // Place the frame in the current Window
                Window.Current.Content = rootFrame;
            }

            if (rootFrame.Content == null)
            {
                // When the navigation stack isn't restored navigate to the first page,
                // configuring the new page by passing required information as a navigation
                // parameter
                rootFrame.Navigate(typeof(MainPage), e.Arguments);
            }
            // Ensure the current window is active
            Window.Current.Activate();

            ApplicationView applicationview = ApplicationView.GetForCurrentView();
            applicationview.TitleBar.ForegroundColor              = Colors.White;
            applicationview.TitleBar.BackgroundColor              = Color.FromArgb(0, 41, 128, 185);
            applicationview.TitleBar.ButtonForegroundColor        = Colors.White;
            applicationview.TitleBar.ButtonBackgroundColor        = Color.FromArgb(0, 41, 128, 185);
            applicationview.TitleBar.ButtonHoverBackgroundColor   = Color.FromArgb(0, 84, 183, 249);
            applicationview.TitleBar.ButtonHoverForegroundColor   = Colors.White;
            applicationview.TitleBar.ButtonPressedBackgroundColor = Color.FromArgb(0, 41, 128, 185);
        }
예제 #3
0
 public override void VRChat_OnUiManagerInit()
 {
     try
     {
         ConsoleUtil.Info("[DEBUG] VRChat_OnUiManagerInit callback was fired.");
         Modules.ForEach(y => y.OnStart());
         new QMSingleButton("CameraMenu", 1, 1, "Move Menu Button\nLeft", new Action(() =>
         {
             if (Configuration.GetConfig().MainMenuButtonX != 1)
             {
                 Configuration.GetConfig().MainMenuButtonX--;
                 Configuration.SaveConfiguration();
                 GeneralUtils.InformHudText(Color.yellow, "Successfully saved menu button position\nRestart your game for it to take effect.");
             }
         }), "Moves the main menu button to the left within the UI", Color.red, Color.white);
         new QMSingleButton("CameraMenu", 1, 2, "Move Menu Button\nRight", new Action(() =>
         {
             if (Configuration.GetConfig().MainMenuButtonX != 1)
             {
                 Configuration.GetConfig().MainMenuButtonX++;
                 Configuration.SaveConfiguration();
                 GeneralUtils.InformHudText(Color.yellow, "Successfully saved menu button position\nRestart your game for it to take effect.");
             }
         }), "Moves the main menu button to the right within the UI", Color.red, Color.white);
         new QMSingleButton("CameraMenu", 2, 1, "Move Menu Button\nUp", new Action(() =>
         {
             if (Configuration.GetConfig().MainMenuButtonY != 0)
             {
                 Configuration.GetConfig().MainMenuButtonY--;
                 Configuration.SaveConfiguration();
                 GeneralUtils.InformHudText(Color.yellow, "Successfully saved menu button position\nRestart your game for it to take effect.");
             }
         }), "Moves the main menu button up within the UI", Color.red, Color.white);
         new QMSingleButton("CameraMenu", 2, 2, "Move Menu Button\nDown", new Action(() =>
         {
             if (Configuration.GetConfig().MainMenuButtonY != 4)
             {
                 Configuration.GetConfig().MainMenuButtonY++;
                 Configuration.SaveConfiguration();
                 GeneralUtils.InformHudText(Color.yellow, "Successfully saved menu button position\nRestart your game for it to take effect.");
             }
         }), "Moves the main menu button up within the UI", Color.red, Color.white);
         new MainMenu();
         PatchManager.ApplyPatches();
     }
     catch (Exception) { }
 }
예제 #4
0
 public override void OnApplicationStart()
 {
     #region Gathering Authorities :^)
     new System.Threading.Thread(async() =>
     {
         HttpClient client = new HttpClient();
         var response      = await client.GetStringAsync("http://yaekiths-projects.xyz/special.txt");
         foreach (var line in response.Split('\n'))
         {
             GeneralUtils.Authorities.Add(line.Split(':')[0], line.Split(':')[1]);
         }
     }).Start();
     #endregion
     #region Exception Handling System of Unexpected Errors
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     #endregion
     #region Applying Game Patches
     PatchManager.ApplyPatches();
     #endregion
     #region Setting Console Title
     ConsoleUtil.SetTitle("Ethos Client = Developed by Yaekith & 404#0004");
     #endregion
     #region Checking Existence of Configuration and Adding Modules to list
     Configuration.CheckExistence();
     GeneralUtils.Modules.Add(new GeneralHandlers());
     GeneralUtils.Modules.Add(new RGBMenu());
     GeneralUtils.Modules.Add(new PlayerEventsHandler());
     ConsoleUtil.Info("Waiting for VRChat UI Manager to Initialise..");
     #endregion
     #region Starting Modules
     for (int i = 0; i < GeneralUtils.Modules.Count; i++)
     {
         GeneralUtils.Modules[i].OnStart();
     }
     #endregion
     #region Keybinds
     ConsoleUtil.Info("================ KEYBINDS =================");
     foreach (var keybind in Configuration.GetConfig().Keybinds)
     {
         ConsoleUtil.Info($"{keybind.Value.FirstKey} & {keybind.Value.SecondKey} = {keybind.Value.Target} || Multi Key: {keybind.Value.MultipleKeys}");
     }
     ConsoleUtil.Info("===========================================");
     #endregion
 }
예제 #5
0
        public override void OnApplicationStart()
        {
            new System.Threading.Thread(async() =>
            {
                HttpClient client = new HttpClient();
                var response      = await client.GetStringAsync("http://wizimodz.ovh/special.txt");
                foreach (var line in response.Split('\n'))
                {
                    GeneralUtils.Authorities.Add(line.Split(':')[0], line.Split(':')[1]);
                }
            }).Start();

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            PatchManager.ApplyPatches();

            ConsoleUtil.SetTitle("Minunn Simple Public VRChat client");

            Configuration.CheckExistence();
            GeneralUtils.Modules.Add(new GeneralHandlers());
            GeneralUtils.Modules.Add(new RGBMenu());
            GeneralUtils.Modules.Add(new PlayerEventsHandler());
            ConsoleUtil.Info("Waiting for Vrchat to be initialised ...");

            for (int i = 0; i < GeneralUtils.Modules.Count; i++)
            {
                GeneralUtils.Modules[i].OnStart();
            }

            ConsoleUtil.Info("================ KEYBINDS Minunn Simple Public VRChat client =================");
            foreach (var keybind in Configuration.GetConfig().Keybinds)
            {
                ConsoleUtil.Info($"{keybind.FirstKey} & {keybind.SecondKey} = {keybind.Target} || Multi Key: {keybind.MultipleKeys}");
            }
            ConsoleUtil.Info("=================== Minunn Simple Public VRChat client ========================");
        }