mirror of
				https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	patch for rmb menu joinninbed job
This commit is contained in:
		
							parent
							
								
									4f6fc144e1
								
							
						
					
					
						commit
						49c9ca341d
					
				
					 4 changed files with 26 additions and 4 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -104,6 +104,7 @@
 | 
				
			||||||
    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_DrawSemen.cs" />
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_DrawSemen.cs" />
 | 
				
			||||||
    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JobDriver_SexBaseInitiator.cs" />
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JobDriver_SexBaseInitiator.cs" />
 | 
				
			||||||
    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JoinInBedGiveJob.cs" />
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_JoinInBedGiveJob.cs" />
 | 
				
			||||||
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_PlayAnimJoinInBedRMB.cs" />
 | 
				
			||||||
    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_SexTick.cs" />
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_SexTick.cs" />
 | 
				
			||||||
    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_WorkGiverSex.cs" />
 | 
					    <Compile Include="Source\Patches\rjwPatches\HarmonyPatch_WorkGiverSex.cs" />
 | 
				
			||||||
    <Compile Include="Source\Settings\AnimationSettings.cs" />
 | 
					    <Compile Include="Source\Settings\AnimationSettings.cs" />
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,10 +22,6 @@ namespace Rimworld_Animations {
 | 
				
			||||||
				return;
 | 
									return;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if(__instance is JobDriver_JoinInBed) {
 | 
					 | 
				
			||||||
				Log.Warning("Playing regular RJW joininbed jobdriver, if it animates properly ignore this warning");	
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			Pawn pawn = __instance.pawn;
 | 
								Pawn pawn = __instance.pawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			Building_Bed bed = __instance.Bed;
 | 
								Building_Bed bed = __instance.Bed;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,25 @@
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					using RimWorld;
 | 
				
			||||||
 | 
					using Verse.AI;
 | 
				
			||||||
 | 
					using rjw;
 | 
				
			||||||
 | 
					using HarmonyLib;
 | 
				
			||||||
 | 
					using Verse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Rimworld_Animations {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    [HarmonyPatch(typeof(Pawn_JobTracker), "TryTakeOrderedJob")]
 | 
				
			||||||
 | 
					    class HarmonyPatch_PlayAnimJoinInBedRMB {
 | 
				
			||||||
 | 
					        public static void Prefix(ref Job job) {
 | 
				
			||||||
 | 
					            if(job.def == xxx.casual_sex) {
 | 
				
			||||||
 | 
					                Log.Message("Replacing vanilla RJW JoinInBed JobDriver for animation JobDriver");
 | 
				
			||||||
 | 
					                job = new Job(DefDatabase<JobDef>.GetNamed("JoinInBedAnimation", true), job.targetA, job.targetB, job.targetC);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue