mirror of
				https://gitgud.io/Ed86/rjw-fb.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	fix harmony
This commit is contained in:
		
							parent
							
								
									71247fde8e
								
							
						
					
					
						commit
						9e6f25fb9b
					
				
					 1 changed files with 19 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -3,20 +3,35 @@ using RimWorld;
 | 
			
		|||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
 | 
			
		||||
namespace rjwfb
 | 
			
		||||
{
 | 
			
		||||
	[StaticConstructorOnStartup]
 | 
			
		||||
public static class HarmonyPatches
 | 
			
		||||
	internal static class InitHarmonyPatches
 | 
			
		||||
	{
 | 
			
		||||
		static InitHarmonyPatches()
 | 
			
		||||
		{
 | 
			
		||||
			var har = new Harmony("rjw.FB");
 | 
			
		||||
			har.PatchAll(Assembly.GetExecutingAssembly());
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(AfterSexUtility), "think_about_sex", new Type[] { typeof(Pawn), typeof(Pawn), typeof(bool), typeof(SexProps), typeof(bool) })]
 | 
			
		||||
	[StaticConstructorOnStartup]
 | 
			
		||||
	static class Beautyfuck_AfterSexUtility_think_about_sex
 | 
			
		||||
	{
 | 
			
		||||
		public static readonly ThoughtDef RJW_Beautyfuck = DefDatabase<ThoughtDef>.GetNamed("RJW_Beautyfuck");
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(AfterSexUtility), "think_about_sex")]
 | 
			
		||||
	static class Beautyfuck_AfterSexUtility_think_about_sex
 | 
			
		||||
	{
 | 
			
		||||
		[HarmonyPostfix]
 | 
			
		||||
		public static void think_about_sex_Patch(Pawn pawn, Pawn partner, bool isReceiving, SexProps props, bool whoring = false)
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				if (partner == null)
 | 
			
		||||
				{
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				var p1 = pawn;
 | 
			
		||||
				var p2 = partner;
 | 
			
		||||
				var p2beauty = p2.GetStatValue(StatDefOf.PawnBeauty, true);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue