Small refactor in the estrus PostAdd

This commit is contained in:
lutepickle 2024-03-19 07:23:37 -07:00
parent 334c62b59f
commit c7bb6bde18
3 changed files with 3 additions and 2 deletions

Binary file not shown.

View file

@ -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
{

View file

@ -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);