mirror of
				https://gitgud.io/lutepickle/rjw_menstruation.git
				synced 2024-08-14 22:46:52 +00:00 
			
		
		
		
	Remove the originsize system. Nobody used it
This commit is contained in:
		
							parent
							
								
									d483e22ac2
								
							
						
					
					
						commit
						f79050483d
					
				
					 5 changed files with 29 additions and 89 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -145,10 +145,4 @@
 | 
				
			||||||
			</comps>
 | 
								</comps>
 | 
				
			||||||
		</value>
 | 
							</value>
 | 
				
			||||||
	</Operation>	
 | 
						</Operation>	
 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
</Patch>
 | 
					</Patch>
 | 
				
			||||||
| 
						 | 
					@ -127,7 +127,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
        protected float implantationChanceCache = -1.0f;
 | 
					        protected float implantationChanceCache = -1.0f;
 | 
				
			||||||
        protected int opcache = -1;
 | 
					        protected int opcache = -1;
 | 
				
			||||||
        protected float antisperm = 0.0f;
 | 
					        protected float antisperm = 0.0f;
 | 
				
			||||||
        protected float? originvagsize = null;
 | 
					 | 
				
			||||||
        // RJW pregnancy, or Biotech pregnancy/labor/laborpushing
 | 
					        // RJW pregnancy, or Biotech pregnancy/labor/laborpushing
 | 
				
			||||||
        protected Hediff pregnancy = null;
 | 
					        protected Hediff pregnancy = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -179,7 +178,8 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public float HoursBetweenSimulations => (float)TickInterval / GenDate.TicksPerHour;
 | 
					        public float HoursBetweenSimulations => (float)TickInterval / GenDate.TicksPerHour;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public Hediff Pregnancy {
 | 
					        public Hediff Pregnancy
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            get
 | 
					            get
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (pregnancy == null) return null;
 | 
					                if (pregnancy == null) return null;
 | 
				
			||||||
| 
						 | 
					@ -564,19 +564,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public float OriginVagSize
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            get
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                if (originvagsize == null)
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    originvagsize = parent.Severity;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                return originvagsize ?? 0.1f;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            set => originvagsize = value;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        public int CurStageIntervalTicks
 | 
					        public int CurStageIntervalTicks
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            get => currentIntervalTicks;
 | 
					            get => currentIntervalTicks;
 | 
				
			||||||
| 
						 | 
					@ -657,7 +644,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
            Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
 | 
					            Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
 | 
				
			||||||
            Scribe_Values.Look(ref eggstack, "eggstack", 0);
 | 
					            Scribe_Values.Look(ref eggstack, "eggstack", 0);
 | 
				
			||||||
            Scribe_Values.Look(ref estrusflag, "estrusflag", false);
 | 
					            Scribe_Values.Look(ref estrusflag, "estrusflag", false);
 | 
				
			||||||
            Scribe_Values.Look(ref originvagsize, "originvagsize", originvagsize, true);
 | 
					 | 
				
			||||||
            Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", false);
 | 
					            Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", false);
 | 
				
			||||||
            Scribe_References.Look(ref pregnancy, "pregnancy");
 | 
					            Scribe_References.Look(ref pregnancy, "pregnancy");
 | 
				
			||||||
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
 | 
					            if (Scribe.mode == LoadSaveMode.PostLoadInit)
 | 
				
			||||||
| 
						 | 
					@ -816,7 +802,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                tip.Append(": ");
 | 
					                tip.Append(": ");
 | 
				
			||||||
                tip.Append(GetCurStageLabel);
 | 
					                tip.Append(GetCurStageLabel);
 | 
				
			||||||
                string fertInfo = GetFertilizingInfo;
 | 
					                string fertInfo = GetFertilizingInfo;
 | 
				
			||||||
                if(CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
 | 
					                if (CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    tip.AppendLine();
 | 
					                    tip.AppendLine();
 | 
				
			||||||
                    tip.Append(fertInfo);
 | 
					                    tip.Append(fertInfo);
 | 
				
			||||||
| 
						 | 
					@ -827,7 +813,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        protected virtual int TicksToNextStage()
 | 
					        protected virtual int TicksToNextStage()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return Math.Max(0,(currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
 | 
					            return Math.Max(0, (currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public override string CompDebugString()
 | 
					        public override string CompDebugString()
 | 
				
			||||||
| 
						 | 
					@ -1490,7 +1476,7 @@ namespace RJW_Menstruation
 | 
				
			||||||
                        float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer);
 | 
					                        float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer);
 | 
				
			||||||
                        float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor;
 | 
					                        float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor;
 | 
				
			||||||
                        Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, " +
 | 
					                        Log.Message($"Fertilized egg of {Pawn} failed to implant (chance {implantChance.ToStringPercent()}, " +
 | 
				
			||||||
                            (interspeciesFactor < 1.0f ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "" ) +
 | 
					                            (interspeciesFactor < 1.0f ? $"interspecies factor {interspeciesFactor.ToStringPercent()}, " : "") +
 | 
				
			||||||
                            $"father {egg.fertilizer})");
 | 
					                            $"father {egg.fertilizer})");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    deadeggs.Add(egg);
 | 
					                    deadeggs.Add(egg);
 | 
				
			||||||
| 
						 | 
					@ -1576,9 +1562,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
            return amount;
 | 
					            return amount;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        protected void EggDecay()
 | 
					        protected void EggDecay()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            HashSet<Egg> deadeggs = new HashSet<Egg>();
 | 
					            HashSet<Egg> deadeggs = new HashSet<Egg>();
 | 
				
			||||||
| 
						 | 
					@ -2034,28 +2017,6 @@ namespace RJW_Menstruation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public class HediffComp_Anus : HediffComp
 | 
					    public class HediffComp_Anus : HediffComp
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        protected float? originanussize;
 | 
					        public CompProperties_Anus Props => (CompProperties_Anus)props;
 | 
				
			||||||
 | 
					 | 
				
			||||||
        public float OriginAnusSize
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            get
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                if (originanussize == null)
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    originanussize = parent.Severity;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                return originanussize ?? 0.1f;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        public override void CompExposeData()
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            base.CompExposeData();
 | 
					 | 
				
			||||||
            Scribe_Values.Look(ref originanussize, "originanussize", originanussize, true);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        public override void CompPostTick(ref float severityAdjustment)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -306,15 +306,13 @@ namespace RJW_Menstruation
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp, bool drawOrigin = false)
 | 
					        public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = comp?.parent;
 | 
					            Hediff hediff = comp?.parent;
 | 
				
			||||||
            if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
 | 
					            if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
 | 
				
			||||||
            //HediffComp_Menstruation comp = hediff.GetMenstruationComp();
 | 
					            //HediffComp_Menstruation comp = hediff.GetMenstruationComp();
 | 
				
			||||||
            string icon;
 | 
					            string icon;
 | 
				
			||||||
            float severity;
 | 
					            float severity = hediff.Severity;
 | 
				
			||||||
            if (drawOrigin) severity = comp.OriginVagSize;
 | 
					 | 
				
			||||||
            else severity = hediff.Severity;
 | 
					 | 
				
			||||||
            if (comp != null) icon = comp.VagTex;
 | 
					            if (comp != null) icon = comp.VagTex;
 | 
				
			||||||
            else icon = "Genitals/Vagina";
 | 
					            else icon = "Genitals/Vagina";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -334,27 +332,15 @@ namespace RJW_Menstruation
 | 
				
			||||||
            return ContentFinder<Texture2D>.Get(icon, true);
 | 
					            return ContentFinder<Texture2D>.Get(icon, true);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
 | 
					        public static Texture2D GetAnalIcon(this Pawn pawn)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
 | 
					            Hediff hediff = pawn.health.hediffSet.hediffs.FirstOrDefault(h => VariousDefOf.AllAnuses.Contains(h.def)) ??
 | 
				
			||||||
                pawn.health.hediffSet.hediffs.FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
					                pawn.health.hediffSet.hediffs.FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
 | 
				
			||||||
            if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Anal00", true);
 | 
					            if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Anal00", true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            string icon;
 | 
					            string icon = ((CompProperties_Anus)hediff.GetAnusComp()?.props)?.analTex ?? "Genitals/Anal";
 | 
				
			||||||
            float severity;
 | 
					            float severity = hediff.Severity;
 | 
				
			||||||
            HediffComp_Anus comp = hediff.GetAnusComp();
 | 
					
 | 
				
			||||||
            if (comp != null)
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                CompProperties_Anus Props = (CompProperties_Anus)comp.props;
 | 
					 | 
				
			||||||
                icon = Props.analTex ?? "Genitals/Anal";
 | 
					 | 
				
			||||||
                if (drawOrigin) severity = comp.OriginAnusSize;
 | 
					 | 
				
			||||||
                else severity = hediff.Severity;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            else
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                icon = "Genitals/Anal";
 | 
					 | 
				
			||||||
                severity = hediff.Severity;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            if (severity < 0.20f) icon += "00";        //micro 
 | 
					            if (severity < 0.20f) icon += "00";        //micro 
 | 
				
			||||||
            else if (severity < 0.40f) icon += "01";   //tight
 | 
					            else if (severity < 0.40f) icon += "01";   //tight
 | 
				
			||||||
            else if (severity < 0.60f) icon += "02";   //average
 | 
					            else if (severity < 0.60f) icon += "02";   //average
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -388,10 +388,9 @@ namespace RJW_Menstruation
 | 
				
			||||||
            Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
 | 
					            Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
 | 
				
			||||||
            Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
 | 
					            Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
 | 
				
			||||||
            Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
 | 
					            Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
 | 
				
			||||||
            bool showOrigin = Mouse.IsOver(genitalIconRect) && Input.GetMouseButton(0);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            vagina = pawn.GetGenitalIcon(comp, showOrigin);
 | 
					            vagina = pawn.GetGenitalIcon(comp);
 | 
				
			||||||
            anal = pawn.GetAnalIcon(showOrigin);
 | 
					            anal = pawn.GetAnalIcon();
 | 
				
			||||||
            GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
 | 
					            GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
 | 
				
			||||||
            GUI.Box(rect, "", boxstyle);
 | 
					            GUI.Box(rect, "", boxstyle);
 | 
				
			||||||
            GUI.color = Utility.SafeSkinColor(pawn);
 | 
					            GUI.color = Utility.SafeSkinColor(pawn);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue