Exemple #1
0
 private void InitConfig()
 {
     try
     {
         SkConfigEntry.CAllowChatCommandInput = base.Config.Bind("General", "AllowChatCommandInput", defaultValue: true, "Toggle this if you want to allow or disable the entry of commands in the chat. If this is disabled, you can only input commands into the console.");
         SkConfigEntry.CAllowPublicChatOutput = base.Config.Bind("General", "AllowPublicResponse", defaultValue: true, "Toggle this to allow the mod to respond publicly with certain commands, when entered into chat.\nThe /portal command for example, if used in chat and this is true, others nearby will be able to see the response.\nNOTE: If you see a response from your name, it is shown publicly and everyone can see it. If it is a response from (SkToolbox), only you see it.");
         SkConfigEntry.CAllowExecuteOnClear   = base.Config.Bind("General", "AllowExecuteOnClear", defaultValue: false, "Toggle this to enable the ability to execute commands by clearing the input (by hitting escape, or selecting all and removing).");
         SkConfigEntry.COpenConsoleWithSlash  = base.Config.Bind("General", "OpenConsoleWithSlash", defaultValue: false, "Toggle this to enable the ability to open the console with the slash (/) button.\nThis option takes precedence over OpenChatWithSlash if both are true.");
         SkConfigEntry.COpenChatWithSlash     = base.Config.Bind("General", "OpenChatWithSlash", defaultValue: false, "Toggle this to enable the ability to open chat with the slash (/) button.");
         SkConfigEntry.CAutoRun                 = base.Config.Bind("AutoRun", "AutoRunEnabled", defaultValue: false, "Toggle this to run commands automatically upon spawn into server.\nNote this will only occur once per game launch to prevent unintended command executions.");
         SkConfigEntry.CAutoRunCommand          = base.Config.Bind("AutoRun", "AutoRunCommand", "/nosup; /god", "Enter the commands to run upon spawn here. Seperate commands with a semicolon (;).");
         SkConfigEntry.OAltToggle               = base.Config.Bind("OnScreenMenu", "AltKeyToggle", "Home", "If /alt has been used (in-game or via auto run), the on screen menu will use this bind for toggling the menu.\nValid key codes are found here: https://docs.unity3d.com/ScriptReference/KeyCode.html");
         SkConfigEntry.OAltUp                   = base.Config.Bind("OnScreenMenu", "AltKeyUp", "PageUp", "If /alt has been used (in-game or via auto run), the on screen menu will use this bind for changing the on-screen menu selection upwards.");
         SkConfigEntry.OAltDown                 = base.Config.Bind("OnScreenMenu", "AltKeyDown", "PageDown", "If /alt has been used (in-game or via auto run), the on screen menu will use this bind for changing the on-screen menu selection downwards.");
         SkConfigEntry.OAltChoose               = base.Config.Bind("OnScreenMenu", "AltKeyChoose", "Insert", "If /alt has been used (in-game or via auto run), the on screen menu will use this bind for choosing the selected on-screen menu option.");
         SkConfigEntry.OAltBack                 = base.Config.Bind("OnScreenMenu", "AltKeyBack", "Delete", "If /alt has been used (in-game or via auto run), the on screen menu will use this bind for going back in the on-screen menu.");
         SkConfigEntry.CAllowLookCustomizations = base.Config.Bind("CustomizeConsoleLook", "ConsoleAllowLookCustomizations", defaultValue: true, "Toggle this to enable or disable the customization settings below.");
         SkConfigEntry.CConsoleFont             = base.Config.Bind("CustomizeConsoleLook", "ConsoleFont", "Consolas", "Set the font size of the text in the console. Game default = AveriaSansLibre-Bold");
         SkConfigEntry.CConsoleFontSize         = base.Config.Bind("CustomizeConsoleLook", "ConsoleFontSize", 18, "Set the font size of the text in the console. Game default = 18");
         SkConfigEntry.CConsoleOutputTextColor  = base.Config.Bind("CustomizeConsoleLook", "ConsoleOutputTextColor", "#E6F7FFFF", "Set the color of the output text shown in the console. Game default = #FFFFFFFF. Color format is #RRGGBBAA");
         SkConfigEntry.CConsoleInputTextColor   = base.Config.Bind("CustomizeConsoleLook", "ConsoleInputTextColor", "#E6F7FFFF", "Set the color of the input text shown in the console. Game default = #FFFFFFFF. Color format is #RRGGBBAA");
         SkConfigEntry.CConsoleSelectionColor   = base.Config.Bind("CustomizeConsoleLook", "ConsoleSelectionColor", "#A8CEFFC0", "Set the color of the selection highlight in the console. Game default = #A8CEFFC0. Color format is #RRGGBBAA");
         SkConfigEntry.CConsoleCaretColor       = base.Config.Bind("CustomizeConsoleLook", "ConsoleCaretColor", "#DCE6F5FF", "Set the color of the input text caret shown in the console. Game default = #FFFFFFFF. Color format is #RRGGBBAA");
     }
     catch (Exception ex)
     {
         SkUtilities.Logz(new string[1] {
             "ERR"
         }, new string[3] {
             "Could not load config. Please confirm there is a working version of BepInEx installed.", ex.Message, ex.Source
         }, LogType.Error);
     }
 }
Exemple #2
0
        public static void Init()
        {
            _SkGameObject = new GameObject("SkToolbox");
            if (InitLogging)
            {
                InitLogging = false;
            }
            if (FirstLoad)
            {
                SkUtilities.Logz(new string[2] {
                    "LOADER", "STARTUP"
                }, new string[1] {
                    "SUCCESS!"
                });
            }
            CheckForUnknownInstance();
            Load.transform.parent = null;
            Transform parent = Load.transform.parent;

            if (parent != null && parent.gameObject != Load)
            {
                parent.parent = Load.transform;
            }
            _SkGameObject.AddComponent <SkMenuController>();
            Object.DontDestroyOnLoad(_SkGameObject);
            FirstLoad = false;
        }
Exemple #3
0
 public void RequestSubMenu(List <SkMenuItem> subMenuOptions, float refreshTime = 0f, int subWidth = 0)
 {
     if (subMenuOptions != null && subMenuOptions.Count != 0)
     {
         subMenuCurrentPage           = 1;
         sWidth                       = subWidth;
         SubMenuOpen                  = true;
         subMenuProcessInitialOptSize = true;
         SubMenuOptions               = subMenuOptions;
         subMaxSelectionOption        = subMenuOptions.Count;
         if (SubMenuSelection > subMenuOptions.Count)
         {
             SubMenuSelection = 1;
         }
         if (refreshTime > 0f)
         {
             refreshTime = Mathf.Clamp(refreshTime, 0.01f, 5f);
             StartCoroutine(RealTimeMenuUpdate(refreshTime));
         }
         else if (logResponse)
         {
             SkUtilities.Logz(new string[2] {
                 "CONTROLLER", "RESP"
             }, new string[1] {
                 "Submenu created."
             });
         }
     }
 }
Exemple #4
0
 public void ReloadMenu()
 {
     SkUtilities.Logz(new string[3] {
         "BASE", "CMD", "REQ"
     }, new string[2] {
         "UNLOADING CONTROLLERS AND MODULES...", "SKTOOLBOX RELOAD REQUESTED."
     });
     SkLoader.Reload();
 }
Exemple #5
0
 public void OpenLogFolder()
 {
     SkUtilities.Logz(new string[2] {
         "CMD", "REQ"
     }, new string[1] {
         "Opening Log Directory"
     });
     Application.OpenURL(Application.persistentDataPath);
 }
Exemple #6
0
 private void Start()
 {
     SkMenuControllerStatus = SkUtilities.Status.Loading;
     SkUtilities.Logz(new string[2] {
         "CONTROLLER", "NOTIFY"
     }, new string[2] {
         "LOADING...", "WAITING FOR TOOLBOX."
     });
     SkModuleController = base.gameObject.AddComponent <SkModuleController>();
 }
Exemple #7
0
 public void LoadConsoleCustomizations()
 {
     if (SkConfigEntry.CAllowLookCustomizations == null || !SkConfigEntry.CAllowLookCustomizations.Value)
     {
         return;
     }
     try
     {
         int    num      = Console.instance.m_output.fontSize;
         string fontname = "Consolas";
         Color  color    = Console.instance.m_output.color;
         Color  color2   = Console.instance.m_input.textComponent.color;
         Color  color3   = Console.instance.m_input.selectionColor;
         Color  color4   = Color.white;
         try
         {
             num      = SkConfigEntry.CConsoleFontSize.Value;
             fontname = SkConfigEntry.CConsoleFont.Value;
             ColorUtility.TryParseHtmlString(SkConfigEntry.CConsoleOutputTextColor.Value, out color);
             ColorUtility.TryParseHtmlString(SkConfigEntry.CConsoleInputTextColor.Value, out color2);
             ColorUtility.TryParseHtmlString(SkConfigEntry.CConsoleSelectionColor.Value, out color3);
             ColorUtility.TryParseHtmlString(SkConfigEntry.CConsoleCaretColor.Value, out color4);
         }
         catch (Exception ex)
         {
             SkUtilities.Logz(new string[1] {
                 "ERR"
             }, new string[2] {
                 "Failed to load something from the config.", ex.Message
             }, LogType.Warning);
         }
         Font font = Font.CreateDynamicFontFromOSFont(fontname, num);
         Console.instance.m_output.font               = font;
         Console.instance.m_output.fontSize           = num;
         Console.instance.m_output.color              = color;
         Console.instance.m_input.textComponent.color = color2;
         Console.instance.m_input.textComponent.font  = font;
         Console.instance.m_input.selectionColor      = color3;
         Console.instance.m_input.caretColor          = color4;
         Console.instance.m_input.customCaretColor    = true;
     }
     catch (Exception ex2)
     {
         SkUtilities.Logz(new string[1] {
             "ERR"
         }, new string[2] {
             "Failed to set when customizing console style.", ex2.Message
         }, LogType.Warning);
     }
 }
Exemple #8
0
 private void RunMethod(Action <string> methodName, string methodParameter = "")
 {
     try
     {
         methodName?.Invoke(methodParameter);
     }
     catch (Exception ex)
     {
         SkUtilities.Logz(new string[2] {
             "CONTROLLER", "ERROR"
         }, new string[1] {
             "Error running method. Likely not found... " + ex.Message
         }, LogType.Error);
     }
 }
Exemple #9
0
 private void ProcessContextMenu(int windowID)
 {
     try
     {
         ProcessMenuTip();
     }
     catch (Exception ex)
     {
         SkUtilities.Logz(new string[2] {
             "CONTROLLER", "ERROR"
         }, new string[1] {
             ex.Message
         });
     }
 }
Exemple #10
0
 public static void CheckForUnknownInstance()
 {
     foreach (GameObject item in from obj in Resources.FindObjectsOfTypeAll <GameObject>()
              where obj.name == "SkToolbox"
              select obj)
     {
         if (item != _SkGameObject)
         {
             Object.Destroy(item);
             SkUtilities.Logz(new string[2] {
                 "LOADER", "DETECT"
             }, new string[1] {
                 "Other SkToolbox Destroyed."
             });
         }
     }
 }
 public void Start()
 {
     SkMainStatus = SkUtilities.Status.Loading;
     SkUtilities.Logz(new string[2] {
         "TOOLBOX", "NOTIFY"
     }, new string[2] {
         "LOADING...", "MODULES LOADING..."
     });
     BeginMainMenu();
     menuController = GetComponent <SkMenuController>();
     if (MenuOptions.Count > 0 && menuController != null)
     {
         SkMainStatus = SkUtilities.Status.Loading;
     }
     else
     {
         SkMainStatus = SkUtilities.Status.Error;
     }
     Init();
 }
Exemple #12
0
 private void ProcessWelcome(int windowID)
 {
     try
     {
         GUILayout.BeginVertical();
         GUILayout.Label(welcomeMsg);
         if (!welcomeMotd.Equals(""))
         {
             GUILayout.Label(welcomeMotd);
         }
         GUILayout.EndVertical();
     }
     catch (Exception ex)
     {
         SkUtilities.Logz(new string[2] {
             "CONTROLLER", "ERROR"
         }, new string[1] {
             ex.Message
         });
     }
 }
 public static void InitPatch()
 {
     if (InitComplete)
     {
         return;
     }
     try
     {
         harmony = Harmony.CreateAndPatchAll(typeof(SkCommandPatcher).Assembly);
     }
     catch (Exception ex)
     {
         SkCommandProcessor.PrintOut("Something failed, there is a strong possibility another mod blocked this operation.", SkCommandProcessor.LogTo.Console);
         SkUtilities.Logz(new string[2] {
             "SkCommandPatcher", "PATCH"
         }, new string[3] {
             "PATCH => FAILED. CHECK FOR OTHER MODS BLOCKING PATCHES.\n", ex.Message, ex.StackTrace
         }, LogType.Error);
     }
     finally
     {
         InitComplete = true;
     }
 }
 public void Update()
 {
     if (!FirstLoad)
     {
         if (SkMainStatus == SkUtilities.Status.Loading && NeedLoadModules && !NeedRetry)
         {
             foreach (SkBaseModule menuOption in MenuOptions)
             {
                 SkUtilities.Logz(new string[3] {
                     "TOOLBOX", "MODULE", "NOTIFY"
                 }, new string[2]
                 {
                     "NAME: " + menuOption.ModuleName.ToUpper(),
                     "STATUS: " + menuOption.ModuleStatus.ToString().ToUpper()
                 });
                 if (menuOption.ModuleStatus != SkUtilities.Status.Ready)
                 {
                     NeedRetry = true;
                     RetryModule.Add(menuOption);
                 }
             }
             if (!NeedRetry)
             {
                 SkMainStatus = SkUtilities.Status.Ready;
                 ErrorMonitor = true;
                 RetryCount   = 1;
             }
             if (SkMainStatus == SkUtilities.Status.Ready && MenuOptions.Count > 0)
             {
                 NeedLoadModules = false;
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[2]
                 {
                     MenuOptions.Count + " MODULES LOADED",
                     "TOOLBOX READY."
                 });
             }
             else if (SkMainStatus == SkUtilities.Status.Error || MenuOptions.Count <= 0)
             {
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[2]
                 {
                     MenuOptions.Count + " MODULES LOADED",
                     "TOOLBOX FAILED TO LOAD MODULES."
                 }, LogType.Error);
             }
         }
         else if (SkMainStatus == SkUtilities.Status.Loading && NeedRetry)
         {
             if (RetryCount < RetryCountMax + 1)
             {
                 for (int i = 0; i < RetryModule?.Count; i++)
                 {
                     SkUtilities.Logz(new string[4]
                     {
                         "TOOLBOX",
                         "MODULE",
                         "NOTIFY",
                         "RECHECK " + RetryCount
                     }, new string[2]
                     {
                         "NAME: " + RetryModule[i].ModuleName.ToUpper(),
                         "STATUS: " + RetryModule[i].ModuleStatus.ToString().ToUpper()
                     });
                     if (RetryModule[i].ModuleStatus != SkUtilities.Status.Ready)
                     {
                         SkMainStatus = SkUtilities.Status.Loading;
                         NeedRetry    = true;
                     }
                     else if (RetryModule[i].ModuleStatus == SkUtilities.Status.Ready)
                     {
                         RetryModule.Remove(RetryModule[i]);
                         if (RetryModule.Count == 0)
                         {
                             SkMainStatus = SkUtilities.Status.Ready;
                             break;
                         }
                     }
                 }
                 RetryCount++;
             }
             if (MenuOptions.Count <= 0)
             {
                 SkMainStatus = SkUtilities.Status.Error;
             }
             if (SkMainStatus == SkUtilities.Status.Ready)
             {
                 ErrorMonitor = true;
                 RetryCount   = 1;
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[2]
                 {
                     MenuOptions.Count + " MODULES LOADED",
                     "TOOLBOX READY."
                 });
             }
             else if (RetryCount >= RetryCountMax + 1)
             {
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[2] {
                     "MODULE NOT MOVING TO READY STATUS.", "UNLOADING THE MODULE(S)."
                 }, LogType.Warning);
                 foreach (SkBaseModule item in RetryModule)
                 {
                     if (item.ModuleStatus != SkUtilities.Status.Ready)
                     {
                         item.RemoveModule();
                         MenuOptions.Remove(item);
                     }
                 }
                 RetryModule.Clear();
                 NeedRetry    = false;
                 SkMainStatus = SkUtilities.Status.Loading;
                 menuController.UpdateMenuOptions(MenuOptions);
             }
         }
     }
     else
     {
         FirstLoad = false;
     }
     if (ErrorMonitor)
     {
         for (int j = 0; j < MenuOptions?.Count; j++)
         {
             SkBaseModule skBaseModule = MenuOptions[j];
             if ((object)skBaseModule != null && skBaseModule.ModuleStatus == SkUtilities.Status.Error && !RetryModule.Contains(MenuOptions[j]))
             {
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[2]
                 {
                     "MODULE IN ERROR STATUS.",
                     "CHECKING MODULE: " + MenuOptions[j].ModuleName.ToUpper()
                 }, LogType.Warning);
                 RetryModule.Add(MenuOptions[j]);
                 continue;
             }
             SkBaseModule skBaseModule2 = MenuOptions[j];
             if ((object)skBaseModule2 != null && skBaseModule2.ModuleStatus == SkUtilities.Status.Unload)
             {
                 SkUtilities.Logz(new string[2] {
                     "TOOLBOX", "NOTIFY"
                 }, new string[1] {
                     "MODULE READY TO UNLOAD. UNLOADING MODULE: " + MenuOptions[j].ModuleName.ToUpper()
                 }, LogType.Warning);
                 MenuOptions[j].RemoveModule();
                 MenuOptions.Remove(MenuOptions[j]);
                 menuController.UpdateMenuOptions(MenuOptions);
             }
         }
         List <SkBaseModule> retryModule = RetryModule;
         if (retryModule != null && retryModule.Count > 0 && RetryCount < RetryCountMax + 1)
         {
             for (int k = 0; k < RetryModule.Count; k++)
             {
                 if (RetryModule[k].ModuleStatus == SkUtilities.Status.Ready)
                 {
                     RetryModule.Remove(RetryModule[k]);
                     SkUtilities.Logz(new string[2] {
                         "TOOLBOX", "NOTIFY"
                     }, new string[2]
                     {
                         "MODULE READY.",
                         "MODULE: " + MenuOptions[k].ModuleName.ToUpper()
                     });
                     if (RetryModule.Count == 0)
                     {
                         break;
                     }
                 }
             }
             RetryCount++;
         }
         else
         {
             List <SkBaseModule> retryModule2 = RetryModule;
             if (retryModule2 != null && retryModule2.Count > 0 && RetryCount >= RetryCountMax + 1)
             {
                 foreach (SkBaseModule item2 in RetryModule)
                 {
                     if (item2.ModuleStatus != SkUtilities.Status.Ready)
                     {
                         SkUtilities.Logz(new string[2] {
                             "TOOLBOX", "NOTIFY"
                         }, new string[2]
                         {
                             "COULD NOT RESOLVE ERROR.",
                             "UNLOADING THE MODULE: " + item2.ModuleName.ToUpper()
                         }, LogType.Warning);
                         item2.RemoveModule();
                         MenuOptions.Remove(item2);
                     }
                 }
                 RetryModule.Clear();
                 RetryCount = 1;
                 menuController.UpdateMenuOptions(MenuOptions);
                 if (MenuOptions.Count == 0)
                 {
                     SkMainStatus = SkUtilities.Status.Error;
                     SkUtilities.Logz(new string[2] {
                         "TOOLBOX", "NOTIFY"
                     }, new string[2] {
                         "NO MODULES LOADED.", "TOOLBOX ENTERING ERROR STATE."
                     }, LogType.Error);
                 }
             }
         }
     }
     OnUpdate();
 }
Exemple #15
0
 private void Update()
 {
     HandleConsole();
     if ((SkConfigEntry.CAllowChatCommandInput != null && SkConfigEntry.CAllowChatCommandInput.Value) || SkConfigEntry.CAllowChatCommandInput == null)
     {
         HandleChat();
     }
     if (!anncounced1)
     {
         if (Console.instance != null && Player.m_localPlayer == null)
         {
             SkCommandProcessor.Announce();
             LoadConsoleCustomizations();
             anncounced1 = true;
         }
     }
     else if (Player.m_localPlayer != null)
     {
         anncounced1 = false;
     }
     if (!anncounced2)
     {
         if (Chat.instance != null)
         {
             SkCommandProcessor.Announce();
             LoadConsoleCustomizations();
             anncounced2 = true;
         }
     }
     else if (Chat.instance == null)
     {
         anncounced2 = false;
     }
     if (!SkConfigEntry.CAutoRunComplete)
     {
         if (SkConfigEntry.CAutoRun != null && SkConfigEntry.CAutoRun.Value)
         {
             if (Player.m_localPlayer != null && Chat.instance != null && Console.instance != null)
             {
                 try
                 {
                     SkUtilities.Logz(new string[2] {
                         "CMD", "AUTORUN"
                     }, new string[1] {
                         "Command List:" + SkConfigEntry.CAutoRunCommand.Value
                     });
                     SkCommandProcessor.PrintOut("==> AutoRun enabled! Command line: " + SkConfigEntry.CAutoRunCommand.Value, SkCommandProcessor.LogTo.Console);
                     SkCommandProcessor.ProcessCommands(SkConfigEntry.CAutoRunCommand.Value, SkCommandProcessor.LogTo.Console);
                 }
                 catch (Exception)
                 {
                     SkUtilities.Logz(new string[1] {
                         "Console"
                     }, new string[1] {
                         "AutoRun Failed. Something went wrong. Command line: " + SkConfigEntry.CAutoRunCommand.Value
                     }, LogType.Warning);
                     SkCommandProcessor.PrintOut("==> AutoRun Failed. Something went wrong. Command line: " + SkConfigEntry.CAutoRunCommand.Value, SkCommandProcessor.LogTo.Console);
                 }
                 finally
                 {
                     SkConfigEntry.CAutoRunComplete = true;
                 }
             }
         }
         else
         {
             SkConfigEntry.CAutoRunComplete = true;
         }
     }
     if (SkCommandProcessor.bTeleport && Input.GetKeyDown(KeyCode.BackQuote) && Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out var hitInfo))
     {
         Vector3 point = hitInfo.point;
         Player.m_localPlayer.transform.position = point;
         Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "Warp!");
     }
     if (!SkCommandProcessor.bDetectEnemies)
     {
         return;
     }
     try
     {
         List <Character> allCharacters = Character.GetAllCharacters();
         if (allCharacters.Count > 0)
         {
             foreach (Character item in allCharacters)
             {
                 if (item != null && !item.IsDead() && !item.IsPlayer())
                 {
                     if (Vector3.Distance(item.transform.position, Player.m_localPlayer.transform.position) < (float)SkCommandProcessor.bDetectRange)
                     {
                         if (!nearbyCharacters.Contains(item))
                         {
                             nearbyCharacters.Add(item);
                         }
                     }
                     else if (nearbyCharacters.Contains(item))
                     {
                         nearbyCharacters.Remove(item);
                     }
                 }
                 else if (nearbyCharacters.Contains(item))
                 {
                     nearbyCharacters.Remove(item);
                 }
             }
             if (nearbyCharacters.Count > 0)
             {
                 foreach (Character item2 in new List <Character>(nearbyCharacters))
                 {
                     if (!allCharacters.Contains(item2))
                     {
                         nearbyCharacters.Remove(item2);
                     }
                 }
             }
         }
         if (nearbyCharacters.Count > 0 && SkCommandProcessor.btDetectEnemiesSwitch)
         {
             Player.m_localPlayer.Message(MessageHud.MessageType.Center, "Enemy nearby!");
             SkCommandProcessor.btDetectEnemiesSwitch = false;
         }
         else if (nearbyCharacters.Count == 0)
         {
             SkCommandProcessor.btDetectEnemiesSwitch = true;
         }
     }
     catch (Exception)
     {
     }
 }
Exemple #16
0
 private void Update()
 {
     if (SkCommandProcessor.altOnScreenControls)
     {
         if (SkConfigEntry.OAltToggle != null && SkConfigEntry.OAltUp != null && SkConfigEntry.OAltDown != null && SkConfigEntry.OAltChoose != null && SkConfigEntry.OAltBack != null)
         {
             contextTipInfo1          = SkConfigEntry.OAltToggle.Value + "/" + SkConfigEntry.OAltUp.Value + "/" + SkConfigEntry.OAltDown.Value;
             contextTipInfo2          = SkConfigEntry.OAltChoose.Value + " Button";
             contextTipInfo3          = SkConfigEntry.OAltBack.Value + " Button";
             keyBindings["selToggle"] = (KeyCode)Enum.Parse(typeof(KeyCode), SkConfigEntry.OAltToggle.Value);
             keyBindings["selUp"]     = (KeyCode)Enum.Parse(typeof(KeyCode), SkConfigEntry.OAltUp.Value);
             keyBindings["selDown"]   = (KeyCode)Enum.Parse(typeof(KeyCode), SkConfigEntry.OAltDown.Value);
             keyBindings["selChoose"] = (KeyCode)Enum.Parse(typeof(KeyCode), SkConfigEntry.OAltChoose.Value);
             keyBindings["selBack"]   = (KeyCode)Enum.Parse(typeof(KeyCode), SkConfigEntry.OAltBack.Value);
         }
         else
         {
             contextTipInfo1          = "Home/PgUp/PgDn";
             contextTipInfo2          = "Insert Button";
             contextTipInfo3          = "Delete Button";
             keyBindings["selToggle"] = KeyCode.Home;
             keyBindings["selUp"]     = KeyCode.PageUp;
             keyBindings["selDown"]   = KeyCode.PageDown;
             keyBindings["selChoose"] = KeyCode.Insert;
             keyBindings["selBack"]   = KeyCode.Delete;
         }
     }
     else
     {
         contextTipInfo1          = "NumPad Arrows";
         contextTipInfo2          = "NumPad 5 to Select";
         contextTipInfo3          = "NumPad . to Back";
         keyBindings["selToggle"] = KeyCode.Keypad0;
         keyBindings["selUp"]     = KeyCode.Keypad8;
         keyBindings["selDown"]   = KeyCode.Keypad2;
         keyBindings["selChoose"] = KeyCode.Keypad5;
         keyBindings["selBack"]   = KeyCode.KeypadPeriod;
     }
     if (InitialCheck)
     {
         List <SkBaseModule> menuOptions = MenuOptions;
         if (menuOptions != null && menuOptions.Count == 0)
         {
             UpdateMenuOptions(SkModuleController.GetOptions());
         }
         else
         {
             SkMenuControllerStatus = SkUtilities.Status.Ready;
             if (SkMenuControllerStatus == SkUtilities.Status.Ready && SkModuleController.SkMainStatus == SkUtilities.Status.Ready)
             {
                 InitialCheck = false;
                 SkUtilities.Logz(new string[2] {
                     "CONTROLLER", "NOTIFY"
                 }, new string[1] {
                     "READY."
                 });
             }
         }
     }
     if (Input.GetKeyDown(keyBindings["selToggle"]) && !Console.IsVisible() && !Chat.instance.m_input.isFocused)
     {
         firstRun = false;
         MenuOpen = !MenuOpen;
     }
     if (!MenuOpen)
     {
         return;
     }
     if (!SubMenuOpen)
     {
         if (Input.GetKeyDown(keyBindings["selDown"]))
         {
             SubMenuSelection = 1;
             if (MenuSelection != maxSelectionOption)
             {
                 MenuSelection++;
             }
             else
             {
                 MenuSelection = 1;
             }
         }
         if (Input.GetKeyDown(keyBindings["selUp"]))
         {
             SubMenuSelection = 1;
             if (MenuSelection != 1)
             {
                 MenuSelection--;
             }
             else
             {
                 MenuSelection = maxSelectionOption;
             }
         }
         if (Input.GetKeyDown(keyBindings["selChoose"]))
         {
             try
             {
                 RunMethod(MenuOptions[MenuSelection - 1].CallerEntry.ItemClass);
             }
             catch (Exception ex)
             {
                 SkUtilities.Logz(new string[2] {
                     "CONTROLLER", "ERROR"
                 }, new string[1] {
                     ex.Message
                 });
             }
         }
     }
     else
     {
         if (Input.GetKeyDown(keyBindings["selDown"]))
         {
             if (SubMenuSelection != subMaxSelectionOption)
             {
                 SubMenuSelection++;
             }
             else
             {
                 SubMenuSelection = 1;
             }
         }
         if (Input.GetKeyDown(keyBindings["selUp"]))
         {
             if (SubMenuSelection != 1)
             {
                 SubMenuSelection--;
             }
             else
             {
                 SubMenuSelection = subMaxSelectionOption;
             }
         }
         if (Input.GetKeyDown(keyBindings["selChoose"]))
         {
             SubMenuOpen = false;
             try
             {
                 RunMethod(SubMenuOptionsDisplay[SubMenuSelection - 1].ItemClass);
             }
             catch (Exception)
             {
                 try
                 {
                     if (SubMenuOptionsDisplay[SubMenuSelection - 1].ItemText.Equals("Next >"))
                     {
                         IncreasePage();
                     }
                     else if (SubMenuOptionsDisplay[SubMenuSelection - 1].ItemText.Equals("< Previous"))
                     {
                         DecreasePage();
                     }
                     else
                     {
                         RunMethod(SubMenuOptionsDisplay[SubMenuSelection - 1].ItemClassStr, SubMenuOptionsDisplay[SubMenuSelection - 1].ItemText);
                     }
                 }
                 catch (Exception ex2)
                 {
                     SkUtilities.Logz(new string[2] {
                         "CONTROLLER", "ERROR"
                     }, new string[1] {
                         ex2.Message
                     });
                 }
             }
         }
     }
     if (Input.GetKeyDown(keyBindings["selBack"]))
     {
         if (!SubMenuOpen)
         {
             MenuOpen = false;
         }
         SubMenuOpen = false;
     }
 }