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.
|
@ -144,11 +144,5 @@
|
|||
</li>
|
||||
</comps>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Operation>
|
||||
</Patch>
|
|
@ -127,7 +127,6 @@ namespace RJW_Menstruation
|
|||
protected float implantationChanceCache = -1.0f;
|
||||
protected int opcache = -1;
|
||||
protected float antisperm = 0.0f;
|
||||
protected float? originvagsize = null;
|
||||
// RJW pregnancy, or Biotech pregnancy/labor/laborpushing
|
||||
protected Hediff pregnancy = null;
|
||||
|
||||
|
@ -179,7 +178,8 @@ namespace RJW_Menstruation
|
|||
|
||||
public float HoursBetweenSimulations => (float)TickInterval / GenDate.TicksPerHour;
|
||||
|
||||
public Hediff Pregnancy {
|
||||
public Hediff Pregnancy
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pregnancy == null) return null;
|
||||
|
@ -255,7 +255,7 @@ namespace RJW_Menstruation
|
|||
|
||||
public float TotalCum
|
||||
{
|
||||
get => cums?.Sum(cum => cum.Volume) ?? 0;
|
||||
get => cums?.Sum(cum => cum.Volume) ?? 0;
|
||||
}
|
||||
public float TotalFertCum
|
||||
{
|
||||
|
@ -357,7 +357,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
if (cums.NullOrEmpty()) yield return Translations.Info_noCum;
|
||||
else foreach (Cum cum in cums)
|
||||
yield return string.Format("{0}: {1:0.##}ml", cum.notcum ? cum.notcumLabel : cum.pawn?.Label, cum.Volume);
|
||||
yield return string.Format("{0}: {1:0.##}ml", cum.notcum ? cum.notcumLabel : cum.pawn?.Label, cum.Volume);
|
||||
}
|
||||
}
|
||||
public Color GetCumMixtureColor
|
||||
|
@ -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
|
||||
{
|
||||
get => currentIntervalTicks;
|
||||
|
@ -609,7 +596,7 @@ namespace RJW_Menstruation
|
|||
else if (Pawn.story?.bodyType == BodyTypeDefOf.Female) discoveryTime = 0.35f;
|
||||
// Estimated; there's no way to get the exact value after the fact without writing it into the save
|
||||
float lutealProgressWhenImplanted = Math.Min(0.5f, maxImplantDelayHours / (Props.lutealIntervalDays * GenDate.HoursPerDay));
|
||||
|
||||
|
||||
return GenMath.LerpDouble(0, discoveryTime, lutealProgressWhenImplanted, 1.0f, pregnancy.Severity);
|
||||
}
|
||||
}
|
||||
|
@ -657,7 +644,6 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
|
||||
Scribe_Values.Look(ref eggstack, "eggstack", 0);
|
||||
Scribe_Values.Look(ref estrusflag, "estrusflag", false);
|
||||
Scribe_Values.Look(ref originvagsize, "originvagsize", originvagsize, true);
|
||||
Scribe_Values.Look(ref DoCleanWomb, "DoCleanWomb", false);
|
||||
Scribe_References.Look(ref pregnancy, "pregnancy");
|
||||
if (Scribe.mode == LoadSaveMode.PostLoadInit)
|
||||
|
@ -680,8 +666,8 @@ namespace RJW_Menstruation
|
|||
ovulationFactor = 1f;
|
||||
noBleeding = false;
|
||||
opcache = -1;
|
||||
|
||||
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
|
||||
|
||||
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
|
||||
foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Select(gene => gene.def.GetModExtension<MenstruationModExtension>()).Where(ext => ext != null))
|
||||
{
|
||||
eggLifeSpanTicks = (int)(eggLifeSpanTicks * extension.eggLifeTimeFactor);
|
||||
|
@ -720,7 +706,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
if (Pawn.IsHashIntervalTick(recalculateTickInterval)) TickInterval = -1; // Every so often, force TickInterval to be recalculated in case the pawn's status changed.
|
||||
if (!Pawn.IsHashIntervalTick(TickInterval)) return;
|
||||
|
||||
|
||||
if (!ShouldSimulate()) return;
|
||||
|
||||
// Initialize immediately if needed, but if there's an error, then don't spam it every tick
|
||||
|
@ -729,7 +715,7 @@ namespace RJW_Menstruation
|
|||
Log.Warning($"{Pawn}'s womb is ticking, but was not initialized first");
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
||||
if (initError) Log.Warning($"Attempting to process {Pawn}'s womb uninitialized");
|
||||
|
||||
if (Pregnancy != null && curStage != Stage.Pregnant)
|
||||
|
@ -739,7 +725,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
|
||||
BeforeSimulator();
|
||||
|
||||
|
||||
if (ShouldBeInfertile()) GoNextStage(Stage.Infertile);
|
||||
switch (curStage)
|
||||
{
|
||||
|
@ -816,7 +802,7 @@ namespace RJW_Menstruation
|
|||
tip.Append(": ");
|
||||
tip.Append(GetCurStageLabel);
|
||||
string fertInfo = GetFertilizingInfo;
|
||||
if(CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
|
||||
if (CurrentVisibleStage == Stage.Luteal && fertInfo.Length > 0)
|
||||
{
|
||||
tip.AppendLine();
|
||||
tip.Append(fertInfo);
|
||||
|
@ -827,7 +813,7 @@ namespace RJW_Menstruation
|
|||
|
||||
protected virtual int TicksToNextStage()
|
||||
{
|
||||
return Math.Max(0,(currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
|
||||
return Math.Max(0, (currentIntervalTicks - curStageTicks) / Configurations.CycleAcceleration);
|
||||
}
|
||||
|
||||
public override string CompDebugString()
|
||||
|
@ -1172,7 +1158,7 @@ namespace RJW_Menstruation
|
|||
|
||||
if (cycleSpeed < 0f) cycleSpeed = Utility.RandGaussianLike(0.8f, 1.2f);
|
||||
if (cycleVariability < 0f) cycleVariability = MenstruationUtility.RandomVariabilityPercent();
|
||||
|
||||
|
||||
InitOvary();
|
||||
|
||||
if (currentIntervalTicks < 0)
|
||||
|
@ -1360,7 +1346,7 @@ namespace RJW_Menstruation
|
|||
//float fertFailChancePerHour = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor);
|
||||
//float fertFailChancePerInterval = Mathf.Pow(fertFailChancePerHour, (float)TickInterval / GenDate.TicksPerHour);
|
||||
float fertFailChancePerInterval = Mathf.Pow(1.0f - Configurations.FertilizeChance, totalFertPower * Props.basefertilizationChanceFactor * HoursBetweenSimulations);
|
||||
|
||||
|
||||
if (Rand.Chance(fertFailChancePerInterval)) return null;
|
||||
|
||||
Pawn.records.AddTo(VariousDefOf.AmountofFertilizedEggs, 1);
|
||||
|
@ -1490,7 +1476,7 @@ namespace RJW_Menstruation
|
|||
float interspeciesFactor = InterspeciesImplantFactor(egg.fertilizer);
|
||||
float implantChance = Configurations.ImplantationChance * ImplantChance * interspeciesFactor;
|
||||
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})");
|
||||
}
|
||||
deadeggs.Add(egg);
|
||||
|
@ -1576,9 +1562,6 @@ namespace RJW_Menstruation
|
|||
return amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected void EggDecay()
|
||||
{
|
||||
HashSet<Egg> deadeggs = new HashSet<Egg>();
|
||||
|
@ -1813,10 +1796,10 @@ namespace RJW_Menstruation
|
|||
}
|
||||
else pawnMemories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer);
|
||||
}
|
||||
else if (Pawn.relations.OpinionOf(cummer) <= -5)
|
||||
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
|
||||
else if (Pawn.IsInEstrus() && Pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
|
||||
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
|
||||
else if (Pawn.relations.OpinionOf(cummer) <= -5)
|
||||
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideF, cummer);
|
||||
else if (Pawn.IsInEstrus() && Pawn.relations.OpinionOf(cummer) < RJWHookupSettings.MinimumRelationshipToHookup)
|
||||
pawnMemories.TryGainMemory(VariousDefOf.HaterCameInsideFEstrus, cummer);
|
||||
else if (!Pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, cummer) && !Pawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, cummer))
|
||||
{
|
||||
if (Pawn.health.capacities.GetLevel(xxx.reproduction) < 0.50f) pawnMemories.TryGainMemory(VariousDefOf.CameInsideFLowFert, cummer);
|
||||
|
@ -2034,28 +2017,6 @@ namespace RJW_Menstruation
|
|||
|
||||
public class HediffComp_Anus : HediffComp
|
||||
{
|
||||
protected float? originanussize;
|
||||
|
||||
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)
|
||||
{
|
||||
}
|
||||
public CompProperties_Anus Props => (CompProperties_Anus)props;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
|
||||
//HediffComp_Menstruation comp = hediff.GetMenstruationComp();
|
||||
string icon;
|
||||
float severity;
|
||||
if (drawOrigin) severity = comp.OriginVagSize;
|
||||
else severity = hediff.Severity;
|
||||
float severity = hediff.Severity;
|
||||
if (comp != null) icon = comp.VagTex;
|
||||
else icon = "Genitals/Vagina";
|
||||
|
||||
|
@ -334,27 +332,15 @@ namespace RJW_Menstruation
|
|||
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)) ??
|
||||
pawn.health.hediffSet.hediffs.FirstOrDefault(h => h.def.defName.ToLower().Contains("anus"));
|
||||
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Anal00", true);
|
||||
|
||||
string icon;
|
||||
float 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;
|
||||
}
|
||||
string icon = ((CompProperties_Anus)hediff.GetAnusComp()?.props)?.analTex ?? "Genitals/Anal";
|
||||
float severity = hediff.Severity;
|
||||
|
||||
if (severity < 0.20f) icon += "00"; //micro
|
||||
else if (severity < 0.40f) icon += "01"; //tight
|
||||
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 genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, 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);
|
||||
anal = pawn.GetAnalIcon(showOrigin);
|
||||
vagina = pawn.GetGenitalIcon(comp);
|
||||
anal = pawn.GetAnalIcon();
|
||||
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
|
||||
GUI.Box(rect, "", boxstyle);
|
||||
GUI.color = Utility.SafeSkinColor(pawn);
|
||||
|
|
Loading…
Reference in a new issue