Compare commits

..

No commits in common. "82a34f8ea8c3499e1550b3f14ef8ae4cf6be64b3" and "3de006dbbf8896eaa63a93c39e42411364f1fed2" have entirely different histories.

13 changed files with 78 additions and 142 deletions

Binary file not shown.

View file

@ -89,7 +89,7 @@ namespace RJW_Menstruation
else m.moodPowerFactor = 0.3f; else m.moodPowerFactor = 0.3f;
} }
if (pawn.WantsToGetPregnant()) pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.HateTookContraceptivePill); if (pawn.HasQuirk(QuirkUtility.Quirks.Breeder)) pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.HateTookContraceptivePill);
else pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.TookContraceptivePill); else pawn.needs.mood.thoughts.memories.TryGainMemoryFast(VariousDefOf.TookContraceptivePill);
} }
} }

View file

@ -69,7 +69,7 @@ namespace RJW_Menstruation
get get
{ {
if (babyHalfAge > 0f) return babyHalfAge; if (babyHalfAge > 0f) return babyHalfAge;
List<LifeStageAge> ages = Pawn.RaceProps.lifeStageAges; List<LifeStageAge> ages = Pawn.def.race.lifeStageAges;
if (ages?.Count > 1) if (ages?.Count > 1)
babyHalfAge = ages[1].minAge / 2; babyHalfAge = ages[1].minAge / 2;

View file

@ -15,14 +15,6 @@ namespace RJW_Menstruation
public class HediffComp_InducedOvulator : HediffComp_Menstruation public class HediffComp_InducedOvulator : HediffComp_Menstruation
{ {
protected bool hadOvulatoryStage = false; // Regardless of whether an egg was actually produced
protected override void InitializeExtraValues()
{
base.InitializeExtraValues();
hadOvulatoryStage |= IsEggExist;
}
public override string GetCurStageDesc public override string GetCurStageDesc
{ {
get get
@ -43,7 +35,7 @@ namespace RJW_Menstruation
protected override float RaceCyclesPerYear() protected override float RaceCyclesPerYear()
{ {
// Don't bother with breeding season, since so much time is planned to be spent pregnant. // Don't bother with breeding season, since so much time is planned to be spent pregnant.
float pregnanciesPerYear = GenDate.DaysPerYear / Mathf.Max(1, Pawn.RaceProps.gestationPeriodDays); float pregnanciesPerYear = GenDate.DaysPerYear / Mathf.Max(1, Pawn.def.race.gestationPeriodDays);
return 2 * pregnanciesPerYear / Configurations.ImplantationChanceDefault; return 2 * pregnanciesPerYear / Configurations.ImplantationChanceDefault;
} }
@ -54,31 +46,12 @@ namespace RJW_Menstruation
return Mathf.CeilToInt((Pawn.relations?.ChildrenCount ?? 0) / Configurations.ImplantationChanceDefault); return Mathf.CeilToInt((Pawn.relations?.ChildrenCount ?? 0) / Configurations.ImplantationChanceDefault);
} }
public override void CompExposeData()
{
base.CompExposeData();
Scribe_Values.Look(ref hadOvulatoryStage, "hadOvulatoryStage", false);
}
protected override void GoOvulatoryStage() protected override void GoOvulatoryStage()
{ {
estrusflag = false; estrusflag = false;
hadOvulatoryStage = false;
GoNextStage(Stage.Luteal); GoNextStage(Stage.Luteal);
} }
protected override void OvulatoryAction()
{
base.OvulatoryAction();
hadOvulatoryStage = true;
}
protected override void LutealAction()
{
base.LutealAction();
if (curStage != Stage.Luteal) hadOvulatoryStage = false;
}
protected override void AfterCumIn(Pawn cummer) protected override void AfterCumIn(Pawn cummer)
{ {
base.AfterCumIn(cummer); base.AfterCumIn(cummer);
@ -97,7 +70,7 @@ namespace RJW_Menstruation
case Stage.Ovulatory: case Stage.Ovulatory:
return true; return true;
case Stage.Luteal: case Stage.Luteal:
return hadOvulatoryStage && curStageTicks < EggLifespanTicks; return IsEggExist && curStageTicks < EggLifespanTicks;
default: default:
return false; return false;
} }
@ -115,7 +88,7 @@ namespace RJW_Menstruation
case Stage.Ovulatory: case Stage.Ovulatory:
return true; return true;
case Stage.Luteal: case Stage.Luteal:
return hadOvulatoryStage && curStageTicks < EggLifespanTicks; return IsEggExist && curStageTicks < EggLifespanTicks;
default: default:
return false; return false;
} }

View file

@ -66,7 +66,7 @@ namespace RJW_Menstruation
const float minmakefilthvalue = 1.0f; const float minmakefilthvalue = 1.0f;
const int maxImplantDelayHours = 30 * GenDate.HoursPerDay; const int maxImplantDelayHours = 30 * GenDate.HoursPerDay;
const int minImplantAgeHours = 3 * GenDate.HoursPerDay; const int minImplantAgeHours = 3 * GenDate.HoursPerDay;
const float fluidLeakThreshold = 3.5f; const float fluidLeakThreshold = 2.5f;
const float pulloutSuccessRate = 0.8f; const float pulloutSuccessRate = 0.8f;
const float fetishPulloutSuccessModifier = 0.25f; const float fetishPulloutSuccessModifier = 0.25f;
@ -104,7 +104,6 @@ namespace RJW_Menstruation
public static readonly Dictionary<Stage, Texture2D> StageTexture = new Dictionary<Stage, Texture2D>() public static readonly Dictionary<Stage, Texture2D> StageTexture = new Dictionary<Stage, Texture2D>()
{ {
{ Stage.Follicular, TextureCache.FollicularTexture }, { Stage.Follicular, TextureCache.FollicularTexture },
{ Stage.Ovulatory, TextureCache.OvulatoryTexture },
{ Stage.Luteal, TextureCache.LutealTexture }, { Stage.Luteal, TextureCache.LutealTexture },
{ Stage.Bleeding, TextureCache.BleedingTexture }, { Stage.Bleeding, TextureCache.BleedingTexture },
{ Stage.Pregnant, TextureCache.PregnantTexture }, { Stage.Pregnant, TextureCache.PregnantTexture },
@ -123,8 +122,6 @@ namespace RJW_Menstruation
protected string customwombtex = null; protected string customwombtex = null;
protected string customvagtex = null; protected string customvagtex = null;
protected bool estrusflag = false; protected bool estrusflag = false;
protected float ovulationChanceCache = -1.0f; // Dirtied every simulation
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; protected float? originvagsize = null;
@ -198,7 +195,7 @@ namespace RJW_Menstruation
float avglittersize; float avglittersize;
try try
{ {
avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.RaceProps.litterSizeCurve), 1.0f); avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.def.race.litterSizeCurve), 1.0f);
} }
catch catch
{ {
@ -210,7 +207,7 @@ namespace RJW_Menstruation
opcache = (int)(RaceCyclesPerYear() * opcache = (int)(RaceCyclesPerYear() *
avglittersize * avglittersize *
yearsBeforeMenopause * yearsBeforeMenopause *
(Pawn.RaceProps.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy)); (Pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy));
if (opcache == 0) opcache = 1; if (opcache == 0) opcache = 1;
return opcache; return opcache;
} }
@ -296,71 +293,58 @@ namespace RJW_Menstruation
// I hate doing this, but it's the least bad option // I hate doing this, but it's the least bad option
public bool calculatingOvulationChance = false; public bool calculatingOvulationChance = false;
protected float CalcuatedOvulationChance()
{
float ovulationChance = 1.0f;
if (EggHealth <= 0.0f) return 0.0f;
if (EggHealth < 1.0f / 3.0f) ovulationChance = 0.8f;
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
if (Pawn.SterileGenes()) return 0.0f;
// Replicate how rjw.PawnCapacityWorker_Fertility.CalculateCapacityLevel does it, but without the age factor
if (!Pawn.RaceHasFertility()) return 0.0f;
if (AndroidsCompatibility.IsAndroid(Pawn) && parent.def != Genital_Helper.archotech_vagina) return 0.0f;
foreach (var part in StatDefOf.Fertility.parts)
{
if(part is StatPart_FertilityByGenderAge fertilityByAge)
{
float factor = 1.0f;
fertilityByAge.TransformValue(StatRequest.For(Pawn), ref factor);
if (factor <= 0.0f) return 0.0f; // Too young or too old
}
else part.TransformValue(StatRequest.For(Pawn), ref ovulationChance);
}
if (Pawn.HasQuirk(QuirkUtility.Quirks.Breeder)) ovulationChance *= 10.0f;
try
{
calculatingOvulationChance = true;
ovulationChance *= PawnCapacityUtility.CalculateCapacityLevel(Pawn.health.hediffSet, xxx.reproduction);
}
finally { calculatingOvulationChance = false; }
}
return ovulationChance;
}
protected float CalcuatedImplantChance()
{
float factor = 1.0f;
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
// Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
StatPart_FertilityByGenderAge fertilityStatPart = StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>();
fertilityStatPart?.TransformValue(StatRequest.For(Pawn), ref factor);
float ovulationOverflow = OvulationChance;
if (ovulationOverflow > 1.0f) factor *= ovulationOverflow;
return Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
else
{
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
}
public float OvulationChance public float OvulationChance
{ {
get get
{ {
if (ovulationChanceCache < 0.0f) ovulationChanceCache = CalcuatedOvulationChance(); float ovulationChance = 1.0f;
return ovulationChanceCache; if (EggHealth <= 0.0f) return 0.0f;
if (EggHealth < 1.0f / 3.0f) ovulationChance = 0.8f;
if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
if (Pawn.SterileGenes()) return 0.0f;
// Replicate how rjw.PawnCapacityWorker_Fertility.CalculateCapacityLevel does it, but without the age factor
if (!Pawn.RaceHasFertility()) return 0.0f;
if (AndroidsCompatibility.IsAndroid(Pawn) && parent.def != Genital_Helper.archotech_vagina) return 0.0f;
foreach (var part in StatDefOf.Fertility.parts)
{
if(part is StatPart_FertilityByGenderAge fertilityByAge)
{
float factor = 1.0f;
fertilityByAge.TransformValue(StatRequest.For(Pawn), ref factor);
if (factor <= 0.0f) return 0.0f; // Too young or too old
}
else part.TransformValue(StatRequest.For(Pawn), ref ovulationChance);
}
if (Pawn.HasQuirk(QuirkUtility.Quirks.Breeder)) ovulationChance *= 10.0f;
try
{
calculatingOvulationChance = true;
ovulationChance *= PawnCapacityUtility.CalculateCapacityLevel(Pawn.health.hediffSet, xxx.reproduction);
}
finally { calculatingOvulationChance = false; }
}
return ovulationChance;
} }
} }
public float ImplantChance public float ImplantChance
{ {
get get
{ {
if (implantationChanceCache < 0.0f) implantationChanceCache = CalcuatedImplantChance(); float factor = 1.0f;
return implantationChanceCache; if (ModsConfig.BiotechActive && xxx.is_human(Pawn))
{
// Implant factor will be based solely on pawn age, plus any rollover from ovulation chance
StatPart_FertilityByGenderAge fertilityStatPart = StatDefOf.Fertility.GetStatPart<StatPart_FertilityByGenderAge>();
fertilityStatPart?.TransformValue(StatRequest.For(Pawn), ref factor);
float ovulationOverflow = OvulationChance;
if (ovulationOverflow > 1.0f) factor *= ovulationOverflow;
return Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
else
{
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
} }
} }
@ -570,7 +554,7 @@ namespace RJW_Menstruation
{ {
try try
{ {
Color c = Pawn.RaceProps.BloodDef.graphicData.color; Color c = Pawn.def.race.BloodDef.graphicData.color;
return c; return c;
} }
catch catch
@ -1232,7 +1216,7 @@ namespace RJW_Menstruation
float avglittersize; float avglittersize;
try try
{ {
avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.RaceProps.litterSizeCurve), 1.0f); avglittersize = Mathf.Max(Rand.ByCurveAverage(Pawn.def.race.litterSizeCurve), 1.0f);
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
@ -1275,8 +1259,6 @@ namespace RJW_Menstruation
protected virtual void BeforeSimulator() protected virtual void BeforeSimulator()
{ {
ovulationChanceCache = -1.0f;
implantationChanceCache = -1.0f;
CumOut(); CumOut();
} }
@ -1497,7 +1479,7 @@ namespace RJW_Menstruation
{ {
// ~1.5 per hour times acceleration // ~1.5 per hour times acceleration
float bledAmount = 0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * Rand.Range(0.5f, 1.5f) * TickInterval / GenDate.TicksPerHour; float bledAmount = 0.03f * Configurations.BleedingAmount * Configurations.CycleAcceleration * Rand.Range(0.5f, 1.5f) * TickInterval / GenDate.TicksPerHour;
CumIn(Pawn, bledAmount, Translations.Menstrual_Blood, -5.0f, Pawn.RaceProps?.BloodDef ?? ThingDefOf.Filth_Blood); CumIn(Pawn, bledAmount, Translations.Menstrual_Blood, -5.0f, Pawn.def.race?.BloodDef ?? ThingDefOf.Filth_Blood);
Cum blood = GetNotCum(Translations.Menstrual_Blood); Cum blood = GetNotCum(Translations.Menstrual_Blood);
if (blood != null) blood.Color = BloodColor; if (blood != null) blood.Color = BloodColor;
} }
@ -1619,7 +1601,7 @@ namespace RJW_Menstruation
float eggnum; float eggnum;
try try
{ {
eggnum = Math.Max(Rand.ByCurve(Pawn.RaceProps.litterSizeCurve), 1f); eggnum = Math.Max(Rand.ByCurve(Pawn.def.race.litterSizeCurve), 1f);
} }
catch (NullReferenceException) catch (NullReferenceException)
{ {
@ -1798,7 +1780,7 @@ namespace RJW_Menstruation
if (IsDangerDay) if (IsDangerDay)
{ {
if (Pawn.WantsToGetPregnant()) if (Pawn.HasQuirk(QuirkUtility.Quirks.Breeder) || Pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish))
{ {
Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer); Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetish, cummer);
} }
@ -1821,7 +1803,7 @@ namespace RJW_Menstruation
} }
else else
{ {
if (Pawn.WantsToGetPregnant()) if (Pawn.HasQuirk(QuirkUtility.Quirks.Breeder) || Pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish))
{ {
Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetishSafe, cummer); Pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.CameInsideFFetishSafe, cummer);
} }
@ -1985,7 +1967,7 @@ namespace RJW_Menstruation
public class Egg : IExposable public class Egg : IExposable
{ {
public bool fertilized; public bool fertilized;
public int lifeSpanTicks; // Actual ticks scaled by cycleAcceleration public int lifeSpanTicks;
public Pawn fertilizer; public Pawn fertilizer;
public int ageTicks; public int ageTicks;
public int ticksSinceFertilization = 0; public int ticksSinceFertilization = 0;
@ -2012,25 +1994,23 @@ namespace RJW_Menstruation
{ {
int lifespanhrs = -1; int lifespanhrs = -1;
int position = -1; int position = -1;
int fertstage = -1;
Scribe_Values.Look(ref lifespanhrs, "lifespanhrs", lifespanhrs, true); Scribe_Values.Look(ref lifespanhrs, "lifespanhrs", lifespanhrs, true);
Scribe_Values.Look(ref position, "position", position, true); Scribe_Values.Look(ref position, "position", position, true);
Scribe_Values.Look(ref fertstage, "fertstage", fertstage, true);
if (lifespanhrs >= 0) lifeSpanTicks = lifespanhrs * GenDate.TicksPerHour; if (lifespanhrs >= 0) lifeSpanTicks = lifespanhrs * GenDate.TicksPerHour;
if (position >= 0) ageTicks = position * GenDate.TicksPerHour; if (position >= 0) ageTicks = position * GenDate.TicksPerHour;
if (fertstage >= 0) ticksSinceFertilization = fertstage * GenDate.TicksPerHour;
} }
Scribe_References.Look(ref fertilizer, "fertilizer", true); Scribe_References.Look(ref fertilizer, "fertilizer", true);
Scribe_Values.Look(ref fertilized, "fertilized", false); Scribe_Values.Look(ref fertilized, "fertilized", false);
Scribe_Values.Look(ref lifeSpanTicks, "lifeSpanTicks", lifeSpanTicks, true); Scribe_Values.Look(ref lifeSpanTicks, "lifeSpanTicks", lifeSpanTicks, true);
Scribe_Values.Look(ref ageTicks, "ageTicks", ageTicks, true); Scribe_Values.Look(ref ageTicks, "ageTicks", ageTicks, true);
Scribe_Values.Look(ref ticksSinceFertilization, "ticksSinceFertilization", 0); Scribe_Values.Look(ref ticksSinceFertilization, "ticksSinceFertilization", 0);
if (ticksSinceFertilization == 0 && Scribe.mode == LoadSaveMode.LoadingVars)
{
// A bit awkward to do this twice, but it prevents ticksSinceFertilization from getting overwritten on a fertstage load
int fertstage = -1;
Scribe_Values.Look(ref fertstage, "fertstage", fertstage, true);
if (fertstage >= 0) ticksSinceFertilization = fertstage * GenDate.TicksPerHour;
}
} }
} }
} }
public class HediffComp_Anus : HediffComp public class HediffComp_Anus : HediffComp

View file

@ -349,7 +349,7 @@ namespace RJW_Menstruation
else if (hediff is Hediff_BasePregnancy rjw_preg) else if (hediff is Hediff_BasePregnancy rjw_preg)
return (rjw_preg.p_end_tick - rjw_preg.p_start_tick) / GenDate.TicksPerHour; return (rjw_preg.p_end_tick - rjw_preg.p_start_tick) / GenDate.TicksPerHour;
// TODO: Biotech pregnancy // TODO: Biotech pregnancy
else return hediff.pawn.RaceProps.gestationPeriodDays * GenDate.HoursPerDay; else return hediff.pawn.def.race.gestationPeriodDays * GenDate.HoursPerDay;
} }
public static float RandomVariabilityPercent(int recursion = 0) public static float RandomVariabilityPercent(int recursion = 0)
@ -401,22 +401,6 @@ namespace RJW_Menstruation
return false; return false;
} }
public static bool WantsToGetPregnant(this Pawn pawn)
{
if (pawn.HasQuirk(QuirkUtility.Quirks.Breeder) ||
pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish))
return true;
Ideo ideo = pawn.Ideo;
if (ideo == null || VariousDefOf.Pregnancy_Elevated == null) return false;
if (ideo.HasPrecept(VariousDefOf.Pregnancy_Elevated) ||
ideo.HasPrecept(VariousDefOf.Pregnancy_Holy) ||
ideo.HasPrecept(VariousDefOf.Pregnancy_Required))
return true;
return false;
}
public static float DamagePants(this Pawn pawn, float fluidAmount) public static float DamagePants(this Pawn pawn, float fluidAmount)
{ {
if (pawn.apparel == null) return 0; if (pawn.apparel == null) return 0;

View file

@ -23,11 +23,11 @@ namespace RJW_Menstruation
{ {
if (is_discovered || if (is_discovered ||
!xxx.is_human(pawn) || !xxx.is_human(pawn) ||
pawn.HasQuirk(QuirkUtility.Quirks.Breeder) || (pawn.Ideo?.HasPrecept(VariousDefOf.Pregnancy_Required) ?? false) || pawn.HasQuirk(QuirkUtility.Quirks.Breeder) ||
(pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Spouse) || (pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Spouse) ||
x.def.Equals(PawnRelationDefOf.Fiance))) != null) x.def.Equals(PawnRelationDefOf.Fiance))) != null)
return; return;
if (pawn.WantsToGetPregnant() || pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Lover)) != null) if (pawn.HasQuirk(QuirkUtility.Quirks.ImpregnationFetish) || pawn.relations?.DirectRelations?.Find(x => x.def.Equals(PawnRelationDefOf.Lover)) != null)
{ {
pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.UnwantedPregnancyMild); pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.UnwantedPregnancyMild);
} }

View file

@ -16,7 +16,7 @@ namespace RJW_Menstruation.Patch
{ {
if (!__result.NullOrEmpty()) return; if (!__result.NullOrEmpty()) return;
if (cummedPawns.Contains(pawn)) if (cummedPawns.Contains(pawn))
__result = "EggFertOrCumInWomb"; __result = "Has cum or fertilized egg in a womb";
} }
} }

View file

@ -15,13 +15,13 @@ namespace RJW_Menstruation
return milktexturecache; return milktexturecache;
} }
} }
// Ovulation, sex drive // Sex drive
public static Texture2D OvulatoryTexture public static Texture2D SexDriveTexture
{ {
get get
{ {
if (ovulatorytexturecache == null) ovulatorytexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f); if (sexdrivetexturecache == null) sexdrivetexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f);
return ovulatorytexturecache; return sexdrivetexturecache;
} }
} }
// Bleeding, vulnerability // Bleeding, vulnerability
@ -93,7 +93,7 @@ namespace RJW_Menstruation
public static readonly Texture2D GatherCum_Pussy = ContentFinder<Texture2D>.Get("UI/Icon/ToPussy"); public static readonly Texture2D GatherCum_Pussy = ContentFinder<Texture2D>.Get("UI/Icon/ToPussy");
private static Texture2D milktexturecache = SolidColorMaterials.NewSolidColorTexture(0.992f, 1.0f, 0.960f, 1.0f); private static Texture2D milktexturecache = SolidColorMaterials.NewSolidColorTexture(0.992f, 1.0f, 0.960f, 1.0f);
private static Texture2D ovulatorytexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f); private static Texture2D sexdrivetexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f);
private static Texture2D bleedingtexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f); private static Texture2D bleedingtexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f);
private static Texture2D pregnanttexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f); private static Texture2D pregnanttexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f);
private static Texture2D recovertexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f); private static Texture2D recovertexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f);
@ -101,5 +101,10 @@ namespace RJW_Menstruation
private static Texture2D animaltexturecache = SolidColorMaterials.NewSolidColorTexture(0.411f, 0.521f, 0.878f, 1.0f); private static Texture2D animaltexturecache = SolidColorMaterials.NewSolidColorTexture(0.411f, 0.521f, 0.878f, 1.0f);
private static Texture2D lutealtexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f); private static Texture2D lutealtexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f);
private static Texture2D whoredtexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f); private static Texture2D whoredtexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f);
} }
} }

View file

@ -433,7 +433,7 @@ namespace RJW_Menstruation
float statvalue; float statvalue;
const float height = 24f; const float height = 24f;
statvalue = pawn.GetStatValue(xxx.sex_drive_stat); statvalue = pawn.GetStatValue(xxx.sex_drive_stat);
FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.OvulatoryTexture, Texture2D.blackTexture, xxx.sex_drive_stat.description); FillableBarLabeled(lineRect, " " + xxx.sex_drive_stat.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue / 2, TextureCache.SexDriveTexture, Texture2D.blackTexture, xxx.sex_drive_stat.description);
lineRect.y += height; lineRect.y += height;
statvalue = pawn.GetStatValue(xxx.vulnerability_stat); statvalue = pawn.GetStatValue(xxx.vulnerability_stat);

View file

@ -53,7 +53,7 @@ namespace RJW_Menstruation
if (pawn.kindDef?.race == pawn.def) return pawn.kindDef; if (pawn.kindDef?.race == pawn.def) return pawn.kindDef;
return VariousDefOf.AllKinds.Find(kind => kind.race == pawn.def && kind.defName.Contains("Colonist")) ?? return VariousDefOf.AllKinds.Find(kind => kind.race == pawn.def && kind.defName.Contains("Colonist")) ??
VariousDefOf.AllKinds.Find(kind => kind.race == pawn.def) ?? VariousDefOf.AllKinds.Find(kind => kind.race == pawn.def) ??
pawn.RaceProps?.AnyPawnKind ?? pawn.def.race?.AnyPawnKind ??
pawn.kindDef; pawn.kindDef;
} }

View file

@ -167,10 +167,5 @@ namespace RJW_Menstruation
public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent"); public static readonly HediffDef Hediff_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Permanent");
public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent"); public static readonly HediffDef Hediff_Heavy_Lactating_Permanent = DefDatabase<HediffDef>.GetNamedSilentFail("Heavy_Lactating_Permanent");
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC"); public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC");
// Defs from Sexperience Ideology
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");
public static readonly PreceptDef Pregnancy_Holy = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Holy");
public static readonly PreceptDef Pregnancy_Required = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Required");
} }
} }

View file

@ -2,7 +2,6 @@ Version 1.0.9.0
- Fix errors when opening the womb dialog of some low fertility pawns. - Fix errors when opening the womb dialog of some low fertility pawns.
- Updated Traditional Chinese translation by Hydrogen. - Updated Traditional Chinese translation by Hydrogen.
- New options to update wombs more or less often, defaulting to every hour. - New options to update wombs more or less often, defaulting to every hour.
- When using the sexperience-ideology mod, pawns with pro-pregnancy precepts will have thoughts more agreeable with potential pregnancies.
- More generous egg allocation for newly spawned periodic ovulators. - More generous egg allocation for newly spawned periodic ovulators.
- Menstruation-related genes will now stay on females during initial pawn setup. - Menstruation-related genes will now stay on females during initial pawn setup.