Compare commits

...

12 commits

Author SHA1 Message Date
Akiyami Solo
44f7b692d3 Merge branch 'dev' into 'dev'
Breast fullness is not displayed and the "milk yourself" action is not invoked on a pawn when the rjw-mc-biotech mod is present

See merge request lutepickle/rjw_menstruation!6
2024-08-04 22:57:59 +00:00
lutepickle
36c88d2752 Null check for pawn job in GetOvaryIcon 2024-08-03 08:59:06 -07:00
lutepickle
3d9b22776e Remove vaginal washing order for pawns that don't cycle 2024-07-31 15:20:07 -07:00
lutepickle
80611882c9 Don't show stage or time to next stage for pawns that don't cycle 2024-07-31 15:16:06 -07:00
lutepickle
f70c2ad585 Put a warning in the log when loading a pregnancy with mother == father 2024-07-31 07:22:20 -07:00
Акиями Соло
cdfe9b44b8 reduction of unnecessary inspections 2024-01-11 20:55:26 +03:00
Акиями Соло
b21fc85a29 fix JobDef link for mod rjw-mc-biotech mod 2024-01-11 20:39:07 +03:00
Акиями Соло
48f020d832 fix display of breast fullness in gui for rjw-mc-biotech mod 2024-01-11 20:38:38 +03:00
lutepickle
23ae342722 Merge branch 'dev' 2024-01-08 13:55:51 -08:00
lutepickle
509eeabddc Merge branch 'dev' 2023-07-28 17:29:32 -07:00
lutepickle
6fabfd6aaf Revert "Initialize womb when displaying gizmo if needed."
This reverts commit ebbbf8ee7f.
2023-07-03 09:08:52 -07:00
lutepickle
ebbbf8ee7f Initialize womb when displaying gizmo if needed. 2023-07-03 08:54:19 -07:00
5 changed files with 23 additions and 8 deletions

View file

@ -276,7 +276,10 @@ namespace RJW_Menstruation
float res = 0;
if (VariousDefOf.Hediff_Heavy_Lactating_Permanent != null)
{
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("hypermilkable"));
if (pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Heavy_Lactating_Permanent)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Permanent)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Natural)
|| pawn.health.hediffSet.HasHediff(VariousDefOf.Hediff_Lactating_Drug)) milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkablehuman"));
else milkcomp = pawn.AllComps.FirstOrDefault(x => x.GetType().ToString().ToLower().Contains("milkable"));
}
else

View file

@ -158,7 +158,7 @@ namespace RJW_Menstruation
public static readonly HediffDef Hediff_Lactating_Natural = DefDatabase<HediffDef>.GetNamedSilentFail("Lactating_Natural");
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 JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("LactateSelf_MC");
public static readonly JobDef Job_LactateSelf_MC = DefDatabase<JobDef>.GetNamedSilentFail("MilkSelf");
// Defs from Sexperience Ideology
public static readonly PreceptDef Pregnancy_Elevated = DefDatabase<PreceptDef>.GetNamedSilentFail("Pregnancy_Elevated");

View file

@ -639,8 +639,12 @@ namespace RJW_Menstruation
if (Scribe.mode == LoadSaveMode.PostLoadInit)
{
Initialize();
if (pregnancy is HediffWithParents vanillaPreg && vanillaPreg.Mother == vanillaPreg.Father) // Fix mother == father issue
// Biotech labor errors if the mother is also the father, so don't let that happen
if (pregnancy is HediffWithParents vanillaPreg && vanillaPreg.Mother == vanillaPreg.Father && vanillaPreg.Mother != null)
{
Log.Warning($"Pregnancy of {Pawn} has same mother and father, setting father to null");
vanillaPreg.SetParents(vanillaPreg.Mother, null, vanillaPreg.geneSet);
}
}
}
@ -790,7 +794,7 @@ namespace RJW_Menstruation
{
get
{
if (Pawn.Dead) return null;
if (Pawn.Dead || !Pawn.ShouldCycle()) return null;
StringBuilder tip = new StringBuilder();
tip.Append(Translations.Dialog_WombInfo01);
tip.Append(": ");
@ -812,7 +816,11 @@ namespace RJW_Menstruation
public override string CompDebugString()
{
if (Pawn.Dead || curStage == Stage.None || curStage == Stage.Infertile || curStage == Stage.Pregnant) return null;
if (Pawn.Dead ||
!Pawn.ShouldCycle() ||
curStage == Stage.None ||
curStage == Stage.Infertile ||
curStage == Stage.Pregnant) return null;
StringBuilder debugString = new StringBuilder();
debugString.Append($"Time to next state: ");
debugString.Append(GenDate.ToStringTicksToPeriod(TicksToNextStage()));

View file

@ -242,7 +242,7 @@ namespace RJW_Menstruation
bool isInduced = comp is HediffComp_InducedOvulator;
if (comp.curStage == HediffComp_Menstruation.Stage.Follicular &&
isInduced &&
comp.Pawn.jobs.curDriver is JobDriver_Sex job &&
comp.Pawn.jobs?.curDriver is JobDriver_Sex job &&
job.Sexprops != null &&
!UsingCondom(comp.Pawn, job.Partner) &&
(job.Sexprops.sexType == xxx.rjwSextype.Vaginal || job.Sexprops.sexType == xxx.rjwSextype.DoublePenetration))

View file

@ -33,8 +33,12 @@ namespace RJW_Menstruation
foreach (LocalTargetInfo t in selftargets)
{
if (t.Pawn == pawn && pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
break;
if (t.Pawn == pawn)
{
if (pawn.HasMenstruationComp() && pawn.ShouldCycle())
opts.AddDistinct(MakeSelfMenu(pawn, t));
break;
}
}
}