Example #1
0
 public static void AddExtraPairs(PlayerFile __instance, ref SaveFile saveFile)
 {
     if (HP2SR.AllPairsEnabled.Value && Game.Data.GirlPairs.GetAll().Count < 27)
     {
         Datamining.ExperimentalAllPairsMod(false);
         if (HP2SR.SpecialPairsEnabled.Value)
         {
             Datamining.ExperimentalAllPairsMod(true);
         }
     }
     if ((!HP2SR.AllPairsEnabled.Value && saveFile.girlPairs.Count >= 27) || (!HP2SR.SpecialPairsEnabled.Value && saveFile.girlPairs.Count >= 69))
     {
         //fix an allpairs save file before it gets read
         if (Game.Data.GirlPairs.Get(saveFile.girlPairId) == null)
         {
             saveFile.girlPairId = UnityEngine.Random.Range(1, 25);
         }
         for (int i = saveFile.girlPairs.Count - 1; i >= 0; i--)
         {
             if (Game.Data.GirlPairs.Get(saveFile.girlPairs[i].girlPairId) == null)
             {
                 saveFile.girlPairs.RemoveAt(i);
             }
         }
         for (int i = saveFile.metGirlPairs.Count - 1; i >= 0; i--)
         {
             if (Game.Data.GirlPairs.Get(saveFile.metGirlPairs[i]) == null)
             {
                 saveFile.metGirlPairs.RemoveAt(i);
             }
         }
         for (int i = saveFile.completedGirlPairs.Count - 1; i >= 0; i--)
         {
             if (Game.Data.GirlPairs.Get(saveFile.completedGirlPairs[i]) == null)
             {
                 saveFile.completedGirlPairs.RemoveAt(i);
             }
         }
         for (int i = saveFile.finderSlots.Count - 1; i >= 0; i--)
         {
             if (Game.Data.GirlPairs.Get(saveFile.finderSlots[i].girlPairId) == null)
             {
                 saveFile.finderSlots[i].girlPairId = 0;
             }
         }
     }
 }
Example #2
0
 public static void DumbPermutationShit()
 {
     Datamining.TestAllPermutations();
 }
