This commit is contained in:
moreoreganostodump 2021-08-29 22:54:54 +09:00
parent 86db33f800
commit ee897672c9
9 changed files with 30 additions and 45 deletions

Binary file not shown.

View file

@ -475,7 +475,7 @@ namespace RJW_Menstruation
{ {
get get
{ {
return curStageHrs / CurStageIntervalHours; return Mathf.Clamp01(curStageHrs / CurStageIntervalHours);
} }
} }
@ -1340,6 +1340,7 @@ namespace RJW_Menstruation
EggDecay(); EggDecay();
Implant(); Implant();
} }
if (parent.pawn.IsPregnant()) if (parent.pawn.IsPregnant())
{ {
curStageHrs += 1; curStageHrs += 1;

View file

@ -326,22 +326,22 @@ namespace RJW_Menstruation
} }
} }
if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike) //if (xxx.has_traits(pawn) && pawn.RaceProps.Humanlike)
{ //{
foreach (Trait momtrait in pawn.story.traits.allTraits) // foreach (Trait momtrait in pawn.story.traits.allTraits)
{ // {
if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(momtrait.def.defName)) // if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(momtrait.def.defName))
traitpool.Add(momtrait); // traitpool.Add(momtrait);
} // }
} //}
if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike) //if (father != null && xxx.has_traits(father) && father.RaceProps.Humanlike)
{ //{
foreach (Trait poptrait in father.story.traits.allTraits) // foreach (Trait poptrait in father.story.traits.allTraits)
{ // {
if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(poptrait.def.defName)) // if (!RJWPregnancySettings.trait_filtering_enabled || !non_genetic_traits.Contains(poptrait.def.defName))
traitpool.Add(poptrait); // traitpool.Add(poptrait);
} // }
} //}
updateTraits(baby, traitpool); updateTraits(baby, traitpool);
} }

View file

@ -9,8 +9,12 @@ namespace RJW_Menstruation
[HarmonyPatch(typeof(PregnancyHelper), "impregnate")] [HarmonyPatch(typeof(PregnancyHelper), "impregnate")]
public static class impregnate_Patch public static class impregnate_Patch
{ {
public static bool Prefix(Pawn pawn, Pawn partner, xxx.rjwSextype sextype = xxx.rjwSextype.None) public static bool Prefix(SexProps props)
{ {
xxx.rjwSextype sextype = props.sexType;
Pawn pawn = props.pawn;
Pawn partner = props.partner;
if (sextype == xxx.rjwSextype.Vaginal) if (sextype == xxx.rjwSextype.Vaginal)
{ {
var pawnpartBPR = Genital_Helper.get_genitalsBPR(pawn); var pawnpartBPR = Genital_Helper.get_genitalsBPR(pawn);
@ -107,30 +111,6 @@ namespace RJW_Menstruation
} }
} }
[HarmonyPatch(typeof(JobDriver_Sex), "Orgasm")]
public static class Orgasm_Patch
{
public static void Postfix(JobDriver_Sex __instance, int ___sex_ticks, int ___orgasmstick, Pawn ___pawn, xxx.rjwSextype ___sexType, bool ___usedCondom)
{
if (___sex_ticks - 1 > ___orgasmstick) //~3s at speed 1
{
return;
}
if (___pawn.jobs?.curDriver is JobDriver_SexBaseInitiator)
{
if (___sexType == xxx.rjwSextype.Vaginal && !___usedCondom)
{
if (!___pawn.Dead && !__instance.Partner.Dead)
{
PregnancyHelper.impregnate(___pawn, __instance.Partner, ___sexType);
}
}
}
}
}
[HarmonyPatch(typeof(Hediff_BasePregnancy), "PostBirth")] [HarmonyPatch(typeof(Hediff_BasePregnancy), "PostBirth")]
public static class RJW_Patch_PostBirth public static class RJW_Patch_PostBirth
{ {

View file

@ -74,10 +74,9 @@ namespace RJW_Menstruation
if (window != null) if (window != null)
{ {
List<Pawn> pawns = Find.Selector.SelectedPawns.FindAll(x => x.ShouldShowWombGizmo()); List<Pawn> pawns = Find.Selector.SelectedPawns.FindAll(x => x.ShouldShowWombGizmo());
if (!pawns.NullOrEmpty() && pawns.Count > 1) if (Input.GetKey(VariousDefOf.OpenStatusWindowKey.MainKey) && !pawns.NullOrEmpty() && pawns.Count > 1)
{ {
int index = pawns.IndexOf(window.pawn); int index = pawns.IndexOf(window.pawn);
SoundDefOf.TabOpen.PlayOneShotOnCamera(); SoundDefOf.TabOpen.PlayOneShotOnCamera();
Pawn newpawn = pawns[(index + 1) % pawns.Count]; Pawn newpawn = pawns[(index + 1) % pawns.Count];
window.ChangePawn(newpawn, newpawn.GetMenstruationComp()); window.ChangePawn(newpawn, newpawn.GetMenstruationComp());

View file

@ -11,7 +11,7 @@ namespace RJW_Menstruation
public const float progressbarHeight = 2f; public const float progressbarHeight = 2f;
protected override void DrawIcon(Rect rect, Material buttonMat, GizmoRenderParms parms) public override void DrawIcon(Rect rect, Material buttonMat, GizmoRenderParms parms)
{ {
Texture2D badTex = icon; Texture2D badTex = icon;
Texture2D overay = icon_overay; Texture2D overay = icon_overay;

View file

@ -1,4 +1,9 @@
Version 1.0.5.6
- requires RJW 4.8.0 or later
- fixed womb gizmo not worked properly
Version 1.0.5.5 Version 1.0.5.5
- not compatible with RJW 4.8.0 or later
- clicking vagina and anus image will show origin state - clicking vagina and anus image will show origin state
- fixed loadfolders.xml for other platforms - fixed loadfolders.xml for other platforms
- added load orders - added load orders