Compare commits
7 Commits
bf37fcb3f2
...
e4bd9a1f3c
Author | SHA1 | Date |
---|---|---|
lutepickle | e4bd9a1f3c | |
lutepickle | ef6bae09be | |
lutepickle | 1dcd67c97c | |
lutepickle | b0ea928a50 | |
lutepickle | c7bb6bde18 | |
lutepickle | 334c62b59f | |
lutepickle | b09ea9153e |
Binary file not shown.
|
@ -17,9 +17,9 @@ namespace RJW_Menstruation
|
|||
{
|
||||
protected bool hadOvulatoryStage = false; // Regardless of whether an egg was actually produced
|
||||
|
||||
protected override void InitializeExtraValues()
|
||||
protected override void PostInitialize()
|
||||
{
|
||||
base.InitializeExtraValues();
|
||||
base.PostInitialize();
|
||||
hadOvulatoryStage |= IsEggExist;
|
||||
}
|
||||
|
||||
|
|
|
@ -971,7 +971,7 @@ namespace RJW_Menstruation
|
|||
if (Pawn.HasIUD()) antisperm = 0.70f + asafactor;
|
||||
else antisperm = 0.0f + asafactor;
|
||||
|
||||
absorber = (Absorber)Pawn.apparel?.WornApparel?.Find(x => x is Absorber);
|
||||
absorber = (Absorber)Pawn.apparel?.WornApparel.Find(x => x is Absorber);
|
||||
if (absorber != null)
|
||||
{
|
||||
absorber.WearEffect(TickInterval);
|
||||
|
@ -1164,7 +1164,7 @@ namespace RJW_Menstruation
|
|||
else if (currentIntervalTicks < curStageTicks) curStageTicks = currentIntervalTicks;
|
||||
}
|
||||
if (crampPain < 0) crampPain = PainRandomizer();
|
||||
InitializeExtraValues();
|
||||
PostInitialize();
|
||||
|
||||
TakeLoosePregnancy();
|
||||
|
||||
|
@ -1178,7 +1178,7 @@ namespace RJW_Menstruation
|
|||
Notify_UpdatedGenes();
|
||||
}
|
||||
|
||||
protected virtual void InitializeExtraValues()
|
||||
protected virtual void PostInitialize()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1459,6 +1459,7 @@ namespace RJW_Menstruation
|
|||
break;
|
||||
case Hediff_BasePregnancy _:
|
||||
default:
|
||||
if (Configurations.Debug) Log.Message($"Not adding to existing pregnancy {pregnancy?.GetUniqueLoadID()}");
|
||||
pregnant = true;
|
||||
deadeggs.Add(egg);
|
||||
break;
|
||||
|
@ -1479,7 +1480,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);
|
||||
|
|
|
@ -26,9 +26,9 @@ namespace RJW_Menstruation
|
|||
Props = (CompProperties_PeriodicOvulator)props;
|
||||
}
|
||||
|
||||
protected override void InitializeExtraValues()
|
||||
protected override void PostInitialize()
|
||||
{
|
||||
base.InitializeExtraValues();
|
||||
base.PostInitialize();
|
||||
if (averageCycleIntervalTicks < 0)
|
||||
{
|
||||
averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed);
|
||||
|
|
|
@ -47,8 +47,11 @@ namespace RJW_Menstruation
|
|||
|
||||
protected IEnumerable<Pawn> AffectedPawns()
|
||||
{
|
||||
if(Pawn.GetCaravan() is Caravan caravan)
|
||||
if (Pawn.GetCaravan() is Caravan caravan)
|
||||
{
|
||||
foreach (Pawn p in caravan.PawnsListForReading.Where(p => p != Pawn)) yield return p;
|
||||
yield break;
|
||||
}
|
||||
Map mapHeld = Pawn.MapHeld;
|
||||
if (mapHeld == null) yield break;
|
||||
foreach (Pawn pawn in mapHeld.mapPawns.AllPawnsSpawned)
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace RJW_Menstruation
|
|||
if (comp?.HasBaby ?? false)
|
||||
{
|
||||
RitualOutcomePossibility thisOutcome = outcome;
|
||||
Precept_Ritual precept_Ritual = (Precept_Ritual)comp.Pawn.Ideo.GetPrecept(PreceptDefOf.ChildBirth);
|
||||
Precept_Ritual precept_Ritual = (Precept_Ritual)comp.Pawn.Ideo.GetPrecept(RimWorld.PreceptDefOf.ChildBirth);
|
||||
float birthQuality = PregnancyUtility.GetBirthQualityFor(mother);
|
||||
do
|
||||
{
|
||||
|
|
|
@ -30,7 +30,8 @@ namespace RJW_Menstruation
|
|||
base.PostAdd(dinfo);
|
||||
if (IsVisible)
|
||||
{
|
||||
List<Hediff> removals = pawn.health.hediffSet.hediffs.Where(hediff => hediff.def == VariousDefOf.Hediff_Estrus_Concealed).ToList();
|
||||
List <Hediff> removals = new List <Hediff>();
|
||||
pawn.health.hediffSet.GetHediffs(ref removals, hediff => hediff.def == VariousDefOf.Hediff_Estrus_Concealed);
|
||||
foreach (Hediff concealedEstrus in removals)
|
||||
{
|
||||
pawn.health.RemoveHediff(concealedEstrus);
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony">
|
||||
<Version>2.3.1.1</Version>
|
||||
<Version>2.3.2</Version>
|
||||
<ExcludeAssets>runtime</ExcludeAssets>
|
||||
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
Loading…
Reference in New Issue