mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Fix cum not diminishing
This commit is contained in:
		
							parent
							
								
									e37940abcf
								
							
						
					
					
						commit
						a023c884d3
					
				
					 4 changed files with 8 additions and 7 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -174,7 +174,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public void MakeThinner(int speed)
 | 
					        public void MakeThinner(float speed)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            cumthickness = cumthickness.LerpMultiple(DecayResist, 0.3f, speed);
 | 
					            cumthickness = cumthickness.LerpMultiple(DecayResist, 0.3f, speed);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -205,8 +205,8 @@ namespace RJW_Menstruation
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // comp is used for Hydrogen's RJW Muscle Injury
 | 
					            // comp is used for Hydrogen's RJW Muscle Injury
 | 
				
			||||||
            float totalleak = volume;
 | 
					            float totalleak = volume;
 | 
				
			||||||
            float decayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumDecayRatio, comp.TickInterval / GenDate.TicksPerHour);
 | 
					            float decayPerInterval = 1 - Mathf.Pow(1 - Configurations.CumDecayRatio, (float)comp.TickInterval / GenDate.TicksPerHour);
 | 
				
			||||||
            float fertilityDecayPerInterval = 1 - Mathf.Pow(Configurations.CumFertilityDecayRatio, comp.TickInterval / GenDate.TicksPerHour);
 | 
					            float fertilityDecayPerInterval = 1 - Mathf.Pow(Configurations.CumFertilityDecayRatio, (float)comp.TickInterval / GenDate.TicksPerHour);
 | 
				
			||||||
            volume *= Math.Max(0, 1 - decayPerInterval * (1 - DecayResist) * leakfactor);
 | 
					            volume *= Math.Max(0, 1 - decayPerInterval * (1 - DecayResist) * leakfactor);
 | 
				
			||||||
            fertility *= Math.Max(0, 1 - (fertilityDecayPerInterval * (1 - DecayResist) + antisperm));
 | 
					            fertility *= Math.Max(0, 1 - (fertilityDecayPerInterval * (1 - DecayResist) + antisperm));
 | 
				
			||||||
            CutMinor();
 | 
					            CutMinor();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1025,15 +1025,16 @@ namespace RJW_Menstruation
 | 
				
			||||||
            if (Pawn.CurJobDef == xxx.knotted) leakfactor = 0f;
 | 
					            if (Pawn.CurJobDef == xxx.knotted) leakfactor = 0f;
 | 
				
			||||||
            foreach (Cum cum in cums)
 | 
					            foreach (Cum cum in cums)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                cum.CumEffects(Pawn);
 | 
					                if (Rand.Chance((float)TickInterval / GenDate.TicksPerHour)) cum.CumEffects(Pawn);
 | 
				
			||||||
                float vd = cum.DismishNatural(leakfactor, this, antisperm);
 | 
					                float vd = cum.DismishNatural(leakfactor, this, antisperm);
 | 
				
			||||||
                cum.MakeThinner(Configurations.CycleAcceleration);
 | 
					                cum.MakeThinner((float)Configurations.CycleAcceleration * TickInterval / GenDate.TicksPerHour);
 | 
				
			||||||
                totalleak += AbsorbCum(vd, absorber);
 | 
					                totalleak += AbsorbCum(vd, absorber);
 | 
				
			||||||
                string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());
 | 
					                string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());
 | 
				
			||||||
                filthlabels.Add(tmp.Replace(" x1", ""));
 | 
					                filthlabels.Add(tmp.Replace(" x1", ""));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            int postCumAmount = Mathf.CeilToInt(TotalCum);
 | 
					            int postCumAmount = Mathf.CeilToInt(TotalCum);
 | 
				
			||||||
            for (int i = 0; i < postCumAmount - preCumAmount; i++)  // Emit a filth every time the integer cum amount drops
 | 
					            int totalFilth = preCumAmount - postCumAmount;
 | 
				
			||||||
 | 
					            for (int i = 0; i < totalFilth; i++)  // Emit a filth every time the integer cum amount drops
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (cums.Count > 1) MakeCumFilthMixture(totalleak, filthlabels);
 | 
					                if (cums.Count > 1) MakeCumFilthMixture(totalleak, filthlabels);
 | 
				
			||||||
                else if (cums.Count == 1) MakeCumFilth(cums.First(), totalleak);
 | 
					                else if (cums.Count == 1) MakeCumFilth(cums.First(), totalleak);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -433,7 +433,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static float LerpMultiple(this float a, float b, float t, int num)
 | 
					        public static float LerpMultiple(this float a, float b, float t, float num)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            float tmult = Mathf.Pow(1 - t, num);
 | 
					            float tmult = Mathf.Pow(1 - t, num);
 | 
				
			||||||
            return tmult * a + (1 - tmult) * b;
 | 
					            return tmult * a + (1 - tmult) * b;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue