mirror of
				https://gitgud.io/c0ffeeeeeeee/coffees-rjw-ideology-addons.git
				synced 2024-08-14 23:57:38 +00:00 
			
		
		
		
	fixed bug relating to mechs and pawns with no relations defined
This commit is contained in:
		
							parent
							
								
									5d3e7d94a3
								
							
						
					
					
						commit
						25fba08b2d
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -18,7 +18,8 @@ namespace C0ffee_s_RJW_Ideology_Addons
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static void Prefix(JobDriver_SexBaseInitiator __instance)
 | 
					        public static void Prefix(JobDriver_SexBaseInitiator __instance)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (__instance is JobDriver_Masturbate || __instance.Partner == null) return;
 | 
					            if (__instance is JobDriver_Masturbate || __instance.Partner == null
 | 
				
			||||||
 | 
					                || __instance.pawn?.relations == null || __instance.pawn.RaceProps.IsMechanoid) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            HistoryEventDef def = __instance.pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, __instance.Partner) ? HistoryEventDefOf.GotLovin_Spouse : HistoryEventDefOf.GotLovin_NonSpouse;
 | 
					            HistoryEventDef def = __instance.pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, __instance.Partner) ? HistoryEventDefOf.GotLovin_Spouse : HistoryEventDefOf.GotLovin_NonSpouse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue