This commit is contained in:
moreoreganostodump 2021-03-07 23:23:54 +09:00
parent dbeac6d68c
commit 924d085a5b
9 changed files with 293 additions and 197 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest> <Manifest>
<identifier>RJW Menstruation</identifier> <identifier>RJW Menstruation</identifier>
<version>1.0.1.12</version> <version>1.0.1.13</version>
<dependencies> <dependencies>
</dependencies> </dependencies>
<incompatibleWith /> <incompatibleWith />

Binary file not shown.

View File

@ -36,19 +36,20 @@
<xpath>Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath> <xpath>Defs/rjw.HediffDef_PartBase[defName="CatVagina"]</xpath>
<value> <value>
<comps> <comps>
<li Class="RJW_Menstruation.CompProperties_Menstruation"> <li Class="RJW_Menstruation.CompProperties_InducedOvulator">
<maxCumCapacity>6</maxCumCapacity> <maxCumCapacity>6</maxCumCapacity>
<baseImplantationChanceFactor>1.0</baseImplantationChanceFactor> <baseImplantationChanceFactor>1.0</baseImplantationChanceFactor>
<basefertilizationChanceFactor>2.0</basefertilizationChanceFactor> <basefertilizationChanceFactor>2.0</basefertilizationChanceFactor>
<deviationFactor>0.05</deviationFactor> <deviationFactor>0.05</deviationFactor>
<folicularIntervalDays>6</folicularIntervalDays> <folicularIntervalDays>9</folicularIntervalDays>
<lutealIntervalDays>14</lutealIntervalDays> <lutealIntervalDays>10</lutealIntervalDays>
<bleedingIntervalDays>0</bleedingIntervalDays> <bleedingIntervalDays>0</bleedingIntervalDays>
<recoveryIntervalDays>15</recoveryIntervalDays> <recoveryIntervalDays>15</recoveryIntervalDays>
<eggLifespanDays>14</eggLifespanDays> <eggLifespanDays>1</eggLifespanDays>
<wombTex>Womb/Womb</wombTex> <wombTex>Womb/Womb</wombTex>
<vagTex>Genitals/Vagina</vagTex> <vagTex>Genitals/Vagina</vagTex>
<breedingSeason>FirstHalf</breedingSeason> <breedingSeason>FirstHalf</breedingSeason>
<estrusDaysBeforeOvulation>9</estrusDaysBeforeOvulation>
</li> </li>
</comps> </comps>
</value> </value>
@ -126,19 +127,19 @@
<xpath>Defs/rjw.HediffDef_PartBase[defName="RodentVagina"]</xpath> <xpath>Defs/rjw.HediffDef_PartBase[defName="RodentVagina"]</xpath>
<value> <value>
<comps> <comps>
<li Class="RJW_Menstruation.CompProperties_Menstruation"> <li Class="RJW_Menstruation.CompProperties_InducedOvulator">
<maxCumCapacity>5</maxCumCapacity> <maxCumCapacity>5</maxCumCapacity>
<baseImplantationChanceFactor>1.0</baseImplantationChanceFactor> <baseImplantationChanceFactor>1.0</baseImplantationChanceFactor>
<basefertilizationChanceFactor>2.0</basefertilizationChanceFactor> <basefertilizationChanceFactor>2.0</basefertilizationChanceFactor>
<deviationFactor>0.05</deviationFactor> <deviationFactor>0.05</deviationFactor>
<folicularIntervalDays>2</folicularIntervalDays> <folicularIntervalDays>6</folicularIntervalDays>
<lutealIntervalDays>7</lutealIntervalDays> <lutealIntervalDays>9</lutealIntervalDays>
<bleedingIntervalDays>0</bleedingIntervalDays> <bleedingIntervalDays>0</bleedingIntervalDays>
<recoveryIntervalDays>3</recoveryIntervalDays> <recoveryIntervalDays>3</recoveryIntervalDays>
<eggLifespanDays>7</eggLifespanDays> <eggLifespanDays>1</eggLifespanDays>
<wombTex>Womb/Womb</wombTex> <wombTex>Womb/Womb</wombTex>
<vagTex>Genitals/Vagina</vagTex> <vagTex>Genitals/Vagina</vagTex>
<estrusDaysBeforeOvulation>1</estrusDaysBeforeOvulation> <estrusDaysBeforeOvulation>6</estrusDaysBeforeOvulation>
</li> </li>
</comps> </comps>
</value> </value>

View File

@ -1,3 +1,8 @@
Version 1.0.1.13
- requires RJW 4.6.1 or later
- added induced ovulator
- fenline and rodent vagina ovulate after sex in follicular stage
- minor bug fix
Version 1.0.1.12 Version 1.0.1.12
- requires RJW 4.6.1 or later - requires RJW 4.6.1 or later
- added HybridExtension attribute to PawnDNAModExtension - added HybridExtension attribute to PawnDNAModExtension

View File

@ -0,0 +1,64 @@
using HugsLib;
using RimWorld;
using rjw;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Verse;
namespace RJW_Menstruation
{
public class CompProperties_InducedOvulator : CompProperties_Menstruation
{
public CompProperties_InducedOvulator()
{
compClass = typeof(HediffComp_InducedOvulator);
}
}
public class HediffComp_InducedOvulator : HediffComp_Menstruation
{
protected override void FollicularAction()
{
if (!IsBreedingSeason())
{
GoNextStage(Stage.Anestrus);
return;
}
if (curStageHrs >= FollicularIntervalHours)
{
GoNextStage(Stage.Luteal);
}
else
{
curStageHrs += Configurations.CycleAcceleration;
if (!estrusflag && curStageHrs > FollicularIntervalHours - Props.estrusDaysBeforeOvulation * 24)
{
estrusflag = true;
SetEstrus(Props.eggLifespanDays + Props.estrusDaysBeforeOvulation);
}
StayCurrentStage();
}
}
public override void AfterCumIn(Pawn cummer)
{
base.AfterCumIn(cummer);
if (curStage == Stage.Follicular) curStage = Stage.Ovulatory;
}
}
}

View File

