mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Move growth/shrink debug info into the widget to not clutter the logs
This commit is contained in:
		
							parent
							
								
									b985f4188d
								
							
						
					
					
						commit
						a5c9ada196
					
				
					 2 changed files with 10 additions and 6 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -54,6 +54,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
        protected float nippleSize = -1f;
 | 
					        protected float nippleSize = -1f;
 | 
				
			||||||
        protected long ageOfLastBirth = 0;
 | 
					        protected long ageOfLastBirth = 0;
 | 
				
			||||||
        protected float breastSizeIncreased = 0f;
 | 
					        protected float breastSizeIncreased = 0f;
 | 
				
			||||||
 | 
					        protected string debugGrowthStatus = "";
 | 
				
			||||||
        protected float originalpha = -1f;
 | 
					        protected float originalpha = -1f;
 | 
				
			||||||
        protected float originareola = -1f;
 | 
					        protected float originareola = -1f;
 | 
				
			||||||
        protected float originnipple = -1f;
 | 
					        protected float originnipple = -1f;
 | 
				
			||||||
| 
						 | 
					@ -67,7 +68,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            get
 | 
					            get
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                float res = parent.pawn.RaceProps.lifeStageAges.ElementAtOrDefault(1).minAge / 2;
 | 
					                float res = parent.pawn.RaceProps.lifeStageAges.ElementAtOrDefault(1).minAge / 2;
 | 
				
			||||||
                if (res == 0.0f)
 | 
					                if (res == default)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (Configurations.Debug) Log.Warning($"Could not find end age of baby lifestage for {parent.pawn}'s race");
 | 
					                    if (Configurations.Debug) Log.Warning($"Could not find end age of baby lifestage for {parent.pawn}'s race");
 | 
				
			||||||
                    res = 1.2f / 2; // Default to human
 | 
					                    res = 1.2f / 2; // Default to human
 | 
				
			||||||
| 
						 | 
					@ -269,7 +270,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
            // Scenario A: the youngest child is less than halfway into babyhood: Full size
 | 
					            // Scenario A: the youngest child is less than halfway into babyhood: Full size
 | 
				
			||||||
            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > parent.pawn.ageTracker.AgeBiologicalTicks)
 | 
					            if (ageOfLastBirth + BabyHalfAge * GenDate.TicksPerYear > parent.pawn.ageTracker.AgeBiologicalTicks)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (Configurations.Debug) Log.Message($"Latest child of {parent.pawn} is young: breasts to full size");
 | 
					                debugGrowthStatus = "Full size due to young child";
 | 
				
			||||||
                if (breastSizeIncreased < MAX_BREAST_INCREMENT)
 | 
					                if (breastSizeIncreased < MAX_BREAST_INCREMENT)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    parent.Severity += (MAX_BREAST_INCREMENT - breastSizeIncreased);
 | 
					                    parent.Severity += (MAX_BREAST_INCREMENT - breastSizeIncreased);
 | 
				
			||||||
| 
						 | 
					@ -282,7 +283,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                float pregnancySize = Mathf.InverseLerp(1f / 6f, 1f / 3f, parent.pawn.GetPregnancyProgress()) * MAX_BREAST_INCREMENT;
 | 
					                float pregnancySize = Mathf.InverseLerp(1f / 6f, 1f / 3f, parent.pawn.GetPregnancyProgress()) * MAX_BREAST_INCREMENT;
 | 
				
			||||||
                if (breastSizeIncreased > pregnancySize)
 | 
					                if (breastSizeIncreased > pregnancySize)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (Configurations.Debug) Log.Message($"{parent.pawn}'s breasts are too large for pregnancy ({breastSizeIncreased} > {pregnancySize}), shrinking");
 | 
					                    debugGrowthStatus = "Shrinking due to being oversize for pregnancy";
 | 
				
			||||||
                    // Breasts still large from the last kid
 | 
					                    // Breasts still large from the last kid
 | 
				
			||||||
                    ShrinkBreasts();
 | 
					                    ShrinkBreasts();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -290,7 +291,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    // Time to grow
 | 
					                    // Time to grow
 | 
				
			||||||
                    float growAmount = pregnancySize - breastSizeIncreased;
 | 
					                    float growAmount = pregnancySize - breastSizeIncreased;
 | 
				
			||||||
                    if (Configurations.Debug) Log.Message($"{parent.pawn} is pregnant, so growing breasts by {growAmount}");
 | 
					                    debugGrowthStatus = "Growing due to pregnancy";
 | 
				
			||||||
                    breastSizeIncreased += growAmount;
 | 
					                    breastSizeIncreased += growAmount;
 | 
				
			||||||
                    parent.Severity += growAmount;
 | 
					                    parent.Severity += growAmount;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					@ -298,9 +299,10 @@ namespace RJW_Menstruation
 | 
				
			||||||
            // Scenario C: Not (or very early) pregnant and youngest child nonexistent or more than halfway into babyhood, time to shrink
 | 
					            // Scenario C: Not (or very early) pregnant and youngest child nonexistent or more than halfway into babyhood, time to shrink
 | 
				
			||||||
            else if (breastSizeIncreased > 0)
 | 
					            else if (breastSizeIncreased > 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (Configurations.Debug) Log.Message($"{parent.pawn}'s breasts are too large and she is not pregnant, shrinking");
 | 
					                debugGrowthStatus = "Shrinking due to no pregnancy nor young child";
 | 
				
			||||||
                ShrinkBreasts();
 | 
					                ShrinkBreasts();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            else debugGrowthStatus = "Base size";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public void ChangeColorFermanant(float alpha)
 | 
					        public void ChangeColorFermanant(float alpha)
 | 
				
			||||||
| 
						 | 
					@ -384,7 +386,9 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string DebugInfo()
 | 
					        public string DebugInfo()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return "Alpha: " + alpha + 
 | 
					            return "Increase: " + breastSizeIncreased +
 | 
				
			||||||
 | 
					                "\n" + debugGrowthStatus +
 | 
				
			||||||
 | 
					                "\nAlpha: " + alpha + 
 | 
				
			||||||
                "\nNippleSize: " + nippleSize + 
 | 
					                "\nNippleSize: " + nippleSize + 
 | 
				
			||||||
                "\nAreolaSize: " + areolaSize + 
 | 
					                "\nAreolaSize: " + areolaSize + 
 | 
				
			||||||
                "\nAlphaCurrent: " + alphaCurrent +
 | 
					                "\nAlphaCurrent: " + alphaCurrent +
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue