Compare commits

..

1 commit

Author SHA1 Message Date
Akiyami Solo
7a92cce993 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-01 05:14:47 +00:00
3 changed files with 6 additions and 18 deletions

View file

@ -639,14 +639,10 @@ namespace RJW_Menstruation
if (Scribe.mode == LoadSaveMode.PostLoadInit)
{
Initialize();
// 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");
if (pregnancy is HediffWithParents vanillaPreg && vanillaPreg.Mother == vanillaPreg.Father) // Fix mother == father issue
vanillaPreg.SetParents(vanillaPreg.Mother, null, vanillaPreg.geneSet);
}
}
}
public override void CompPostPostAdd(DamageInfo? dinfo)
@ -794,7 +790,7 @@ namespace RJW_Menstruation
{
get
{
if (Pawn.Dead || !Pawn.ShouldCycle()) return null;
if (Pawn.Dead) return null;
StringBuilder tip = new StringBuilder();
tip.Append(Translations.Dialog_WombInfo01);
tip.Append(": ");
@ -816,11 +812,7 @@ namespace RJW_Menstruation
public override string CompDebugString()
{
if (Pawn.Dead ||
!Pawn.ShouldCycle() ||
curStage == Stage.None ||
curStage == Stage.Infertile ||
curStage == Stage.Pregnant) return null;
if (Pawn.Dead || 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,14 +33,10 @@ namespace RJW_Menstruation
foreach (LocalTargetInfo t in selftargets)
{
if (t.Pawn == pawn)
{
if (pawn.HasMenstruationComp() && pawn.ShouldCycle())
opts.AddDistinct(MakeSelfMenu(pawn, t));
if (t.Pawn == pawn && pawn.HasMenstruationComp()) opts.AddDistinct(MakeSelfMenu(pawn, t));
break;
}
}
}
public static FloatMenuOption MakeSelfMenu(Pawn pawn, LocalTargetInfo target)
{