@ -97,18 +97,18 @@ namespace RJW_Menstruation
Anestrus Anestrus
} }
private List<Cum> cums; protected List<Cum> cums;
private List<Egg> eggs; protected List<Egg> eggs;
private int follicularIntervalhours = -1; protected int follicularIntervalhours = -1;
private int lutealIntervalhours = -1; protected int lutealIntervalhours = -1;
private int bleedingIntervalhours = -1; protected int bleedingIntervalhours = -1;
private int recoveryIntervalhours = -1; protected int recoveryIntervalhours = -1;
private float crampPain = -1; protected float crampPain = -1;
private Need sexNeed = null; protected Need sexNeed = null;
private string customwombtex = null; protected string customwombtex = null;
private string customvagtex = null; protected string customvagtex = null;
private bool estrusflag = false; protected bool estrusflag = false;
private int opcache = -1; protected int opcache = -1;
public int ovarypowerthreshold public int ovarypowerthreshold
{ {
@ -586,7 +586,7 @@ namespace RJW_Menstruation
AfterFluidIn(cumd); AfterFluidIn(cumd);
} }
public void AfterCumIn(Pawn cummer) public virtual void AfterCumIn(Pawn cummer)
{ {
if (xxx.is_human(parent.pawn) && xxx.is_human(cummer)) if (xxx.is_human(parent.pawn) && xxx.is_human(cummer))
{ {
@ -1205,6 +1205,150 @@ namespace RJW_Menstruation
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn)); parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
} }
protected virtual void FollicularAction()
{
if (!IsBreedingSeason())
{
GoNextStage(Stage.Anestrus);
return;
}
if (curStageHrs >= FollicularIntervalHours)
{
GoNextStage(Stage.Ovulatory);
}
else
{
curStageHrs += Configurations.CycleAcceleration;
if (!estrusflag && curStageHrs > FollicularIntervalHours - Props.estrusDaysBeforeOvulation * 24)
{
estrusflag = true;
SetEstrus(Props.eggLifespanDays + Props.estrusDaysBeforeOvulation);
}
StayCurrentStage();
}
}
protected virtual void OvulatoryAction()
{
estrusflag = false;
int i = 0;
do
{
ovarypower--;
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
i++;
} while (i < Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve) + eggstack);
eggstack = 0;
if (Configurations.EnableMenopause && ovarypower < 1)
{
eggs.Clear();
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
hediff.Severity = 0.2f;
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
GoNextStage(Stage.Young);
}
else if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
{
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
hediff.Severity = 0.008f * i;
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor * 6);
GoNextStage(Stage.ClimactericLuteal);
}
else
{
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Luteal);
}
}
protected virtual void LutealAction()
{
if (!eggs.NullOrEmpty())
{
EggDecay();
FertilizationCheck();
if (Implant()) GoNextStage(Stage.Pregnant);
else
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}
else if (curStageHrs <= lutealIntervalhours)
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
else
{
if (Props.bleedingIntervalDays == 0)
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Follicular);
}
else
{
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
if (crampPain >= 0.05f)
{
AddCrampPain();
}
GoNextStage(Stage.Bleeding);
}
}
}
protected virtual void BleedingAction()
{
if (curStageHrs >= bleedingIntervalhours)
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
GoNextStage(Stage.Follicular);
}
else
{
if (curStageHrs < bleedingIntervalhours / 4) for (int i = 0; i < Configurations.CycleAcceleration; i++) BleedOut();
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}
protected virtual void PregnantAction()
{
if (!eggs.NullOrEmpty())
{
EggDecay();
FertilizationCheck();
Implant();
}
if (parent.pawn.IsPregnant()) StayCurrentStageConst(Stage.Pregnant);
else GoNextStage(Stage.Recover);
}
protected virtual void YoungAction()
{
if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) StayCurrentStageConst(Stage.Young);
else GoNextStage(Stage.Follicular);
}
protected virtual void AnestrusAction()
{
if (IsBreedingSeason())
{
GoFollicularOrBleeding();
}
else
{
StayCurrentStage();
}
}
private Action PeriodSimulator(Stage targetstage) private Action PeriodSimulator(Stage targetstage)
{ {
Action action = null; Action action = null;
@ -1213,118 +1357,25 @@ namespace RJW_Menstruation
case Stage.Follicular: case Stage.Follicular:
action = delegate action = delegate
{ {
if (!IsBreedingSeason()) FollicularAction();
{
GoNextStage(Stage.Anestrus);
return;
}
if (curStageHrs >= FollicularIntervalHours)
{
GoNextStage(Stage.Ovulatory);
}
else
{
curStageHrs += Configurations.CycleAcceleration;
if (!estrusflag && curStageHrs > FollicularIntervalHours - Props.estrusDaysBeforeOvulation * 24)
{
estrusflag = true;
SetEstrus(Props.eggLifespanDays + Props.estrusDaysBeforeOvulation);
}
StayCurrentStage();
}
}; };
break; break;
case Stage.Ovulatory: case Stage.Ovulatory:
action = delegate action = delegate
{ {
estrusflag = false; OvulatoryAction();
int i = 0;
do
{
ovarypower--;
eggs.Add(new Egg((int)(Props.eggLifespanDays * 24 / CycleFactor)));
i++;
} while (i < Rand.ByCurve(parent.pawn.RaceProps.litterSizeCurve) + eggstack);
eggstack = 0;
if (Configurations.EnableMenopause && ovarypower < 1)
{
eggs.Clear();
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Climacteric);
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
hediff.Severity = 0.2f;
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
GoNextStage(Stage.Young);
}
else if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
{
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Climacteric, parent.pawn);
hediff.Severity = 0.008f * i;
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor * 6);
GoNextStage(Stage.ClimactericLuteal);
}
else
{
lutealIntervalhours = PeriodRandomizer(lutealIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Luteal);
}
}; };
break; break;
case Stage.Luteal: case Stage.Luteal:
action = delegate action = delegate
{ {
if (!eggs.NullOrEmpty()) LutealAction();
{
EggDecay();
FertilizationCheck();
if (Implant()) GoNextStage(Stage.Pregnant);
else
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}
else if (curStageHrs <= lutealIntervalhours)
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
else
{
if (Props.bleedingIntervalDays == 0)
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Follicular);
}
else
{
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
if (crampPain >= 0.05f)
{
AddCrampPain();
}
GoNextStage(Stage.Bleeding);
}
}
}; };
break; break;
case Stage.Bleeding: case Stage.Bleeding:
action = delegate action = delegate
{ {
if (curStageHrs >= bleedingIntervalhours) BleedingAction();
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
GoNextStage(Stage.Follicular);
}
else
{
if (curStageHrs < bleedingIntervalhours / 4) for (int i = 0; i < Configurations.CycleAcceleration; i++) BleedOut();
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}; };
break; break;
case Stage.Fertilized: //Obsoleted stage. merged in luteal stage case Stage.Fertilized: //Obsoleted stage. merged in luteal stage
@ -1332,35 +1383,12 @@ namespace RJW_Menstruation
{ {
ModLog.Message("Obsoleted stage. skipping..."); ModLog.Message("Obsoleted stage. skipping...");
GoNextStage(Stage.Luteal); GoNextStage(Stage.Luteal);
//if (curStageHrs >= 24)
//{
// if (Implant())
// {
// GoNextStage(Stage.Pregnant);
// }
// else
// {
// GoNextStageSetHour(Stage.Luteal, 96);
// }
//}
//else
//{
// curStageHrs+=Configurations.CycleAcceleration;
// StayCurrentStage();
//}
}; };
break; break;
case Stage.Pregnant: case Stage.Pregnant:
action = delegate action = delegate
{ {
if (!eggs.NullOrEmpty()) PregnantAction();
{
EggDecay();
FertilizationCheck();
Implant();
}
if (parent.pawn.IsPregnant()) StayCurrentStageConst(Stage.Pregnant);
else GoNextStage(Stage.Recover);
}; };
break; break;
case Stage.Recover: case Stage.Recover:
@ -1398,8 +1426,7 @@ namespace RJW_Menstruation
case Stage.Young: case Stage.Young:
action = delegate action = delegate
{ {
if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) StayCurrentStageConst(Stage.Young); YoungAction();
else GoNextStage(Stage.Follicular);
}; };
break; break;
case Stage.ClimactericFollicular: case Stage.ClimactericFollicular:
@ -1484,14 +1511,7 @@ namespace RJW_Menstruation
case Stage.Anestrus: case Stage.Anestrus:
action = delegate action = delegate
{ {
if (IsBreedingSeason()) AnestrusAction();
{
GoFollicularOrBleeding();
}
else
{
StayCurrentStage();
}
}; };
break; break;
default: default:
@ -1511,48 +1531,50 @@ namespace RJW_Menstruation
actionref = action; actionref = action;
return actionref; return actionref;
void GoNextStage(Stage nextstage, float factor = 1.0f)
}
protected void GoNextStage(Stage nextstage, float factor = 1.0f)
{
curStageHrs = 0;
curStage = nextstage;
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
}
protected void GoNextStageSetHour(Stage nextstage, int hour, float factor = 1.0f)
{
curStageHrs = hour;
curStage = nextstage;
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
}
//stage can be interrupted in other reasons
protected void StayCurrentStage(float factor = 1.0f)
{
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), (int)(tickInterval * factor), parent.pawn, false);
}
//stage never changes
protected void StayCurrentStageConst(Stage curstage, float factor = 1.0f)
{
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curstage), (int)(tickInterval * factor), parent.pawn, false);
}
protected void GoFollicularOrBleeding()
{
if (Props.bleedingIntervalDays == 0)
{ {
curStageHrs = 0; follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
curStage = nextstage; GoNextStage(Stage.Follicular);
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
} }
else
void GoNextStageSetHour(Stage nextstage, int hour, float factor = 1.0f)
{ {
curStageHrs = hour; bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
curStage = nextstage; GoNextStage(Stage.Bleeding);
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(nextstage), (int)(tickInterval * factor), parent.pawn, false);
} }
//stage can be interrupted in other reasons
void StayCurrentStage(float factor = 1.0f)
{
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curStage), (int)(tickInterval * factor), parent.pawn, false);
}
//stage never changes
void StayCurrentStageConst(Stage curstage, float factor = 1.0f)
{
HugsLibController.Instance.TickDelayScheduler.ScheduleCallback(PeriodSimulator(curstage), (int)(tickInterval * factor), parent.pawn, false);
}
void GoFollicularOrBleeding()
{
if (Props.bleedingIntervalDays == 0)
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Follicular);
}
else
{
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Bleeding);
}
}
} }

View File

@ -61,12 +61,13 @@
<Compile Include="DrugOutcomDoers.cs" /> <Compile Include="DrugOutcomDoers.cs" />
<Compile Include="FilthMaker_Colored.cs" /> <Compile Include="FilthMaker_Colored.cs" />
<Compile Include="HARCompatibility.cs" /> <Compile Include="HARCompatibility.cs" />
<Compile Include="HediffComps\HediffComp_InducedOvaulator.cs" />
<Compile Include="Hediff_MultiplePregnancy.cs" /> <Compile Include="Hediff_MultiplePregnancy.cs" />
<Compile Include="JobDrivers.cs" /> <Compile Include="JobDrivers.cs" />
<Compile Include="Patch\GetGizmos.cs" /> <Compile Include="Patch\GetGizmos.cs" />
<Compile Include="Gizmo_Womb.cs" /> <Compile Include="Gizmo_Womb.cs" />
<Compile Include="Patch\Harmony.cs" /> <Compile Include="Patch\Harmony.cs" />
<Compile Include="HediffComp_Menstruation.cs" /> <Compile Include="HediffComps\HediffComp_Menstruation.cs" />
<Compile Include="Patch\Pawn_Patch.cs" /> <Compile Include="Patch\Pawn_Patch.cs" />
<Compile Include="Patch\RJW_Patch.cs" /> <Compile Include="Patch\RJW_Patch.cs" />
<Compile Include="Reflect.cs" /> <Compile Include="Reflect.cs" />

View File

@ -63,7 +63,9 @@ namespace RJW_Menstruation
if (childNodes.Count >= 1) foreach (XmlNode node in childNodes) if (childNodes.Count >= 1) foreach (XmlNode node in childNodes)
{ {
//Log.Message(xmlRoot.Name + "HybridInfo: " + node.Name + " " + node.InnerText); #if DEBUG
Log.Message(xmlRoot.Name + "HybridInfo: " + node.Name + " " + node.InnerText);
#endif
hybridInfo.Add(node.Name, ParseHelper.FromString<float>(node.InnerText)); hybridInfo.Add(node.Name, ParseHelper.FromString<float>(node.InnerText));
} }

View File

@ -227,8 +227,9 @@ namespace RJW_Menstruation
public static Texture2D GetGenitalIcon(this Pawn pawn) public static Texture2D GetGenitalIcon(this Pawn pawn)
{ {
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn)).Find((Hediff h) => h.def.defName.ToLower().Contains("vagina")); var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.Find((Hediff h) => h.def.defName.ToLower().Contains("vagina"));
HediffComp_Menstruation comp = pawn.GetMenstruationComp(); if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
HediffComp_Menstruation comp = hediff.GetMenstruationComp();
string icon; string icon;
if (comp != null) icon = comp.vagTex; if (comp != null) icon = comp.vagTex;
else icon = "Genitals/Vagina"; else icon = "Genitals/Vagina";
@ -254,7 +255,7 @@ namespace RJW_Menstruation
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus")); var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus"));
if (hediff != null) if (hediff != null)
{ {
CompProperties_Anus Props = (CompProperties_Anus)hediff.TryGetComp<HediffComp_Anus>().props; CompProperties_Anus Props = (CompProperties_Anus)hediff.TryGetComp<HediffComp_Anus>()?.props;
string icon; string icon;
if (Props != null) icon = Props.analTex ?? "Genitals/Anal"; if (Props != null) icon = Props.analTex ?? "Genitals/Anal";
else icon = "Genitals/Anal"; else icon = "Genitals/Anal";