mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Handle cycles for unspawned pawns
This commit is contained in:
		
							parent
							
								
									d9dc79f107
								
							
						
					
					
						commit
						b9ffcc0dc5
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -1248,7 +1248,6 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected void BleedOut()
 | 
			
		||||
        {
 | 
			
		||||
            //FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, ThingDefOf.Filth_Blood,parent.pawn.Label);
 | 
			
		||||
            CumIn(parent.pawn, Rand.Range(0.02f * Configurations.BleedingAmount, 0.04f * Configurations.BleedingAmount), Translations.Menstrual_Blood, -5.0f, parent.pawn.def.race?.BloodDef ?? ThingDefOf.Filth_Blood);
 | 
			
		||||
            Cum blood = GetNotCum(Translations.Menstrual_Blood);
 | 
			
		||||
            if (blood != null) blood.Color = BloodColor;
 | 
			
		||||
| 
						 | 
				
			
			@ -1261,6 +1260,7 @@ namespace RJW_Menstruation
 | 
			
		|||
        /// <param name="amount"></param>
 | 
			
		||||
        protected void MakeCumFilth(Cum cum, float amount)
 | 
			
		||||
        {
 | 
			
		||||
            if (parent.pawn.Map == null) return;
 | 
			
		||||
            if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1299,7 +1299,7 @@ namespace RJW_Menstruation
 | 
			
		|||
 | 
			
		||||
        protected float MakeCumFilthMixture(float amount, List<string> cumlabels)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            if (parent.pawn.Map == null) return 0;
 | 
			
		||||
            if (amount >= minmakefilthvalue)
 | 
			
		||||
            {
 | 
			
		||||
                FilthMaker_Colored.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ namespace RJW_Menstruation.Sexperience
 | 
			
		|||
        [HarmonyPatch("HasJobOnThing")]
 | 
			
		||||
        public static bool HasJobOnThing(Pawn pawn, ref bool __result)
 | 
			
		||||
        {
 | 
			
		||||
            if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && pawn.Map.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket))
 | 
			
		||||
            if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && (pawn.Map?.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket) ?? false))
 | 
			
		||||
            {
 | 
			
		||||
                __result = true;
 | 
			
		||||
                return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue