Merge branch 'dev'
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_2.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_3.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_Large.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_Large_Stretched.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_Many.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
1.3/Textures/Womb/Insect_Egged/Womb_Egged_Multiple_ManyMixed.png
Normal file
After Width: | Height: | Size: 13 KiB |
|
@ -393,11 +393,8 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (!eggs.NullOrEmpty()) foreach (Egg egg in eggs)
|
if (eggs.NullOrEmpty()) return -1;
|
||||||
{
|
return eggs.Max(egg => egg.fertstage);
|
||||||
if (egg.fertilized) return egg.fertstage;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public IEnumerable<Pawn> GetCummersAndFertilizers()
|
public IEnumerable<Pawn> GetCummersAndFertilizers()
|
||||||
|
@ -567,6 +564,12 @@ namespace RJW_Menstruation
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Pregnancy != null && curStage != Stage.Pregnant)
|
||||||
|
{
|
||||||
|
Log.Warning($"{Pawn}'s womb has a pregnancy, but was not in the pregnant stage");
|
||||||
|
curStage = Stage.Pregnant;
|
||||||
|
}
|
||||||
|
|
||||||
CumOut();
|
CumOut();
|
||||||
if (pregnancy == null && Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
|
if (pregnancy == null && Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young;
|
||||||
switch (curStage)
|
switch (curStage)
|
||||||
|
@ -627,7 +630,7 @@ namespace RJW_Menstruation
|
||||||
Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({Pawn}).");
|
Log.Warning($"Attempted to remove menstruation comp from wrong pawn ({Pawn}).");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(pregnancy is Hediff_MechanoidPregnancy))
|
if (pregnancy != null && !(pregnancy is Hediff_MechanoidPregnancy))
|
||||||
pregnancy.Miscarry();
|
pregnancy.Miscarry();
|
||||||
base.CompPostPostRemoved();
|
base.CompPostPostRemoved();
|
||||||
}
|
}
|
||||||
|
@ -824,7 +827,7 @@ namespace RJW_Menstruation
|
||||||
if (cums.NullOrEmpty()) return;
|
if (cums.NullOrEmpty()) return;
|
||||||
if (TotalCum > Props.maxCumCapacity * Pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * Pawn.BodySize) / 10, 2f);
|
if (TotalCum > Props.maxCumCapacity * Pawn.BodySize) leakfactor = Math.Min(1 + (TotalCum - Props.maxCumCapacity * Pawn.BodySize) / 10, 2f);
|
||||||
if (absorber != null && absorber.dirty && !absorber.LeakAfterDirty) leakfactor = 0f;
|
if (absorber != null && absorber.dirty && !absorber.LeakAfterDirty) leakfactor = 0f;
|
||||||
if (Pawn.jobs?.curJob?.def == xxx.knotted) leakfactor = 0f;
|
if (Pawn.CurJobDef == xxx.knotted) leakfactor = 0f;
|
||||||
List<Cum> removecums = new List<Cum>();
|
List<Cum> removecums = new List<Cum>();
|
||||||
foreach (Cum cum in cums)
|
foreach (Cum cum in cums)
|
||||||
{
|
{
|
||||||
|
@ -1179,22 +1182,26 @@ namespace RJW_Menstruation
|
||||||
continue;
|
continue;
|
||||||
else if (egg.fertilizer == null)
|
else if (egg.fertilizer == null)
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Could not implant {Pawn}'s egg due to null father");
|
||||||
deadeggs.Add(egg);
|
deadeggs.Add(egg);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any() || pregnancy is Hediff_MechanoidPregnancy)
|
else if (Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any() || pregnancy is Hediff_MechanoidPregnancy)
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Could not implant {Pawn}'s egg due to insect or mechanoid pregnancy");
|
||||||
deadeggs.Add(egg);
|
deadeggs.Add(egg);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
|
else if (Rand.Range(0.0f, 1.0f) <= Configurations.ImplantationChance * ImplantFactor * InterspeciesImplantFactor(egg.fertilizer))
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Implanting fertilized egg of {Pawn}, father {egg.fertilizer}");
|
||||||
if (pregnancy != null)
|
if (pregnancy != null)
|
||||||
{
|
{
|
||||||
if (Configurations.UseMultiplePregnancy && Configurations.EnableHeteroOvularTwins)
|
if (Configurations.UseMultiplePregnancy && Configurations.EnableHeteroOvularTwins)
|
||||||
{
|
{
|
||||||
if (pregnancy is Hediff_MultiplePregnancy h)
|
if (pregnancy is Hediff_MultiplePregnancy h)
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Adding to existing pregnancy");
|
||||||
h.AddNewBaby(Pawn, egg.fertilizer);
|
h.AddNewBaby(Pawn, egg.fertilizer);
|
||||||
}
|
}
|
||||||
pregnant = true;
|
pregnant = true;
|
||||||
|
@ -1210,6 +1217,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
if (!Configurations.UseMultiplePregnancy)
|
if (!Configurations.UseMultiplePregnancy)
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Creating new base RJW pregnancy");
|
||||||
PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer);
|
PregnancyHelper.PregnancyDecider(Pawn, egg.fertilizer);
|
||||||
// I hate having to do this, but it gets the newest pregnancy
|
// I hate having to do this, but it gets the newest pregnancy
|
||||||
pregnancy = Pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
|
pregnancy = Pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
|
||||||
|
@ -1218,6 +1226,7 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Creating new pregnancy");
|
||||||
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
|
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(Pawn, egg.fertilizer);
|
||||||
pregnant = true;
|
pregnant = true;
|
||||||
deadeggs.Add(egg);
|
deadeggs.Add(egg);
|
||||||
|
@ -1225,7 +1234,11 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else deadeggs.Add(egg);
|
else
|
||||||
|
{
|
||||||
|
if (Configurations.Debug) Log.Message($"Fertilized egg of {Pawn} failed to implant (father {egg.fertilizer})");
|
||||||
|
deadeggs.Add(egg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pregnant && (!Configurations.UseMultiplePregnancy || !Configurations.EnableHeteroOvularTwins))
|
if (pregnant && (!Configurations.UseMultiplePregnancy || !Configurations.EnableHeteroOvularTwins))
|
||||||
|
|
|
@ -123,7 +123,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
for (int i = babycount; i > 1; i--)
|
for (int i = babycount; i > 1; i--)
|
||||||
{
|
{
|
||||||
Texture2D result = ContentFinder<Texture2D>.Get((path + "_Multiplet_" + i), false);
|
Texture2D result = ContentFinder<Texture2D>.Get(path + "_Multiplet_" + i, false);
|
||||||
if (result != null) return result;
|
if (result != null) return result;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -155,14 +155,30 @@ namespace RJW_Menstruation
|
||||||
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
|
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
|
||||||
return cumtex;
|
return cumtex;
|
||||||
}
|
}
|
||||||
|
public static Texture2D GetInsectEggedIcon(this HediffComp_Menstruation comp)
|
||||||
|
{
|
||||||
|
List<Hediff_InsectEgg> hediffs = comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().ToList();
|
||||||
|
if (hediffs.NullOrEmpty()) return null;
|
||||||
|
string path = "Womb/Insect_Egged/";
|
||||||
|
if (hediffs.Max(hediff => hediff.eggssize) > 0.3) // The threshold for "large egg" in the debug
|
||||||
|
{
|
||||||
|
if (hediffs.Count == 1) return ContentFinder<Texture2D>.Get(path + "Womb_Egged_Large", true);
|
||||||
|
else return ContentFinder<Texture2D>.Get(path + "Womb_Egged_ManyMixed", true);
|
||||||
|
}
|
||||||
|
Texture2D result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_" + hediffs.Count(), false);
|
||||||
|
if (result == null) result = ContentFinder<Texture2D>.Get(path + "Womb_Egged_Many", true);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
|
public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
|
||||||
{
|
{
|
||||||
if (comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().FirstOrDefault() != null) return ContentFinder<Texture2D>.Get(("Womb/Womb_Egged"), true);
|
Texture2D wombtex = comp.GetInsectEggedIcon();
|
||||||
|
if (wombtex != null) return wombtex;
|
||||||
string icon = comp.WombTex;
|
string icon = comp.WombTex;
|
||||||
HediffComp_Menstruation.Stage stage = comp.curStage;
|
HediffComp_Menstruation.Stage stage = comp.curStage;
|
||||||
if (stage == HediffComp_Menstruation.Stage.Bleeding) icon += "_Bleeding";
|
if (stage == HediffComp_Menstruation.Stage.Bleeding) icon += "_Bleeding";
|
||||||
|
|
||||||
Texture2D wombtex = ContentFinder<Texture2D>.Get((icon), true);
|
wombtex = ContentFinder<Texture2D>.Get(icon, true);
|
||||||
|
|
||||||
return wombtex;
|
return wombtex;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +195,15 @@ namespace RJW_Menstruation
|
||||||
case HediffComp_Menstruation.Stage.Follicular:
|
case HediffComp_Menstruation.Stage.Follicular:
|
||||||
case HediffComp_Menstruation.Stage.ClimactericFollicular:
|
case HediffComp_Menstruation.Stage.ClimactericFollicular:
|
||||||
if (!includeOvary) break;
|
if (!includeOvary) break;
|
||||||
if (comp is HediffComp_InducedOvulator) break;
|
if (comp is HediffComp_InducedOvulator)
|
||||||
|
{
|
||||||
|
if (comp.Pawn.jobs.curDriver is JobDriver_Sex job &&
|
||||||
|
job.Sexprops != null &&
|
||||||
|
!job.Sexprops.usedCondom &&
|
||||||
|
(job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration))
|
||||||
|
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_01", true);
|
||||||
|
else break;
|
||||||
|
}
|
||||||
if (comp.curStageHrs > comp.CurStageIntervalHours - 30) // Approximate time for ovulation to occur
|
if (comp.curStageHrs > comp.CurStageIntervalHours - 30) // Approximate time for ovulation to occur
|
||||||
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_01", true);
|
return ContentFinder<Texture2D>.Get("Ovaries/Ovary_01", true);
|
||||||
else break;
|
else break;
|
||||||
|
|
|
@ -728,8 +728,15 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public string DueDate()
|
public string DueDate()
|
||||||
{
|
{
|
||||||
if (pawn.Map == null) return "";
|
if (pawn.Tile == -1) return "";
|
||||||
return GenDate.DateFullStringWithHourAt(GenDate.TickGameToAbs((int)p_end_tick), Find.WorldGrid.LongLatOf(pawn.Map.Tile));
|
return GenDate.DateFullStringWithHourAt(GenDate.TickGameToAbs((int)p_end_tick), Find.WorldGrid.LongLatOf(pawn.Tile));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool TryMergeWith(Hediff other)
|
||||||
|
{
|
||||||
|
if (other is Hediff_MultiplePregnancy preg)
|
||||||
|
return this.GetMenstruationComp() == preg.GetMenstruationComp();
|
||||||
|
else return base.TryMergeWith(other);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
Color c = comp.GetCumMixtureColor;
|
Color c = comp.GetCumMixtureColor;
|
||||||
|
|
||||||
Gizmo gizmo = new Gizmo_Womb
|
return new Gizmo_Womb
|
||||||
{
|
{
|
||||||
defaultLabel = pawn.LabelShort,
|
defaultLabel = pawn.LabelShort,
|
||||||
defaultDesc = description,
|
defaultDesc = description,
|
||||||
|
@ -98,16 +98,14 @@ namespace RJW_Menstruation
|
||||||
cumcolor = c,
|
cumcolor = c,
|
||||||
comp = comp,
|
comp = comp,
|
||||||
order = 100,
|
order = 100,
|
||||||
hotKey = VariousDefOf.OpenStatusWindowKey,
|
hotKey = comp == pawn.GetFirstMenstruationComp() ? VariousDefOf.OpenStatusWindowKey : null,
|
||||||
|
groupKey = 0,
|
||||||
action = delegate
|
action = delegate
|
||||||
{
|
{
|
||||||
Dialog_WombStatus.ToggleWindow(pawn, comp);
|
Dialog_WombStatus.ToggleWindow(pawn, comp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return gizmo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,11 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool GroupsWith(Gizmo other)
|
||||||
|
{
|
||||||
|
if (other is Gizmo_Womb womb && womb.comp != this.comp) return false;
|
||||||
|
else return base.GroupsWith(other);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.7.2</version>
|
<version>1.0.7.3</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
|
Version 1.0.7.3
|
||||||
|
- Fix null reference error upon birth of female pawns.
|
||||||
|
- Properly display multiple icons for pawns with multiple wombs.
|
||||||
|
- Fix only a single womb being able to become pregnant at a time. Requires multiple pregnancy enabled in the options.
|
||||||
|
- Show the 'about to ovulate' icon in the womb dialog for induced ovulators during vaginal sex.
|
||||||
|
- Display more insect eggs in a womb when someone has more, with new graphics by Euldrop.
|
||||||
|
|
||||||
Version 1.0.7.2
|
Version 1.0.7.2
|
||||||
- Fix errors when trying to open dev actions when HAR is not installed
|
- Fix errors when trying to open dev actions when HAR is not installed.
|
||||||
- Fix "error processing breasts" for pawns with vanilla pregnancy (e.g. animals)
|
- Fix "error processing breasts" for pawns with vanilla pregnancy (e.g. animals).
|
||||||
- Removing a vagina won't end a mechanoid implant anymore.
|
- Removing a vagina won't end a mechanoid implant anymore.
|
||||||
|
|
||||||
Version 1.0.7.1
|
Version 1.0.7.1
|
||||||
|
|