Beispiel #1
0
        private IEnumerator Start()
        {
            Logger           = base.Logger;
            _showCheatWindow = Config.Bind("Hotkeys", "Toggle cheat window", new KeyboardShortcut(KeyCode.Pause));
            _noclip          = Config.Bind("Hotkeys", "Toggle player noclip", KeyboardShortcut.Empty);

            UnlockAllPositions = Config.Bind("Cheats", "Unlock all H positions", false, "Reload the H scene to see changes.");
            UnlockAllPositions.SettingChanged += (sender, args) => UnlockPositionsHooks.Enabled = UnlockAllPositions.Value;
            UnlockPositionsHooks.Enabled       = UnlockAllPositions.Value;

            UnlockAllPositionsIndiscriminately = Config.Bind("Cheats", "Unlock invalid H positions as well", false, "This will unlock all positions even if they should not be possible.\nWARNING: Can result in bugs and even game crashes in some cases.\nReload the H scene to see changes.");
            UnlockAllPositionsIndiscriminately.SettingChanged += (sender, args) => UnlockPositionsHooks.UnlockAll = UnlockAllPositionsIndiscriminately.Value;
            UnlockPositionsHooks.UnlockAll = UnlockAllPositionsIndiscriminately.Value;

            // Wait for runtime editor to init
            yield return(null);

            _runtimeUnityEditorCore = RuntimeUnityEditor5.Instance;

            if (_runtimeUnityEditorCore == null)
            {
                Logger.Log(LogLevel.Error | LogLevel.Message, "Failed to get RuntimeUnityEditor! Make sure you don't have multiple versions of it installed!");
                enabled = false;
                yield break;
            }

            // Disable the default hotkey since we'll be controlling the show state manually
            _runtimeUnityEditorCore.ShowHotkey = KeyCode.None;
        }
Beispiel #2
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            Editor           = editor ?? throw new ArgumentNullException(nameof(editor));
            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;

            Cheats.Add(new CheatEntry(window => true, DrawTimeControls, null));
        }
Beispiel #3
0
        private IEnumerator Start()
        {
            Logger           = base.Logger;
            _showCheatWindow = Config.Bind("Hotkeys", "Toggle cheat window", new KeyboardShortcut(KeyCode.Pause));
            _noclip          = Config.Bind("Hotkeys", "Toggle player noclip", KeyboardShortcut.Empty);

            BuildAnywhere = Config.Bind("Cheats", "Allow building anywhere", false);
            BuildAnywhere.SettingChanged += (sender, args) => BuildAnywhereHooks.Enabled = BuildAnywhere.Value;
            BuildAnywhereHooks.Enabled    = BuildAnywhere.Value;

            BuildOverlap = Config.Bind("Cheats", "Allow building overlap", false);
            BuildOverlap.SettingChanged += (sender, args) => BuildOverlapHooks.Enabled = BuildOverlap.Value;
            BuildOverlapHooks.Enabled    = BuildOverlap.Value;

            // Wait for runtime editor to init
            yield return(null);

            _runtimeUnityEditorCore = RuntimeUnityEditor5.Instance;

            if (_runtimeUnityEditorCore == null)
            {
                Logger.Log(BepInEx.Logging.LogLevel.Error, "Could not get the instance of RuntimeUnityEditorCore, aborting");
                enabled = false;
                yield break;
            }

            // Disable the default hotkey since we'll be controlling the show state manually
            _runtimeUnityEditorCore.ShowHotkey = KeyCode.None;
        }
Beispiel #4
0
        private void Start()
        {
            Instance = new RuntimeUnityEditorCore(this, new Logger5(Logger), Paths.ConfigPath);

            DnSpyPath = Config.Bind("Inspector", "Path to dnSpy.exe", string.Empty, "Full path to dnSpy that will enable integration with Inspector. When correctly configured, you will see a new ^ buttons that will open the members in dnSpy.");
            DnSpyPath.SettingChanged += (sender, args) => DnSpyHelper.DnSpyPath = DnSpyPath.Value;
            DnSpyHelper.DnSpyPath     = DnSpyPath.Value;

            if (Instance.Repl != null)
            {
                ShowRepl = Config.Bind("General", "Show REPL console", true);
                ShowRepl.SettingChanged += (sender, args) => Instance.ShowRepl = ShowRepl.Value;
                Instance.ShowRepl        = ShowRepl.Value;
            }

            Hotkey = Config.Bind("General", "Open/close runtime editor", new KeyboardShortcut(KeyCode.F12));
            Hotkey.SettingChanged += (sender, args) => Instance.ShowHotkey = Hotkey.Value.MainKey;
            Instance.ShowHotkey    = Hotkey.Value.MainKey;

            Instance.SettingsChanged += (sender, args) =>
            {
                Hotkey.Value = new KeyboardShortcut(Instance.ShowHotkey);
                if (ShowRepl != null)
                {
                    ShowRepl.Value = Instance.ShowRepl;
                }
            };
        }
 private void Start()
 {
     Instance  = new RuntimeUnityEditorCore(this, new Logger(), Paths.PluginPath);
     DnSpyPath = new ConfigWrapper <string>(nameof(DnSpyPath), this);
     DnSpyPath.SettingChanged += (sender, args) => DnSpyHelper.DnSpyPath = DnSpyPath.Value;
     DnSpyHelper.DnSpyPath     = DnSpyPath.Value;
 }
        private void Start()
        {
            Instance = new RuntimeUnityEditorCore(gameObject, new Logger5(Logger));

            DnSpyPath = Config.Wrap(null, "Path to dnSpy.exe", "Full path to dnSpy that will enable integration with Inspector. When correctly configured, you will see a new ^ buttons that will open the members in dnSpy.", string.Empty);
            DnSpyPath.SettingChanged += (sender, args) => DnSpyHelper.DnSpyPath = DnSpyPath.Value;
            DnSpyHelper.DnSpyPath     = DnSpyPath.Value;
        }
Beispiel #7
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            _editor = editor ?? throw new ArgumentNullException(nameof(editor));

            ToStringConverter.AddConverter <SaveData.Heroine>(heroine => !string.IsNullOrEmpty(heroine.Name) ? heroine.Name : heroine.nickname);
            ToStringConverter.AddConverter <SaveData.CharaData.Params.Data>(d => $"[{d.key} | {d.value}]");

            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;
        }
        private void Start()
        {
            inspector = new RuntimeUnityEditorCore(this, new Logger())
            {
                EnableMouseInspect      = false,
                HierarchyUpdateInterval = 0.5f
            };

            toggleKey = GetConfigurableKey("RuntimeInspector", "ToggleKey");
        }
Beispiel #9
0
 internal static void CreateRuntimeEditor(GameObject objectToAddTo)
 {
     if (INSTANCE == null)
     {
         INSTANCE = objectToAddTo.AddComponent <RuntimeUnityEditorCore>();
         INSTANCE.Setup(
             new RuntimeEditorLogger()
             );
     }
 }
Beispiel #10
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            _editor = editor ?? throw new ArgumentNullException(nameof(editor));

            ToStringConverter.AddConverter <AgentActor>(heroine => !string.IsNullOrEmpty(heroine.CharaName) ? heroine.CharaName : heroine.name);
            ToStringConverter.AddConverter <AgentData>(d => $"AgentData - {d.CharaFileName} | {d.NowCoordinateFileName}");
            ToStringConverter.AddConverter <ChaFile>(d => $"ChaFile - {d.charaFileName ?? "Unknown"} ({d.parameter?.fullname ?? "Unknown"})");
            ToStringConverter.AddConverter <ChaControl>(d => $"{d} - {d.chaFile?.parameter?.fullname ?? d.chaFile?.charaFileName ?? "Unknown"}");

            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;
        }
Beispiel #11
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            _editor = editor ?? throw new ArgumentNullException(nameof(editor));

            ToStringConverter.AddConverter <SaveData.Heroine>(heroine => !string.IsNullOrEmpty(heroine.Name) ? heroine.Name : heroine.nickname);
            ToStringConverter.AddConverter <SaveData.CharaData.Params.Data>(d => $"[{d.key} | {d.value}]");

            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;

            _funcGetHeroines = () => _gameMgr.HeroineList.Select(x => new ReadonlyCacheEntry(x.ChaName, x));
            _funcGetRootGos  = EditorUtilities.GetRootGoScanner;
        }
Beispiel #12
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            _editor = editor ?? throw new ArgumentNullException(nameof(editor));

            ToStringConverter.AddConverter <Heroine>(GetHeroineName);
            ToStringConverter.AddConverter <ChaFile>(d => $"ChaFile - {d.charaFileName ?? "Unknown"} ({d.parameter?.fullname ?? "Unknown"})");
            ToStringConverter.AddConverter <ChaControl>(d => $"{d} - {d.chaFile?.parameter?.fullname ?? d.chaFile?.charaFileName ?? "Unknown"}");

            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;

            _funcGetHeroines = () => _gameMgr.heroineList.Select(x => new ReadonlyCacheEntry(GetHeroineName(x), x));
            _funcGetRootGos  = EditorUtilities.GetRootGoScanner;
        }
