diff --git a/Common/Assemblies/Rjw-Genes.dll b/Common/Assemblies/Rjw-Genes.dll index f89611e..df5976d 100644 Binary files a/Common/Assemblies/Rjw-Genes.dll and b/Common/Assemblies/Rjw-Genes.dll differ diff --git a/Common/Defs/HediffDefs/Hediffs_Genes.xml b/Common/Defs/HediffDefs/Hediffs_Genes.xml index bebfce9..49ae6e1 100644 --- a/Common/Defs/HediffDefs/Hediffs_Genes.xml +++ b/Common/Defs/HediffDefs/Hediffs_Genes.xml @@ -18,9 +18,9 @@
  • false - + 2 - +
  • diff --git a/Source/First.cs b/Source/First.cs index aa366ab..e322c58 100644 --- a/Source/First.cs +++ b/Source/First.cs @@ -20,6 +20,9 @@ namespace RJW_Genes } //Modified code from https://gitgud.io/lutepickle/rjw_menstruation/-/tree/main/1.4/source/RJW_Menstruation/RJW_Menstruation + //Summary// + //Adds our own partpreferences to rjw's list. Our partpreferences are under Interactions.GenesPartKindUsageRule + // private static void AddtoIPartPreferenceRule() { List partPreferenceRules = Unprivater.GetProtectedValue>("_partKindUsageRules", typeof(PartPreferenceDetectorService)); diff --git a/Source/Genes/Cum/CumUtility.cs b/Source/Genes/Cum/CumUtility.cs index 9ad535a..13197e1 100644 --- a/Source/Genes/Cum/CumUtility.cs +++ b/Source/Genes/Cum/CumUtility.cs @@ -34,7 +34,7 @@ namespace RJW_Genes } - //Get total fluidamount a persom has. + //Get total fluidamount a person has. public static float GetTotalFluidAmount(Pawn pawn, float multiplier = 1f) { var partBPR = Genital_Helper.get_genitalsBPR(pawn); diff --git a/Source/Genes/Life_Force/Gene_LifeForce.cs b/Source/Genes/Life_Force/Gene_LifeForce.cs index fcc5bcb..172c43b 100644 --- a/Source/Genes/Life_Force/Gene_LifeForce.cs +++ b/Source/Genes/Life_Force/Gene_LifeForce.cs @@ -39,7 +39,7 @@ namespace RJW_Genes yield break; } - //Depending on how low the value is it will increase sexdrive and if it reaches zero it will create a random rape mental break. + //Depending on how low the value is it will increase sexdrive and if it reaches zero it will create a mental break which will make the pawn rape others. //Not using base.Tick() as it is used to start mental breaks, but we have another way to do it. public override void Tick() { diff --git a/Source/Genes/Life_Force/Patch_LifeForce.cs b/Source/Genes/Life_Force/Patch_LifeForce.cs index 3aa953e..5c73e6d 100644 --- a/Source/Genes/Life_Force/Patch_LifeForce.cs +++ b/Source/Genes/Life_Force/Patch_LifeForce.cs @@ -14,7 +14,6 @@ namespace RJW_Genes [HarmonyPatch(typeof(SexUtility), nameof(SexUtility.SatisfyPersonal))] public static class Patch_LifeForce { - public static void Postfix(SexProps props) { // ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation) @@ -27,7 +26,7 @@ namespace RJW_Genes { Pawn_GeneTracker genes = props.pawn.genes; Gene_LifeForce gene = genes.GetFirstGeneOfType(); - gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner); //total amount may need to be modified to be balanced + gene.Resource.Value += CumUtility.GetTotalFluidAmount(props.partner); //total amount may need to be modified to be balanced or maybe I should just consider one at random } } } diff --git a/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs b/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs index 267f625..02e51de 100644 --- a/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs +++ b/Source/Genes/Special/Gene_Aphrodisiac_Pheromones_.cs @@ -12,6 +12,8 @@ namespace RJW_Genes { public class Gene_Aphrodisiac_Pheromones : Gene { + + //Summary one every one check for all pawns nearby and in line of sight and add/renew a hediff which increases sexdrive for six hours. public override void Tick() { base.Tick(); @@ -24,11 +26,12 @@ namespace RJW_Genes } } + //Creatus an IEnumerable of all pawns which are closeby and in lineofsight private IEnumerable AffectedPawns(IntVec3 pos, Map map) { foreach (Pawn pawn in map.mapPawns.AllPawns) { - if (pos.DistanceTo(pawn.Position) < 5) + if (pos.DistanceTo(pawn.Position) < 5 && GenSight.LineOfSight(pos, pawn.Position, pawn.Map)) { yield return pawn; } @@ -37,6 +40,7 @@ namespace RJW_Genes yield break; } + //Applies er renews a hediff which increases sexdrive for 6 hours private void InduceAphrodisiac(Pawn pawn) { Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.Aphrodisiac_Pheromone); diff --git a/Source/Interactions/GenesPartKindUsageRule.cs b/Source/Interactions/GenesPartKindUsageRule.cs index f3f5196..aae65b0 100644 --- a/Source/Interactions/GenesPartKindUsageRule.cs +++ b/Source/Interactions/GenesPartKindUsageRule.cs @@ -9,7 +9,10 @@ using Verse; namespace RJW_Genes.Interactions { - public class GenesPartKindUsageRule : IPartPreferenceRule + //Summary// + //Set custom preferences for pawn. Gets integrated to rjw by AddtoIPartPreferenceRule in First + //Depending on the level of lifeforce increase the chance for using the mouth. + public class GenesPartKindUsageRule : IPartPreferenceRule { public IEnumerable> ModifiersForDominant(InteractionContext context) {