Exemplo n.º 1
0
        public static void InitializeCheats()
        {
            CheatToolsWindow.OnShown = window =>
            {
                _hFlag                 = Object.FindObjectOfType <HFlag>();
                _talkScene             = Object.FindObjectOfType <TalkScene>();
                _hSprite               = Object.FindObjectOfType <HSprite>();
                _studioInstance        = Studio.Studio.Instance;
                _soundInstance         = Manager.Sound.Instance;
                _communicationInstance = Communication.Instance;
                _sceneInstance         = Scene.Instance;
                _gameMgr               = Game.Instance;

                _openInInspectorButtons = new[]
                {
                    new KeyValuePair <object, string>(_gameMgr != null && _gameMgr.HeroineList.Count > 0 ? (Func <object>)(() => _gameMgr.HeroineList.Select(x => new ReadonlyCacheEntry(x.ChaName, x))) : null, "Heroine list"),
                    new KeyValuePair <object, string>(_gameMgr, "Manager.Game.Instance"),
                    new KeyValuePair <object, string>(_sceneInstance, "Manager.Scene.Instance"),
                    new KeyValuePair <object, string>(_communicationInstance, "Manager.Communication.Instance"),
                    new KeyValuePair <object, string>(_soundInstance, "Manager.Sound.Instance"),
                    new KeyValuePair <object, string>(_hFlag, "HFlag"),
                    new KeyValuePair <object, string>(_talkScene, "TalkScene"),
                    new KeyValuePair <object, string>(_studioInstance, "Studio.Instance"),
                    new KeyValuePair <object, string>((Func <object>)EditorUtilities.GetRootGoScanner, "Root Objects")
                };
            };

            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _studioInstance == null && _gameMgr != null && !_gameMgr.saveData.isOpening, DrawPlayerCheats, "Start the game to see player cheats"));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _hFlag != null, DrawHSceneCheats, null));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _gameMgr != null, DrawGirlCheatMenu, null));

            CheatToolsWindow.Cheats.Add(CheatEntry.CreateOpenInInspectorButtons(() => _openInInspectorButtons));

            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _gameMgr != null, DrawGlobalUnlocks, null));
        }
Exemplo n.º 2
0
        public static void InitializeCheats()
        {
            CheatToolsWindow.OnShown = window =>
            {
                _studioInstance = Studio.Studio.IsInstance() ? Studio.Studio.Instance : null;
                _soundInstance  = Manager.Sound.instance;
                _sceneInstance  = Scene.instance;
                _gameMgr        = Game.IsInstance() ? Game.Instance : null;
                _baseMap        = BaseMap.instance;
                _hScene         = HSceneFlagCtrl.IsInstance() ? HSceneFlagCtrl.Instance : null;

                _openInInspectorButtons = new[]
                {
                    new KeyValuePair <object, string>(_gameMgr != null && _gameMgr.heroineList.Count > 0 ? (Func <object>)(() => _gameMgr.heroineList.Select(x => new ReadonlyCacheEntry(GetHeroineName(x), x))) : null, "Heroine list"),
                    new KeyValuePair <object, string>(ADVManager.IsInstance() ? ADVManager.Instance : null, "Manager.ADVManager.Instance"),
                    new KeyValuePair <object, string>(_baseMap, "Manager.BaseMap.instance"),
                    new KeyValuePair <object, string>(Character.IsInstance() ? Character.Instance : null, "Manager.Character.Instance"),
                    new KeyValuePair <object, string>(typeof(Manager.Config), "Manager.Config"),
                    new KeyValuePair <object, string>(_gameMgr, "Manager.Game.Instance"),
                    new KeyValuePair <object, string>(GameSystem.IsInstance() ? GameSystem.Instance : null, "Manager.GameSystem.Instance"),
                    new KeyValuePair <object, string>(_sceneInstance, "Manager.Scene.instance"),
                    new KeyValuePair <object, string>(_soundInstance, "Manager.Sound.instance"),
                    new KeyValuePair <object, string>(_studioInstance, "Studio.Instance"),
                    new KeyValuePair <object, string>((Func <object>)EditorUtilities.GetRootGoScanner, "Root Objects")
                };
            };

            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _hScene != null, DrawHSceneCheats, null));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _baseMap != null && (_hScene != null || Singleton <LobbySceneManager> .IsInstance()), DrawGirlCheatMenu, "Unable to edit character stats on this screen. Start an H scene or enter the lobby."));
            CheatToolsWindow.Cheats.Add(CheatEntry.CreateOpenInInspectorButtons(() => _openInInspectorButtons));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _studioInstance == null && _gameMgr != null && _gameMgr.saveData != null, DrawGlobalUnlocks, null));

            HarmonyLib.Harmony.CreateAndPatchAll(typeof(Hooks));
        }