Beispiel #13
0
        public CheatToolsWindow(RuntimeUnityEditorCore editor)
        {
            _editor = editor ?? throw new ArgumentNullException(nameof(editor));

            ToStringConverter.AddConverter <AgentActor>(heroine => !string.IsNullOrEmpty(heroine.CharaName) ? heroine.CharaName : heroine.name);
            ToStringConverter.AddConverter <AgentData>(d => $"AgentData - {d.CharaFileName} | {d.NowCoordinateFileName}");
            ToStringConverter.AddConverter <ChaFile>(d => $"ChaFile - {d.charaFileName ?? "Unknown"} ({d.parameter?.fullname ?? "Unknown"})");
            ToStringConverter.AddConverter <ChaControl>(d => $"{d} - {d.chaFile?.parameter?.fullname ?? d.chaFile?.charaFileName ?? "Unknown"}");

            _mainWindowTitle = "Cheat Tools " + Assembly.GetExecutingAssembly().GetName().Version;

            _funcGetHeroines = () => _map.AgentTable.Values.Select(x => new ReadonlyCacheEntry(x.CharaName, x));
            _funcGetRootGos  = EditorUtilities.GetRootGoScanner;
        }
Beispiel #14
0
        public CheatWindow(RuntimeUnityEditorCore editor)
        {
            if (editor == null)
            {
                throw new ArgumentNullException(nameof(editor));
            }

            _editor = editor;

            EditorUtilities.AddCustomObjectToString <SaveData.Heroine>(heroine => heroine.Name);
            EditorUtilities.AddCustomObjectToString <SaveData.CharaData.Params.Data>(d => $"[{d.key} | {d.value}]");

            _mainWindowTitle = "Cheat Tools" + Assembly.GetExecutingAssembly().GetName().Version;
        }
Beispiel #15
0
        private IEnumerator Start()
        {
            // Wait for runtime editor to init
            yield return(null);

            _runtimeUnityEditorCore = RuntimeUnityEditorCore.Instance;

            if (_runtimeUnityEditorCore == null)
            {
                Logger.Log(BepInEx.Logging.LogLevel.Error | BepInEx.Logging.LogLevel.Message, "Failed to get RuntimeUnityEditor! Make sure you don't have multiple versions of it installed!");
                enabled = false;
                yield break;
            }

            // Disable the default hotkey since we'll be controlling the show state manually
            _runtimeUnityEditorCore.ShowHotkey = KeyCode.None;
        }
Beispiel #16
0
        private IEnumerator Start()
        {
            Logger           = base.Logger;
            _showCheatWindow = Config.Bind("Hotkeys", "Toggle cheat window", new KeyboardShortcut(KeyCode.Pause));
            _noclip          = Config.Bind("Hotkeys", "Toggle player noclip", KeyboardShortcut.Empty);

            // Wait for runtime editor to init
            yield return(null);

            _runtimeUnityEditorCore = RuntimeUnityEditor5.Instance;

            if (_runtimeUnityEditorCore == null)
            {
                Logger.Log(LogLevel.Error, "Could not get the instance of RuntimeUnityEditorCore, aborting");
                enabled = false;
                yield break;
            }

            // Disable the default hotkey since we'll be controlling the show state manually
            _runtimeUnityEditorCore.ShowHotkey = KeyCode.None;
        }
        private IEnumerator Start()
        {
            Logger           = base.Logger;
            _showCheatWindow = Config.Bind("Hotkeys", "Toggle cheat window", new KeyboardShortcut(KeyCode.F12));

            // Wait for runtime editor to init
            yield return(null);

            _runtimeUnityEditorCore = RuntimeUnityEditor5.Instance;

            if (_runtimeUnityEditorCore == null)
            {
                Logger.Log(LogLevel.Error | LogLevel.Message, "Failed to get RuntimeUnityEditor! Make sure you don't have multiple versions of it installed!");
                enabled = false;
                yield break;
            }

            // Disable the default hotkey since we'll be controlling the show state manually
            _runtimeUnityEditorCore.ShowHotkey = KeyCode.None;

            HarmonyLib.Harmony.CreateAndPatchAll(typeof(Hooks));
        }