public GirlPairFavQuestionSubDefinition ToGirlPairFavQuestion(GameData gameData) { var newDef = new GirlPairFavQuestionSubDefinition(); newDef.girlResponseIndexOne = GirlResponceIndexOne; newDef.girlResponseIndexTwo = GirlResponceIndexTwo; newDef.questionDefinition = gameData.Questions.Get(QuestionDefinitionID); return(newDef); }
public GirlPairFavQuestionInfo(GirlPairFavQuestionSubDefinition girlPairFavQuestion) { if (girlPairFavQuestion == null) { throw new ArgumentNullException(nameof(girlPairFavQuestion)); } GirlResponceIndexOne = girlPairFavQuestion.girlResponseIndexOne; GirlResponceIndexTwo = girlPairFavQuestion.girlResponseIndexTwo; QuestionDefinitionID = girlPairFavQuestion.questionDefinition?.id ?? -1; }
public static void ExperimentalAllPairsMod(bool specialsToo = false) { Dictionary <int, GirlPairDefinition> allPairs = (Dictionary <int, GirlPairDefinition>)AccessTools.Field(typeof(GirlPairData), "_definitions").GetValue(Game.Data.GirlPairs); if (specialsToo) { foreach (GirlDefinition g in Game.Data.Girls.GetAll()) { g.specialCharacter = false; g.baggageItemDefs.Add(Game.Data.Ailments.Get(UnityEngine.Random.Range(1, 37)).itemDefinition); g.baggageItemDefs.Add(Game.Data.Ailments.Get(UnityEngine.Random.Range(1, 37)).itemDefinition); g.baggageItemDefs.Add(Game.Data.Ailments.Get(UnityEngine.Random.Range(1, 37)).itemDefinition); if (g.cellphoneHead == null) { g.cellphoneHead = g.cellphonePortrait; } } } List <GirlPairDefinition> stockPairs = Game.Data.GirlPairs.GetAllBySpecial(false); int startingID = 27; int maxGirls = 12; if (specialsToo) { startingID = 69; maxGirls = 15; } for (int i = 1; i <= maxGirls - 1; i++) { for (int j = i + 1; j <= maxGirls; j++) { bool addThis = true; for (int k = 0; k < stockPairs.Count; k++) { if (stockPairs[k].HasGirlDef(Game.Data.Girls.Get(i)) && stockPairs[k].HasGirlDef(Game.Data.Girls.Get(j))) { addThis = false; } } if (addThis) { GirlPairDefinition gpd = ScriptableObject.CreateInstance <GirlPairDefinition>(); gpd.girlDefinitionOne = Game.Data.Girls.Get(i); gpd.girlDefinitionTwo = Game.Data.Girls.Get(j); gpd.id = startingID; startingID++; gpd.specialPair = false; gpd.introductionPair = false; gpd.introSidesFlipped = false; gpd.photoDefinition = Game.Data.Photos.Get(1); gpd.meetingLocationDefinition = Game.Data.Locations.GetAllByLocationType(LocationType.SIM)[0]; gpd.hasMeetingStyleOne = false; gpd.meetingStyleTypeOne = GirlStyleType.SEXY; gpd.meetingStyleTypeTwo = GirlStyleType.SEXY; gpd.hasMeetingStyleTwo = false; gpd.sexDaytime = ClockDaytimeType.AFTERNOON; gpd.sexLocationDefinition = Game.Data.Locations.GetAllByLocationType(LocationType.DATE)[0]; gpd.sexStyleTypeOne = GirlStyleType.SEXY; gpd.sexStyleTypeTwo = GirlStyleType.SEXY; gpd.relationshipCutsceneDefinitions = Game.Data.GirlPairs.Get(1).relationshipCutsceneDefinitions; List <GirlPairFavQuestionSubDefinition> Qs = new List <GirlPairFavQuestionSubDefinition>(); //oops all this code was actually useless, no unused pairs have any similarities /* * for (int answer = 0; answer < gpd.girlDefinitionOne.favAnswers.Count && answer < gpd.girlDefinitionTwo.favAnswers.Count; answer++) * { * if (gpd.girlDefinitionOne.favAnswers[answer] == gpd.girlDefinitionTwo.favAnswers[answer]) * { * GirlPairFavQuestionSubDefinition q = new GirlPairFavQuestionSubDefinition(); * q.questionDefinition = Game.Data.Questions.Get(answer + 1); * q.girlResponseIndexOne = Qs.Count; * q.girlResponseIndexTwo = Qs.Count; * Qs.Add(q); * } * }*/ //add a "random" favorite question just so the game doesn't crash if (Qs.Count == 0) { GirlPairFavQuestionSubDefinition q = new GirlPairFavQuestionSubDefinition(); q.questionDefinition = Game.Data.Questions.Get(gpd.id % 20 + 1); q.girlResponseIndexOne = Qs.Count; q.girlResponseIndexTwo = Qs.Count; Qs.Add(q); } gpd.favQuestions = Qs; allPairs.Add(gpd.id, gpd); } } } GirlPairDefinition test = Game.Data.GirlPairs.GetAllBySpecial(false)[Game.Data.GirlPairs.GetAllBySpecial(false).Count - 1]; Logger.LogDebug("pair count: " + Game.Data.GirlPairs.GetAllBySpecial(false).Count); foreach (GirlPairDefinition tester in Game.Data.GirlPairs.GetAllBySpecial(false)) { Logger.LogDebug(tester.girlDefinitionOne.girlName + " " + tester.girlDefinitionTwo.girlName + " " + tester.id); } }