Exemplo n.º 1
0
        public static void CheckPercentage()
        {
            PlayerFile _this = Game.Persistence.playerFile;
            float      num   = (float)Mathf.Clamp(_this.storyProgress - 2, 0, 12) * 0.5f;

            Logger.LogDebug(Mathf.FloorToInt(num));
            for (int i = 0; i < 4; i++)
            {
                num += (float)_this.GetAffectionLevel((PuzzleAffectionType)i, true) * 0.625f;
            }
            Logger.LogDebug(Mathf.FloorToInt(num));
            for (int j = 0; j < _this.girls.Count; j++)
            {
                PlayerFileGirl playerFileGirl = _this.girls[j];
                if (!playerFileGirl.girlDefinition.specialCharacter && playerFileGirl.playerMet)
                {
                    num += (float)playerFileGirl.learnedBaggage.Count * 0.25f;
                    num += (float)playerFileGirl.receivedUniques.Count * 0.125f;
                    num += (float)playerFileGirl.receivedShoes.Count * 0.125f;
                    for (int k = 0; k < playerFileGirl.unlockedHairstyles.Count; k++)
                    {
                        if (k != playerFileGirl.girlDefinition.defaultHairstyleIndex && k != 6)
                        {
                            num += 0.046875f;
                        }
                    }
                    for (int l = 0; l < playerFileGirl.unlockedOutfits.Count; l++)
                    {
                        if (l != playerFileGirl.girlDefinition.defaultOutfitIndex && l != 6)
                        {
                            num += 0.046875f;
                        }
                    }
                }
                Logger.LogDebug(playerFileGirl.girlDefinition.girlName + ": " + playerFileGirl.learnedBaggage.Count + "," +
                                playerFileGirl.receivedUniques.Count + "," + playerFileGirl.receivedShoes.Count + "," +
                                playerFileGirl.unlockedHairstyles.Count + "," + playerFileGirl.unlockedOutfits.Count);
                Logger.LogDebug(Mathf.FloorToInt(num));
            }
            //Logger.LogDebug(Mathf.FloorToInt(num));
            for (int m = 0; m < _this.girlPairs.Count; m++)
            {
                PlayerFileGirlPair playerFileGirlPair = _this.girlPairs[m];
                if (!playerFileGirlPair.girlPairDefinition.specialPair)
                {
                    GirlPairRelationshipType relationshipType = playerFileGirlPair.relationshipType;
                    if (relationshipType >= GirlPairRelationshipType.COMPATIBLE)
                    {
                        num += 0.25f;
                    }
                    if (relationshipType >= GirlPairRelationshipType.ATTRACTED)
                    {
                        num += 1f;
                    }
                    if (relationshipType >= GirlPairRelationshipType.LOVERS)
                    {
                        num += 1f;
                    }
                }
            }
            Logger.LogDebug(Mathf.FloorToInt(num));
        }
Exemplo n.º 2
0
        public static void GetGirlData()
        {
            //couldn't find a quick way to get these strings so i got them manually
            Dictionary <string, string> convertPairQuestions = new Dictionary <string, string>();

            convertPairQuestions.Add("Movie Genre", "movie genre");
            convertPairQuestions.Add("Phone App", "app on your phone");
            convertPairQuestions.Add("Theme Park Ride", "theme park ride");
            convertPairQuestions.Add("Holiday", "holiday");
            convertPairQuestions.Add("Outdoor Activity", "outdoor activity");
            convertPairQuestions.Add("Sunday Morning", "Sunday morning");
            convertPairQuestions.Add("Place to Shop", "place to go shopping");
            convertPairQuestions.Add("Trait in Partner", "trait to have in a partner");
            convertPairQuestions.Add("Own Body Part", "part about your own body");
            convertPairQuestions.Add("P**n Category", "category of p**n");
            convertPairQuestions.Add("Ice Cream Flavor", "flavor of ice cream");
            convertPairQuestions.Add("Friday Night", "Friday night");
            convertPairQuestions.Add("Weather", "kind of weather");
            convertPairQuestions.Add("Pet", "type of pet");
            convertPairQuestions.Add("School Subject", "subject in high school");
            convertPairQuestions.Add("Drink", "thing to drink");
            convertPairQuestions.Add("Music Genre", "music genre");
            convertPairQuestions.Add("Online Activity", "thing to do online");
            convertPairQuestions.Add("Type of Exercise", "way to exercise");
            convertPairQuestions.Add("Sex Position", "sex position");

            Dictionary <int, string> girlIDToHotkey = new Dictionary <int, string>();

            for (int i = 1; i <= 9; i++)
            {
                girlIDToHotkey.Add(i, i.ToString());
            }
            girlIDToHotkey.Add(10, "0");
            girlIDToHotkey.Add(11, "-");
            girlIDToHotkey.Add(12, "=");

            Logger.LogDebug(Game.Persistence.playerFile.girls.Count + " girls");

            List <GirlDefinition> allBySpecial = Game.Data.Girls.GetAllBySpecial(false);

            List <GirlPairDefinition> allBySpecial2 = Game.Data.GirlPairs.GetAllBySpecial(false);

            foreach (GirlDefinition g in allBySpecial)
            {
                Logger.LogDebug(g.girlName + " " + g.id);
            }
            List <GirlDefinition> allSpecialGirls = Game.Data.Girls.GetAllBySpecial(true);

            foreach (GirlDefinition g in allSpecialGirls)
            {
                Logger.LogDebug(g.girlName + " " + g.id);
            }

            foreach (PlayerFileGirl pfg in Game.Persistence.playerFile.girls)
            {
                Logger.LogDebug(pfg.girlDefinition.girlName);
            }

            string data = "";

            //output unordered girl info list
            foreach (GirlDefinition g in allBySpecial)
            {
                data += g.girlName + " (" + girlIDToHotkey[g.id] + "): Loves " + g.favoriteAffectionType + ", Hates " + g.leastFavoriteAffectionType + "\n";
                data += g.uniqueType + " (" + g.uniqueAdj + "), " + g.shoesType + " (" + g.shoesAdj + ")\n";
                data += GetQuestionQuizlet(g) + "\n";
            }
            data += "\n";

            allBySpecial.Sort((x, y) => x.girlName.CompareTo(y.girlName));

            //output alphabetical girl info list
            foreach (GirlDefinition g in allBySpecial)
            {
                data += g.girlName + " (" + girlIDToHotkey[g.id] + "): Loves " + g.favoriteAffectionType + ", Hates " + g.leastFavoriteAffectionType + "\n";
                data += g.uniqueType + " (" + g.uniqueAdj + "), " + g.shoesType + " (" + g.shoesAdj + ")\n";
                data += GetQuestionQuizlet(g) + "\n";
            }

            //output unordered pair info list
            foreach (GirlPairDefinition g in allBySpecial2)
            {
                GirlDefinition g1 = g.girlDefinitionOne; GirlDefinition g2 = g.girlDefinitionTwo;
                data += g1.girlName + " + " + g2.girlName + "; " + g2.girlName + " + " + g1.girlName +
                        " (" + g1.favoriteAffectionType + ", " + g2.favoriteAffectionType + ")\n";
                if (g.introductionPair)
                {
                    data += "Introduction Pair: YES, ";
                }
                data += "Meeting Location: " + g.meetingLocationDefinition.locationName + ", Sex Day Phase: " + g.sexDaytime + "\n";
                data += "Favorite Questions: ";
                List <GirlPairFavQuestionSubDefinition> qs = g.favQuestions;

                foreach (GirlPairFavQuestionSubDefinition q in qs)
                {
                    if (convertPairQuestions.ContainsKey(q.questionDefinition.questionName))
                    {
                        q.questionDefinition.questionName = convertPairQuestions[q.questionDefinition.questionName];
                    }
                }
                qs.Sort((x, y) => x.questionDefinition.questionName.CompareTo(y.questionDefinition.questionName));
                foreach (GirlPairFavQuestionSubDefinition q in qs)
                {
                    data += q.questionDefinition.questionName + ", ";
                }
                data  = data.Substring(0, data.Length - 2);
                data += "\n\n";
            }
            data += "\n";
            foreach (GirlPairDefinition g in allBySpecial2)
            {
                //swap pairs so earlier name is always girldefinitionone
                if (g.girlDefinitionOne.girlName.CompareTo(g.girlDefinitionTwo.girlName) > 0)
                {
                    GirlDefinition temp = g.girlDefinitionOne;
                    g.girlDefinitionOne = g.girlDefinitionTwo;
                    g.girlDefinitionTwo = temp;
                }
            }

            allBySpecial2.Sort((x, y) => {
                int result = x.girlDefinitionOne.girlName.CompareTo(y.girlDefinitionOne.girlName);
                if (result == 0)
                {
                    result = x.girlDefinitionTwo.girlName.CompareTo(y.girlDefinitionTwo.girlName);
                }
                return(result);
            }
                               );
            //allBySpecial2.Sort((x, y) => { if (x.girlDefinitionOne.girlName == y.girlDefinitionOne.girlName) return x.girlDefinitionTwo.girlName.CompareTo(y.girlDefinitionTwo.girlName); else return 0; });

            foreach (GirlPairDefinition g in allBySpecial2)
            {
                GirlDefinition g1 = g.girlDefinitionOne; GirlDefinition g2 = g.girlDefinitionTwo;
                data += g1.girlName + " + " + g2.girlName + "; " + g2.girlName + " + " + g1.girlName +
                        " (" + g1.favoriteAffectionType + ", " + g2.favoriteAffectionType + ")\n";
                if (g.introductionPair)
                {
                    data += "Introduction Pair: YES, ";
                }
                data += "Meeting Location: " + g.meetingLocationDefinition.locationName + ", Sex Day Phase: " + g.sexDaytime + "\n";
                data += "Favorite Questions: ";
                List <GirlPairFavQuestionSubDefinition> qs = g.favQuestions;

                foreach (GirlPairFavQuestionSubDefinition q in qs)
                {
                    if (convertPairQuestions.ContainsKey(q.questionDefinition.questionName))
                    {
                        q.questionDefinition.questionName = convertPairQuestions[q.questionDefinition.questionName];
                    }
                }
                qs.Sort((x, y) => x.questionDefinition.questionName.CompareTo(y.questionDefinition.questionName));
                foreach (GirlPairFavQuestionSubDefinition q in qs)
                {
                    data += q.questionDefinition.questionName + ", ";
                }
                data  = data.Substring(0, data.Length - 2);
                data += "\n\n";
            }
            Logger.LogDebug(data);

            string huge = "";

            for (int a = 0; a < allBySpecial.Count; a++)
            {
                for (int b = 0; b < allBySpecial[a].herQuestions.Count; b++)
                {
                    for (int c = 0; c < allBySpecial[a].herQuestions[b].answers.Count; c++)
                    {
                        huge += a + "," + b + "," + c + ": " + PurifyDialogText(allBySpecial[a].herQuestions[b].answers[c].answerText) + " (" + allBySpecial[a].herQuestions[b].answers[c].responseIndex + ")\n";
                        if (allBySpecial[a].herQuestions[b].answers[c].hasAlt)
                        {
                            huge += a + "," + b + "," + c + " ALT: " + PurifyDialogText(allBySpecial[a].herQuestions[b].answers[c].answerTextAlt) + " (" + allBySpecial[a].herQuestions[b].answers[c].responseIndex + ")\n";
                        }
                    }
                }
            }


            //Logger.LogDebug(huge);

            float num = (float)Mathf.Clamp(Game.Persistence.playerFile.storyProgress - 2, 0, 12) * 0.5f;

            Logger.LogDebug(num);
            for (int i = 0; i < 4; i++)
            {
                num += (float)Game.Persistence.playerFile.GetAffectionLevel((PuzzleAffectionType)i, true) * 0.625f;
                Logger.LogDebug(num);
            }
            Logger.LogDebug(num);

            for (int j = 0; j < Game.Persistence.playerFile.girls.Count; j++)
            {
                PlayerFileGirl playerFileGirl = Game.Persistence.playerFile.girls[j];
                if (!playerFileGirl.girlDefinition.specialCharacter && playerFileGirl.playerMet)
                {
                    num += (float)playerFileGirl.learnedBaggage.Count * 0.25f;
                    num += (float)playerFileGirl.receivedUniques.Count * 0.125f;
                    num += (float)playerFileGirl.receivedShoes.Count * 0.125f;
                    for (int k = 0; k < playerFileGirl.unlockedHairstyles.Count; k++)
                    {
                        if (k != playerFileGirl.girlDefinition.defaultHairstyleIndex && k != 6)
                        {
                            num += 0.046875f;
                        }
                    }
                    for (int l = 0; l < playerFileGirl.unlockedOutfits.Count; l++)
                    {
                        if (l != playerFileGirl.girlDefinition.defaultOutfitIndex && l != 6)
                        {
                            num += 0.046875f;
                        }
                    }
                }
                Logger.LogDebug(num);
            }
            for (int m = 0; m < Game.Persistence.playerFile.girlPairs.Count; m++)
            {
                PlayerFileGirlPair playerFileGirlPair = Game.Persistence.playerFile.girlPairs[m];
                if (!playerFileGirlPair.girlPairDefinition.specialPair)
                {
                    GirlPairRelationshipType relationshipType = playerFileGirlPair.relationshipType;
                    if (relationshipType >= GirlPairRelationshipType.COMPATIBLE)
                    {
                        num += 0.25f;
                    }
                    if (relationshipType >= GirlPairRelationshipType.ATTRACTED)
                    {
                        num += 1f;
                    }
                    if (relationshipType >= GirlPairRelationshipType.LOVERS)
                    {
                        num += 1f;
                    }
                }
            }
            Logger.LogDebug(num);
        }
Exemplo n.º 3
0
 public CutsceneStepInfo(CutsceneStepType stepType,
                         CutsceneStepProceedType proceedType,
                         CutsceneStepDollTargetType dollTargetType,
                         GirlExpressionType expressionType,
                         DollOrientationType targetDollOrientation,
                         DollPositionType dollPositionType,
                         CutsceneStepAnimationType animationType,
                         CutsceneStepSubCutsceneType subCutsceneType,
                         GirlPairRelationshipType girlPairRelationshipType,
                         CutsceneStepNotificationType notificationType,
                         string specialStepPrefabName,
                         string bannerTextPrefabName,
                         string windowPrefabName,
                         string emitterBehaviorName,
                         string stringValue,
                         float floatValue,
                         float proceedFloat,
                         int targetGirlDefinitionID,
                         int girlDefinitionID,
                         int expressionIndex,
                         int hairstyleIndex,
                         int outfitIndex,
                         int intValue,
                         int easeType,
                         int editorSelectedBranchIndex,
                         int dialogTriggerDefinitionID,
                         int editorSelectedOptionIndex,
                         int subCutsceneDefinitionID,
                         bool skipStep,
                         bool targetAlt,
                         bool boolValue,
                         bool setMood,
                         bool proceedBool,
                         LogicActionInfo logicActionInfo,
                         DialogLineInfo dialogLineInfo,
                         AudioKlipInfo audioKlipInfo,
                         VectorInfo positionInfo,
                         List <CutsceneDialogOptionInfo> dialogOptionInfos,
                         List <CutsceneBranchInfo> branchInfos)
 {
     SkipStep                  = skipStep;
     StepType                  = stepType;
     ProceedType               = proceedType;
     DollTargetType            = dollTargetType;
     TargetGirlDefinitionID    = targetGirlDefinitionID;
     TargetDollOrientation     = targetDollOrientation;
     TargetAlt                 = targetAlt;
     BoolValue                 = boolValue;
     IntValue                  = intValue;
     FloatValue                = floatValue;
     StringValue               = stringValue;
     EaseType                  = easeType;
     EditorSelectedBranchIndex = editorSelectedBranchIndex;
     BranchInfos               = branchInfos;
     LogicActionInfo           = logicActionInfo;
     SpecialStepPrefabName     = specialStepPrefabName;
     ExpressionType            = expressionType;
     SetMood                   = setMood;
     DialogLineInfo            = dialogLineInfo;
     DialogTriggerDefinitionID = dialogTriggerDefinitionID;
     EditorSelectedOptionIndex = editorSelectedOptionIndex;
     DialogOptionInfos         = dialogOptionInfos;
     DollPositionType          = dollPositionType;
     GirlDefinitionID          = girlDefinitionID;
     ExpressionIndex           = expressionIndex;
     HairstyleIndex            = hairstyleIndex;
     OutfitIndex               = outfitIndex;
     BannerTextPrefabName      = bannerTextPrefabName;
     AnimationType             = animationType;
     SubCutsceneType           = subCutsceneType;
     SubCutsceneDefinitionID   = subCutsceneDefinitionID;
     GirlPairRelationshipType  = girlPairRelationshipType;
     WindowPrefabName          = windowPrefabName;
     AudioKlipInfo             = audioKlipInfo;
     EmitterBehaviorName       = emitterBehaviorName;
     PositionInfo              = positionInfo;
     NotificationType          = notificationType;
     ProceedBool               = proceedBool;
     ProceedFloat              = proceedFloat;
 }
Exemplo n.º 4
0
        private void Update() //called by Unity every frame
        {
            if (!Game.Manager)
            {
                return;                //don't run update code before Game.Manager exists
            }
            BasePatches.Update(); CheatPatches.Update(); InputPatches.Update(); RunTimerPatches.Update();

            if (tooltip != null)
            {
                if (tooltipTimer.ElapsedMilliseconds > tooltipLength)
                {
                    tooltipTimer.Reset();
                    tooltip.Hide();
                    tooltip = null;
                }
            }
            //if tooltip became null, stop timer
            else
            {
                tooltipTimer.Reset();
            }

            //Check for the Return hotkey
            if (ResetKey.Value.IsDown() || ResetKey2.Value.IsDown())
            {
                if (UnloadGame())
                {
                    hasReturned             = true;
                    BasePatches.searchForMe = -111;
                    if (run != null)
                    {
                        run.reset();
                        run = null;
                    }
                }
            }

            if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
            {
                //display the splits folder on Ctrl+S
                if (Input.GetKeyDown(KeyCode.S))
                {
                    if (Game.Manager.Ui.currentCanvas.titleCanvas)
                    {
                        System.Diagnostics.Process.Start(Directory.GetCurrentDirectory() + "/splits");
                    }

                    /*
                     * else if (run != null)
                     * {
                     *  run.save();
                     *  ShowNotif("Run saved!", 2);
                     * }*/
                    //don't allow saving midrun, could be done accidentally
                }
                //reset run on Ctrl+R
                if (Input.GetKeyDown(KeyCode.R) && run != null)
                {
                    run.reset(true);
                    ShowNotif("Run reset!", 2);
                }
                //quit run on Ctrl+Q
                if (Input.GetKeyDown(KeyCode.Q) && run != null)
                {
                    run.reset(false);
                    ShowNotif("Run quit!", 2);
                }
            }

            //if currently in a puzzle, and the status bar is up, and it's not nonstop mode, send data to autosplitters
            if (!Game.Manager.Ui.currentCanvas.titleCanvas && Game.Session && Game.Session.Puzzle.isPuzzleActive &&
                !Game.Session.gameCanvas.cellphone.isOpen && Game.Session.Puzzle.puzzleStatus.statusType != PuzzleStatusType.NONSTOP)
            {
                //this is a possibly bold but necessary assumption to make about cellphone._currentApp
                UiCellphoneAppStatus status = (UiCellphoneAppStatus)AccessTools.Field(typeof(UiCellphone), "_currentApp").GetValue(Game.Session.gameCanvas.cellphone);
                bool isBonusRound           = Game.Session.Puzzle.puzzleStatus.bonusRound;
                if (status.affectionMeter.currentValue == 0)
                {
                    startingRelationshipType = Game.Persistence.playerFile.GetPlayerFileGirlPair(Game.Session.Location.currentGirlPair).relationshipType;
                    startingCompletedPairs   = Game.Persistence.playerFile.completedGirlPairs.Count;
                }
                if (status.affectionMeter.currentValue == status.affectionMeter.maxValue &&
                    (Game.Session.gameCanvas.puzzleGrid.roundState == PuzzleRoundState.SUCCESS || isBonusRound))
                {
                    if (!splitThisDate && run != null)
                    {
                        bool didSplit = false;
                        //always split for the two tutorial splits
                        if (Game.Session.Location.currentGirlPair.girlDefinitionOne.girlName == "Kyu")
                        {
                            didSplit = run.split(isBonusRound);
                        }
                        //don't split for dates in 48 Shoes, or in postgame
                        else if (run.goal != 48 && Game.Persistence.playerFile.storyProgress < 13)
                        {
                            if (run.goal == 1 || SplitRules.Value <= 0)
                            {
                                didSplit = run.split(isBonusRound);
                            }
                            else if (SplitRules.Value == 1 && !isBonusRound)
                            {
                                didSplit = run.split(isBonusRound);
                            }
                            else if (SplitRules.Value == 2 && isBonusRound)
                            {
                                didSplit = run.split(isBonusRound);
                            }
                            //check for final split regardless of option
                            else if (isBonusRound && (run.goal == startingCompletedPairs + 1 ||
                                                      (run.goal == 25 && Game.Session.Puzzle.puzzleStatus.statusType == PuzzleStatusType.BOSS)))
                            {
                                didSplit = run.split(isBonusRound);
                            }
                        }
                        if (didSplit)
                        {
                            //initiate the timers for displaying and removing our split times
                            RunTimerPatches.initialTimerDelay.Start();
                            if (!isBonusRound)
                            {
                                RunTimerPatches.undoTimer.Start();
                            }

                            GirlPairDefinition pair = Game.Session.Location.currentGirlPair;
                            int dateNum             = 1;
                            if (startingRelationshipType == GirlPairRelationshipType.ATTRACTED)
                            {
                                dateNum = 2;
                            }
                            if (isBonusRound)
                            {
                                dateNum = 3;
                            }
                            //Kyu pair starts at ATTRACTED (2) and her bonus should be 2, not 3, so this is the easiest way
                            if (pair.girlDefinitionOne.girlName == "Kyu")
                            {
                                dateNum--;
                            }
                            if (Game.Session.Puzzle.puzzleStatus.statusType == PuzzleStatusType.BOSS)
                            {
                                dateNum = 5 - (Game.Session.Puzzle.puzzleStatus.girlListCount / 2);
                            }
                            string newSplit = pair.girlDefinitionOne.girlName + " & " + pair.girlDefinitionTwo.girlName;
                            //don't put a number on the date if they started as lovers, or it's nonstop mode? (for 100%)
                            //the storyProgress check probably makes this pointless
                            if (startingRelationshipType != GirlPairRelationshipType.LOVERS &&
                                Game.Session.Puzzle.puzzleStatus.statusType != PuzzleStatusType.NONSTOP)
                            {
                                newSplit += " #" + dateNum;
                            }
                            newSplit += "\n      " + run.splitText + "\n";
                            run.push(newSplit);

                            if (isBonusRound && pair.girlDefinitionOne.girlName != "Kyu")
                            {
                                //I think it's possible that, with a huge chain reaction, completedGirlPairs.Count might not have updated yet
                                //so use the number from before the date, +1
                                //funnily enough, that also makes the final boss's goal of "25" count
                                //but I'll leave the double-check there
                                if (run.goal == startingCompletedPairs + 1 ||
                                    (run.goal == 25 && Game.Session.Puzzle.puzzleStatus.statusType == PuzzleStatusType.BOSS))
                                {
                                    Logger.LogMessage("initiating run.save");
                                    if (run.rerollOccurred)
                                    {
                                        run.push("\n(Rerolled for Lillian)\n");
                                    }
                                    //run.save();
                                    RunTimerPatches.savePBDelay.Start();
                                }
                            }
                        }
                    }

                    if (isBonusRound)
                    {
                        BasePatches.searchForMe = 200;
                    }
                    else
                    {
                        BasePatches.searchForMe = 100;
                    }

                    splitThisDate = true;
                }

                else
                {
                    BasePatches.searchForMe = 0;
                    splitThisDate           = false;
                }
            }

            //title-screen only options, to prevent non-vanilla things happening midrun
            if (Game.Manager.Ui.currentCanvas.titleCanvas)
            {
                UiTitleCanvas tc        = (UiTitleCanvas)Game.Manager.Ui.currentCanvas;
                bool          isLoading = (bool)AccessTools.Field(typeof(UiTitleCanvas), "_loadingGame").GetValue(tc);
                //display New Version tooltip for 10 seconds
                if (newVersionAvailable && !alertedOfUpdate)
                {
                    alertedOfUpdate = true;
                    ShowTooltip("Update Available!\nClick on Credits!", 10000, 0, 45);
                }

                if (!InputPatches.codeScreen && Input.GetKeyDown(KeyCode.A))
                {
                    CodeDefinition codeDefinition = Game.Data.Codes.Get(ABIAHAIR);
                    if (!Game.Persistence.playerData.unlockedCodes.Contains(codeDefinition))
                    {
                        Game.Persistence.playerData.unlockedCodes.Add(codeDefinition);
                        ShowTooltip("Abia's Hair Enabled!", 2000);
                    }
                    else
                    {
                        Game.Persistence.playerData.unlockedCodes.Remove(codeDefinition);
                        ShowTooltip("Abia's Hair Disabled!", 2000);
                    }
                    Game.Manager.Ui.currentCanvas.GetComponent <UiTitleCanvas>().coverArt.Refresh();
                }

                //check for Kyu outfits
                if (Input.GetKey(KeyCode.K))
                {
                    bool hairstyle = (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl));
                    for (int i = (int)KeyCode.Alpha0; i <= (int)KeyCode.Alpha5; i++)
                    {
                        //Alpha0 = 48, Keypad0 = 256
                        int num = i - 48;
                        if ((Input.GetKeyDown((KeyCode)i) || Input.GetKeyDown((KeyCode)(i + 208))))
                        {
                            SetKyuOutfit(num, hairstyle);
                            string s = "Kyu ";
                            if (hairstyle)
                            {
                                s += "Hairstyle #";
                            }
                            else
                            {
                                s += "Outfit #";
                            }
                            s += num + " Chosen!";
                            ShowTooltip(s, 2000);
                        }
                    }
                }

                //check for the Cheat Mode hotkey
                if (!InputPatches.codeScreen && cheatsEnabled == false && !isLoading && CheatHotkey.Value.IsDown())
                {
                    Game.Manager.Audio.Play(AudioCategory.SOUND, Game.Manager.Ui.sfxReject);
                    PlayCheatLine();
                    Harmony.CreateAndPatchAll(typeof(CheatPatches), null);
                    CheatPatches.UnlockAllCodes();
                    ShowTooltip("Cheat Mode Activated!", 2000, 0, 30);
                    cheatsEnabled = true;
                }
            }
        }
Exemplo n.º 5
0
        public CutsceneStepInfo(CutsceneStepSubDefinition cutsceneStep, AssetProvider assetProvider)
        {
            if (cutsceneStep == null)
            {
                throw new ArgumentNullException(nameof(cutsceneStep));
            }
            if (assetProvider == null)
            {
                throw new ArgumentNullException(nameof(assetProvider));
            }

            SkipStep                  = cutsceneStep.skipStep;
            StepType                  = cutsceneStep.stepType;
            ProceedType               = cutsceneStep.proceedType;
            DollTargetType            = cutsceneStep.dollTargetType;
            TargetDollOrientation     = cutsceneStep.targetDollOrientation;
            TargetAlt                 = cutsceneStep.targetAlt;
            BoolValue                 = cutsceneStep.boolValue;
            IntValue                  = cutsceneStep.intValue;
            FloatValue                = cutsceneStep.floatValue;
            StringValue               = cutsceneStep.stringValue;
            EaseType                  = (int)cutsceneStep.easeType;
            EditorSelectedBranchIndex = cutsceneStep.editorSelectedBranchIndex;
            ExpressionType            = cutsceneStep.expressionType;
            SetMood = cutsceneStep.setMood;
            EditorSelectedOptionIndex = cutsceneStep.editorSelectedOptionIndex;
            DollPositionType          = cutsceneStep.dollPositionType;
            ExpressionIndex           = cutsceneStep.expressionIndex;
            HairstyleIndex            = cutsceneStep.hairstyleIndex;
            OutfitIndex              = cutsceneStep.outfitIndex;
            AnimationType            = cutsceneStep.animationType;
            SubCutsceneType          = cutsceneStep.subCutsceneType;
            GirlPairRelationshipType = cutsceneStep.girlPairRelationshipType;
            NotificationType         = cutsceneStep.notificationType;
            ProceedBool              = cutsceneStep.proceedBool;
            ProceedFloat             = cutsceneStep.proceedFloat;

            SubCutsceneDefinitionID   = cutsceneStep.subCutsceneDefinition?.id ?? -1;
            DialogTriggerDefinitionID = cutsceneStep.dialogTriggerDefinition?.id ?? -1;
            GirlDefinitionID          = cutsceneStep.girlDefinition?.id ?? -1;
            TargetGirlDefinitionID    = cutsceneStep.targetGirlDefinition?.id ?? -1;

            assetProvider.NameAndAddAsset(ref SpecialStepPrefabName, cutsceneStep.specialStepPrefab);
            assetProvider.NameAndAddAsset(ref WindowPrefabName, cutsceneStep.windowPrefab);
            assetProvider.NameAndAddAsset(ref EmitterBehaviorName, cutsceneStep.emitterBehavior);
            assetProvider.NameAndAddAsset(ref BannerTextPrefabName, cutsceneStep.bannerTextPrefab);

            if (cutsceneStep.audioKlip != null)
            {
                AudioKlipInfo = new AudioKlipInfo(cutsceneStep.audioKlip, assetProvider);
            }
            if (cutsceneStep.position != null)
            {
                PositionInfo = new VectorInfo(cutsceneStep.position);
            }
            if (cutsceneStep.dialogLine != null)
            {
                DialogLineInfo = new DialogLineInfo(cutsceneStep.dialogLine, assetProvider);
            }
            if (cutsceneStep.logicAction != null)
            {
                LogicActionInfo = new LogicActionInfo(cutsceneStep.logicAction, assetProvider);
            }

            if (cutsceneStep.dialogOptions != null)
            {
                DialogOptionInfos = cutsceneStep.dialogOptions.Select(x => new CutsceneDialogOptionInfo(x, assetProvider)).ToList();
            }
            if (cutsceneStep.branches != null)
            {
                BranchInfos = cutsceneStep.branches.Select(x => new CutsceneBranchInfo(x, assetProvider)).ToList();
            }
        }