mirror of
				https://github.com/amevarashi/RJW-Sexperience.git
				synced 2024-08-14 23:54:08 +00:00 
			
		
		
		
	Make cum addicts gravitate to blowjobs
This commit is contained in:
		
							parent
							
								
									b3561ba7c4
								
							
						
					
					
						commit
						78480e6eda
					
				
					 3 changed files with 51 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,11 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using Verse;
 | 
			
		||||
using rjw.Modules.Interactions.Internals.Implementation;
 | 
			
		||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using rjw;
 | 
			
		||||
using RJWSexperience.Logs;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -11,6 +16,17 @@ namespace RJWSexperience
 | 
			
		|||
		{
 | 
			
		||||
			var har = new Harmony("RJW_Sexperience");
 | 
			
		||||
			har.PatchAll(Assembly.GetExecutingAssembly());
 | 
			
		||||
 | 
			
		||||
			InjectIntoRjwInteractionServices();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public static void InjectIntoRjwInteractionServices()
 | 
			
		||||
		{
 | 
			
		||||
			var log = LogManager.GetLogger("StaticConstructorOnStartup");
 | 
			
		||||
 | 
			
		||||
			List<IPartPreferenceRule> partKindUsageRules = Unprivater.GetProtectedValue<List<IPartPreferenceRule>>("_partKindUsageRules", typeof(PartPreferenceDetectorService));
 | 
			
		||||
			partKindUsageRules.Add(new Interactions.CumAddictPartKindUsageRule());
 | 
			
		||||
			log.Message("Added 1 rule to PartPreferenceDetectorService._partKindUsageRules");
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
using rjw.Modules.Interactions.Contexts;
 | 
			
		||||
using rjw.Modules.Interactions.Enums;
 | 
			
		||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
 | 
			
		||||
using rjw.Modules.Shared;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Interactions
 | 
			
		||||
{
 | 
			
		||||
	public class CumAddictPartKindUsageRule : IPartPreferenceRule
 | 
			
		||||
	{
 | 
			
		||||
		public IEnumerable<Weighted<LewdablePartKind>> ModifiersForDominant(InteractionContext context)
 | 
			
		||||
		{
 | 
			
		||||
			if (context.Internals.Dominant.Pawn.health?.hediffSet?.HasHediff(VariousDefOf.CumAddiction) ?? false)
 | 
			
		||||
			{
 | 
			
		||||
				// Cum addicts are really eager to use mouth
 | 
			
		||||
				yield return new Weighted<LewdablePartKind>(Multipliers.DoubledPlus, LewdablePartKind.Mouth);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public IEnumerable<Weighted<LewdablePartKind>> ModifiersForSubmissive(InteractionContext context)
 | 
			
		||||
		{
 | 
			
		||||
			Logs.LogManager.GetLogger<CumAddictPartKindUsageRule, Logs.DebugLogProvider>().Warning($"Called for {context.Internals.Submissive.Pawn.NameShortColored}");
 | 
			
		||||
 | 
			
		||||
			if (context.Internals.Submissive.Pawn.health?.hediffSet?.HasHediff(VariousDefOf.CumAddiction) ?? false)
 | 
			
		||||
			{
 | 
			
		||||
				// Cum addicts are really eager to use mouth
 | 
			
		||||
				yield return new Weighted<LewdablePartKind>(Multipliers.DoubledPlus, LewdablePartKind.Mouth);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -75,6 +75,7 @@
 | 
			
		|||
    <Compile Include="GlobalSuppressions.cs" />
 | 
			
		||||
    <Compile Include="Harmony.cs" />
 | 
			
		||||
    <Compile Include="IngestionOutcomeDoers.cs" />
 | 
			
		||||
    <Compile Include="Interactions\CumAddictPartKindUsageRule.cs" />
 | 
			
		||||
    <Compile Include="JobDrivers.cs" />
 | 
			
		||||
    <Compile Include="Logs\DebugLogProvider.cs" />
 | 
			
		||||
    <Compile Include="Logs\LogManager.cs" />
 | 
			
		||||
| 
						 | 
				
			
			@ -93,8 +94,9 @@
 | 
			
		|||
    <Compile Include="SexperienceMod.cs" />
 | 
			
		||||
    <Compile Include="FilterWorkers\SpecialThingFilterWorker_Cum.cs" />
 | 
			
		||||
    <Compile Include="StatParts.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\ThoughtDef_Opinionbased.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\ThoughtDef_Recordbased.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\ThoughtDefExtension_IncreaseRecord.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\ThoughtDefExtension_StageFromOpinion.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\ThoughtDefExtension_StageFromRecord.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\Thought_AteCum.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\Thought_IncreaseRecord.cs" />
 | 
			
		||||
    <Compile Include="Thoughts\Thought_Opinionbased.cs" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue