public static void Load() { try { commandRoot = new CommandRoot("zhelperBase"); commandRoot.AddCommand <ZHelperCommand>(); } catch (Exception ex) { Debug.LogException(ex); } }
public static void Load() { SNLogger.Debug("Method call: Main.Load()"); try { SEConfig.Config_Load(); SlotHelper.InitSlotIDs(); SlotHelper.ExpandSlotMapping(); hInstance = new Harmony("Subnautica.SlotExtender.mod"); SNLogger.Debug($"Main.Load(): Harmony Instance created, Name = [{hInstance.Id}]"); hInstance.PatchAll(Assembly.GetExecutingAssembly()); SceneManager.sceneLoaded += new UnityAction <Scene, LoadSceneMode>(OnSceneLoaded); SNLogger.Debug("Main.Load(): Added OnSceneLoaded method to SceneManager.sceneLoaded event."); //add console commad for configuration window commandRoot = new CommandRoot("SEConfigGO"); commandRoot.AddCommand <SECommand>(); IngameMenuHandler.Main.RegisterOnQuitEvent(OnQuitEvent); } catch (Exception ex) { Debug.LogException(ex); } // check MoreQuickSlots namespace is exists if (ReflectionHelper.IsNamespaceExists("MoreQuickSlots")) { SNLogger.Log("MoreQuickSlots namespace is exist! Trying to install a Cross-MOD patch..."); // if yes construct a Harmony patch if (MQS_Patches.InitPatch(hInstance)) { SNLogger.Log("MoreQuickSlots Cross-MOD patch installed!"); } else { SNLogger.Error("MoreQuickSlots Cross-MOD patch install failed!"); } } }
public static void Load() { try { RuntimeHelper_Config.LoadConfig(); RuntimeHelper_Config.InitConfig(); DevConsole.disableConsole = false; //add console commad commandRoot = new CommandRoot("RHCommandGO", true); commandRoot.AddCommand <RuntimeHelperCommand>(); SceneManager.sceneLoaded += new UnityAction <Scene, LoadSceneMode>(OnSceneLoaded); } catch (Exception ex) { Debug.LogException(ex); } }