Example #3
0
        public static void Update()
        {
            if (!HP2SR.cheatsEnabled)
            {
                return;
            }
            //add the quick transitions code if cheat mode is on
            if (!Game.Persistence.playerData.unlockedCodes.Contains(Game.Data.Codes.Get(HP2SR.QUICKTRANSITIONS)))
            {
                Game.Persistence.playerData.unlockedCodes.Add(Game.Data.Codes.Get(HP2SR.QUICKTRANSITIONS));
            }

            if (Input.GetKeyDown(KeyCode.F1))
            {
                if (Game.Session.Location.currentLocation.locationType == LocationType.DATE)
                {
                    HP2SR.ShowNotif("Affection Filled!", 2);
                    Game.Session.Puzzle.puzzleStatus.AddResourceValue(PuzzleResourceType.AFFECTION, 999999, false);
                    Game.Session.Puzzle.puzzleStatus.AddResourceValue(PuzzleResourceType.AFFECTION, -1, false);
                    Game.Session.Puzzle.puzzleStatus.CheckChanges();
                }
                else
                {
                    HP2SR.ShowNotif("Fruit Given!", 2);
                    Game.Persistence.playerFile.AddFruitCount(PuzzleAffectionType.FLIRTATION, 100);
                    Game.Persistence.playerFile.AddFruitCount(PuzzleAffectionType.ROMANCE, 100);
                    Game.Persistence.playerFile.AddFruitCount(PuzzleAffectionType.SEXUALITY, 100);
                    Game.Persistence.playerFile.AddFruitCount(PuzzleAffectionType.TALENT, 100);
                }
            }

            if (Input.GetKeyDown(KeyCode.F2))
            {
                if (!Game.Manager.Ui.currentCanvas.titleCanvas)
                {
                    HP2SR.ShowNotif("Stamina Gained!", 2);
                    Game.Session.Puzzle.puzzleStatus.AddResourceValue(PuzzleResourceType.STAMINA, 6, false);
                    Game.Session.Puzzle.puzzleStatus.AddResourceValue(PuzzleResourceType.STAMINA, 6, true);
                    Game.Session.Puzzle.puzzleStatus.CheckChanges();
                }
            }

            if (Input.GetKeyDown(KeyCode.F5))
            {
                if (!Game.Manager.Ui.currentCanvas.titleCanvas)
                {
                    HP2SR.ShowNotif("Girl Finder Refreshed!", 2);
                    Game.Persistence.playerFile.PopulateFinderSlots();
                    Game.Session.gameCanvas.cellphone.LoadOpenApp();
                }
            }

            if (Input.GetKeyDown(KeyCode.F6))
            {
                if (!Game.Manager.Ui.currentCanvas.titleCanvas)
                {
                    HP2SR.ShowNotif("Store Refreshed!", 2);
                    Game.Persistence.playerFile.PopulateStoreProducts();
                    Game.Session.gameCanvas.cellphone.LoadOpenApp();
                }
            }

            if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
            {
                if (Input.GetKeyDown(KeyCode.A) && !Game.Manager.Ui.currentCanvas.titleCanvas)
                {
                    CodeDefinition abiaHair = Game.Data.Codes.Get(HP2SR.ABIAHAIR);
                    if (!Game.Persistence.playerData.unlockedCodes.Contains(abiaHair))
                    {
                        Game.Persistence.playerData.unlockedCodes.Add(abiaHair);
                        HP2SR.ShowNotif("Abia's hair enabled!", 0);
                    }
                    else
                    {
                        Game.Persistence.playerData.unlockedCodes.Remove(abiaHair);
                        HP2SR.ShowNotif("Abia's hair disabled!", 0);
                    }
                    foreach (UiDoll doll in Game.Session.gameCanvas.dolls)
                    {
                        if (doll.girlDefinition && doll.girlDefinition.girlName == "Abia")
                        {
                            doll.ChangeHairstyle(doll.currentHairstyleIndex);
                        }
                    }
                }

                for (int i = (int)KeyCode.Alpha0; i <= (int)KeyCode.Alpha9; i++)
                {
                    //Alpha0 = 48, Keypad0 = 256
                    int num = i - 48;

                    if (!Game.Manager.Ui.currentCanvas.titleCanvas && (Input.GetKeyDown((KeyCode)i) || Input.GetKeyDown((KeyCode)(i + 208))))
                    {
                        foreach (UiDoll doll in Game.Session.gameCanvas.dolls)
                        {
                            HP2SR.ShowThreeNotif("Changed to Outfit #" + num);
                            doll.ChangeHairstyle(num);
                            doll.ChangeOutfit(num);
                        }
                    }
                }

                if (Input.GetKeyDown(KeyCode.N))
                {
                    HP2SR.nudePatch = !HP2SR.nudePatch;
                    if (HP2SR.nudePatch)
                    {
                        HP2SR.ShowNotif("AWOOOOOOOOOOGA", 2);
                        foreach (UiDoll doll in Game.Session.gameCanvas.dolls)
                        {
                            doll.partNipples.Show();
                            doll.partOutfit.Hide();
                        }
                    }
                    else
                    {
                        foreach (UiDoll doll in Game.Session.gameCanvas.dolls)
                        {
                            doll.partNipples.Hide();
                            doll.partOutfit.Show();
                        }
                    }
                }

                if (Input.GetKeyDown(KeyCode.M))
                {
                    if (!InputPatches.mashCheat)
                    {
                        HP2SR.ShowThreeNotif("MASH POWER ACTIVATED");
                    }
                    else
                    {
                        HP2SR.ShowThreeNotif("Mash power deactivated");
                    }
                    InputPatches.mashCheat = !InputPatches.mashCheat;
                }

                if (Input.GetKeyDown(KeyCode.L))
                {
                    //Datamining.LocationInfo();
                    CodeDefinition codeDefinition = Game.Data.Codes.Get(16);
                    if (!Game.Persistence.playerData.unlockedCodes.Contains(codeDefinition))
                    {
                        Game.Persistence.playerData.unlockedCodes.Add(codeDefinition);
                        HP2SR.ShowTooltip("Letterbox Code Enabled! (not that it does anything yet)", 2000);
                    }
                    else
                    {
                        Game.Persistence.playerData.unlockedCodes.Remove(codeDefinition);
                        HP2SR.ShowTooltip("Letterbox Code Disabled!", 2000);
                    }
                }

                //percent sign
                if (Input.GetKeyDown(KeyCode.Alpha5))
                {
                    Datamining.CheckPercentage();
                }

                if (Input.GetKeyDown(KeyCode.G))
                {
                    Datamining.GetGirlData();
                }

                if (Input.GetKeyDown(KeyCode.D))
                {
                    Datamining.GetAllDialogTriggers();
                    Datamining.GetAllCutsceneLines();
                }

                if (Input.GetKeyDown(KeyCode.R))
                {
                    PlayerFileGirlPair thePair = Game.Persistence.playerFile.GetPlayerFileGirlPair(Game.Persistence.playerFile.girlPairDefinition);
                    if (Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt))
                    {
                        if (thePair.relationshipType != GirlPairRelationshipType.UNKNOWN)
                        {
                            thePair.relationshipType--;
                            HP2SR.ShowThreeNotif("Relationship Leveled Down to " + thePair.relationshipType + "!");
                            UiCellphoneAppStatus status = (UiCellphoneAppStatus)AccessTools.Field(typeof(UiCellphone), "_currentApp").GetValue(Game.Session.gameCanvas.cellphone);
                            status.Refresh();
                        }
                    }
                    else
                    {
                        if (thePair.relationshipType != GirlPairRelationshipType.LOVERS)
                        {
                            thePair.relationshipType++;
                            HP2SR.ShowThreeNotif("Relationship Leveled Up to " + thePair.relationshipType + "!");
                            UiCellphoneAppStatus status = (UiCellphoneAppStatus)AccessTools.Field(typeof(UiCellphone), "_currentApp").GetValue(Game.Session.gameCanvas.cellphone);
                            status.Refresh();
                        }
                    }
                }
            }

            /*if (Input.GetKey(KeyCode.F9))
             * {
             *  Game.Persistence.playerFile.alphaDateCount -= 100;
             *
             *  float num = 200f;
             *  float num2 = 25f;
             *  int num3 = Mathf.Min(Game.Persistence.playerFile.relationshipUpCount, 47);
             *  if (Game.Persistence.playerFile.storyProgress >= 14 && !Game.Persistence.playerData.unlockedCodes.Contains(Game.Session.Puzzle.noAlphaModeCode))
             *  {
             *      num3 += Game.Persistence.playerFile.alphaDateCount + 1;
             *  }
             *  for (int k = 0; k < num3; k++)
             *  {
             *      num += num2;
             *      num2 += 3.3525f;
             *  }
             *
             *  Datamining.Logger.LogDebug((Mathf.RoundToInt(num / 5f) * 5));
             * }
             *
             * if (Input.GetKey(KeyCode.F11))
             * {
             *  Game.Persistence.playerFile.alphaDateCount += 1000;
             *
             *  float num = 200f;
             *  float num2 = 25f;
             *  int num3 = Mathf.Min(Game.Persistence.playerFile.relationshipUpCount, 47);
             *  if (Game.Persistence.playerFile.storyProgress >= 14 && !Game.Persistence.playerData.unlockedCodes.Contains(Game.Session.Puzzle.noAlphaModeCode))
             *  {
             *      num3 += Game.Persistence.playerFile.alphaDateCount + 1;
             *  }
             *  for (int k = 0; k < num3; k++)
             *  {
             *      num += num2;
             *      num2 += 3.3525f;
             *  }
             *
             *  Datamining.Logger.LogDebug((Mathf.RoundToInt(num / 5f) * 5));
             * }
             *
             * if (Input.GetKeyDown(KeyCode.F10))
             * {
             *  Game.Persistence.playerFile.alphaDateCount = 35000;
             * }*/

            /*
             * i should still make a save toggle, on F3?
             * if (cheatsEnabled)
             * {
             *
             *  if (Input.GetKeyDown(KeyCode.F2))
             *  {
             *      if (savingDisabled)
             *      {
             *          savingDisabled = false;
             *          GameUtil.ShowNotification(CellNotificationType.MESSAGE, "Saving has been enabled");
             *      }
             *      else
             *      {
             *          savingDisabled = true;
             *          GameUtil.ShowNotification(CellNotificationType.MESSAGE, "Saving has been disabled");
             *      }
             *  }
             *
             * }
             */
        }