Exemplo n.º 3
0
 private string Fire()
 {
     this.IsWorking = false;
     Studio.Studio tmpStudio = this.StaffStudioObject;
     tmpStudio.StudioDevelopingGames.ForEach(project =>
     {
         if (project.Developers.Contains(this))
         {
             project.RemoveDeveloper(this);
         }
     });
     this.StaffStudio       = "无业";
     this.WeekdaysLength    = 0;
     this.TimeToWork        = -1;
     this.TimeToQuit        = -1;
     this.StaffStudioObject = null;
     this.UpdateSql();
     this.StaffLoyalty = (int)(0.6 * this.StaffLoyalty);
     if (this.StaffLoyalty < 50)
     {
         return("我早就不想干了!");
     }
     else if (this.StaffLoyalty < 70)
     {
         return("为什么????");
     }
     else
     {
         return("是我...哪里做错了吗?");
     }
 }
Exemplo n.º 4
0
        public static bool SaveScenePreHook(Studio.Studio __instance, ref Camera[] __state)
        {
            IVRLog.LogDebug("Update Camera position and rotation for Scene Capture and last Camera data.");
            VRCameraMoveHelper.Instance.CurrentToCameraCtrl();
            FieldInfo field = typeof(Studio.GameScreenShot).GetField("renderCam", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

            Camera[] array = field.GetValue(Singleton <Studio.Studio> .Instance.gameScreenShot) as Camera[];
            IVRLog.LogDebug("Backup Screenshot render cam.");
            backupRenderCam = array;
            Camera[] value = new Camera[] { VR.Camera.SteamCam.camera };
            __state = backupRenderCam;
            field.SetValue(Singleton <Studio.Studio> .Instance.gameScreenShot, value);
            return(true);
        }
Exemplo n.º 5
0
        public static void Initialize()
        {
            CheatToolsWindow.OnShown = window =>
            {
                _studioInstance = Studio.Studio.IsInstance() ? Studio.Studio.Instance : null;
                _soundInstance  = Manager.Sound.Instance;
                _sceneInstance  = Scene.Instance;
                _gameMgr        = Game.IsInstance() ? Game.Instance : null;
                _resources      = Resources.Instance;
                _map            = Map.IsInstance() ? Map.Instance : null;
                _hScene         = HSceneFlagCtrl.IsInstance() ? HSceneFlagCtrl.Instance : null;

                _gameTimeText = null;

                _openInInspectorButtons = new[]
                {
                    new KeyValuePair <object, string>(_map != null && _map.AgentTable.Count > 0 ? (Func <object>)(() => _map.AgentTable.Values.Select(x => new ReadonlyCacheEntry(x.CharaName, x))) : null, "Heroine list"),
                    new KeyValuePair <object, string>(Manager.ADV.IsInstance() ? Manager.ADV.Instance : null, "Manager.ADV.Instance"),
                    new KeyValuePair <object, string>(AnimalManager.IsInstance() ? AnimalManager.Instance : null, "Manager.AnimalManager.Instance"),
                    new KeyValuePair <object, string>(_map, "Manager.Map.Instance"),
                    new KeyValuePair <object, string>(Character.IsInstance() ? Character.Instance : null, "Manager.Character.Instance"),
                    new KeyValuePair <object, string>(Config.IsInstance() ? Config.Instance : null, "Manager.Config.Instance"),
                    new KeyValuePair <object, string>(_gameMgr, "Manager.Game.Instance"),
                    new KeyValuePair <object, string>(Manager.Housing.IsInstance() ? Manager.Housing.Instance : null, "Manager.Housing.Instance"),
                    new KeyValuePair <object, string>(_sceneInstance, "Manager.Scene.Instance"),
                    new KeyValuePair <object, string>(_soundInstance, "Manager.Sound.Instance"),
                    new KeyValuePair <object, string>(_studioInstance, "Studio.Instance"),
                    new KeyValuePair <object, string>((Func <object>)EditorUtilities.GetRootGoScanner, "Root Objects")
                };
            };


            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _map != null && _map.Player != null && _map.Player.PlayerData != null, DrawPlayerCheats, "Start the game to see player cheats"));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _map != null && _map.Simulator != null, DrawEnviroControls, null));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _hScene != null, DrawHSceneCheats, null));
            CheatToolsWindow.Cheats.Add(new CheatEntry(w => _map != null, DrawGirlCheatMenu, null));

            CheatToolsWindow.Cheats.Add(CheatEntry.CreateOpenInInspectorButtons(() => _openInInspectorButtons));
        }
Exemplo n.º 6
0
 public static void SaveScenePostHook(Studio.Studio __instance, Camera[] __state)
 {
     IVRLog.LogDebug("Restore backup render cam.");
     typeof(Studio.GameScreenShot).GetField("renderCam", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).SetValue(Singleton <Studio.Studio> .Instance.gameScreenShot, __state);
 }
Exemplo n.º 7
0
 public Player(Studio.Studio studio, string number)
 {
     PlayerStudio = studio;
     PlayerNumber = number;
 }