mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
1.0.1.12
This commit is contained in:
parent
8d75d7aac1
commit
a4e1be39f2
38 changed files with 1266 additions and 1171 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.1.11</version>
|
||||
<version>1.0.1.12</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
Binary file not shown.
|
@ -60,7 +60,7 @@
|
|||
</tags>
|
||||
</apparel>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Menstruation.AbsorberModExtention">
|
||||
<li Class="RJW_Menstruation.AbsorberModExtension">
|
||||
<leakAfterDirty>false</leakAfterDirty>
|
||||
<effectsAfterDirty>true</effectsAfterDirty>
|
||||
<minHourstoDirtyEffect>8</minHourstoDirtyEffect>
|
||||
|
@ -113,7 +113,7 @@
|
|||
</tags>
|
||||
</apparel>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Menstruation.AbsorberModExtention">
|
||||
<li Class="RJW_Menstruation.AbsorberModExtension">
|
||||
<leakAfterDirty>false</leakAfterDirty>
|
||||
<effectsAfterDirty>true</effectsAfterDirty>
|
||||
<minHourstoDirtyEffect>8</minHourstoDirtyEffect>
|
||||
|
@ -181,7 +181,7 @@
|
|||
</tags>
|
||||
</apparel>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Menstruation.AbsorberModExtention">
|
||||
<li Class="RJW_Menstruation.AbsorberModExtension">
|
||||
<leakAfterDirty>true</leakAfterDirty>
|
||||
<effectsAfterDirty>false</effectsAfterDirty>
|
||||
<dirtyDef>Absorber_Pad_Dirty</dirtyDef>
|
||||
|
@ -233,7 +233,7 @@
|
|||
</tags>
|
||||
</apparel>
|
||||
<modExtensions>
|
||||
<li Class="RJW_Menstruation.AbsorberModExtention">
|
||||
<li Class="RJW_Menstruation.AbsorberModExtension">
|
||||
<leakAfterDirty>true</leakAfterDirty>
|
||||
<effectsAfterDirty>false</effectsAfterDirty>
|
||||
<dirtyDef>Absorber_Pad_Dirty</dirtyDef>
|
||||
|
|
|
@ -74,6 +74,11 @@
|
|||
<Option20_Label_5>Hostile Faction</Option20_Label_5>
|
||||
<Option21_Label>target pawns</Option21_Label>
|
||||
<Option21_Desc>the gizmo and button will appear for these pawns</Option21_Desc>
|
||||
<Option22_Label>use hybrid extension</Option22_Label>
|
||||
<Option22_Desc>overrides RJW and RaceSupport's hybrid definition Dominant hybrid extension determines whose definition used first. Not recommended to change this</Option22_Desc>
|
||||
<Option23_Label>Dominant hybrid extension</Option23_Label>
|
||||
<Option23_Label_1>Mother</Option23_Label_1>
|
||||
<Option23_Label_2>Father</Option23_Label_2>
|
||||
|
||||
<FloatMenu_CleanSelf>Vaginal washing</FloatMenu_CleanSelf>
|
||||
|
||||
|
|
|
@ -74,6 +74,11 @@
|
|||
<Option20_Label_5>적대관계</Option20_Label_5>
|
||||
<Option21_Label>표시 대상</Option21_Label>
|
||||
<Option21_Desc>아이콘과 버튼을 표시할 대상입니다.</Option21_Desc>
|
||||
<Option22_Label>잡종 정의 대체</Option22_Label>
|
||||
<Option22_Desc>RJW와 RaceSupport의 잡종정의를 대체합니다. 우선순위는 누구의 잡종 정의를 우선으로 사용할지 정합니다. 변경하지 않는것을 추천합니다.</Option22_Desc>
|
||||
<Option23_Label>우선순위</Option23_Label>
|
||||
<Option23_Label_1>모</Option23_Label_1>
|
||||
<Option23_Label_2>부</Option23_Label_2>
|
||||
|
||||
<FloatMenu_CleanSelf>질세척</FloatMenu_CleanSelf>
|
||||
|
||||
|
|
|
@ -4,10 +4,22 @@
|
|||
<Operation Class="PatchOperationAddModExtension">
|
||||
<xpath>Defs/ThingDef[defName="Race's defName"]</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtention">
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtension">
|
||||
<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
|
||||
<cumColor>(255,255,255,255)</cumColor>
|
||||
<cumThickness>0.2</cumThickness>
|
||||
<hybridExtension>
|
||||
<Other Race's defName>
|
||||
<Race or PawnKind defName>1.0</Race or PawnKind defName>
|
||||
<Race or PawnKind defName>5.0</Race or PawnKind defName>
|
||||
<Race or PawnKind defName>7.0</Race or PawnKind defName>
|
||||
<Race or PawnKind defName>2.0</Race or PawnKind defName>
|
||||
</Other Race's defName>
|
||||
<Other Race's defName>
|
||||
<Race or PawnKind defName>98.0</Race or PawnKind defName>
|
||||
<Race or PawnKind defName>2.0</Race or PawnKind defName>
|
||||
</Other Race's defName>
|
||||
</hybridExtension>
|
||||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
|
@ -17,16 +29,52 @@
|
|||
<Operation Class="PatchOperationAddModExtension">
|
||||
<xpath>Defs/ThingDef[defName="Human"]</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtention">
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtension">
|
||||
<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
|
||||
<cumColor>(255,255,255,255)</cumColor>
|
||||
<cumThickness>0.2</cumThickness>
|
||||
<hybridExtension>
|
||||
<Horse>
|
||||
<Alien_Eponalike>1.0</Alien_Eponalike>
|
||||
</Horse>
|
||||
</hybridExtension>
|
||||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
|
||||
|
||||
<Operation Class="PatchOperationAddModExtension">
|
||||
<xpath>Defs/ThingDef[defName="Horse"]</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtension">
|
||||
<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
|
||||
<cumColor>(255,255,255,255)</cumColor>
|
||||
<cumThickness>0.2</cumThickness>
|
||||
<hybridExtension>
|
||||
<Donkey>
|
||||
<Mule>1.0</Mule>
|
||||
</Donkey>
|
||||
</hybridExtension>
|
||||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
<Operation Class="PatchOperationAddModExtension">
|
||||
<xpath>Defs/ThingDef[defName="Donkey"]</xpath>
|
||||
<value>
|
||||
<li Class="RJW_Menstruation.PawnDNAModExtension">
|
||||
<fetusTexPath>Fetus/Fetus_Default</fetusTexPath>
|
||||
<cumColor>(255,255,255,255)</cumColor>
|
||||
<cumThickness>0.2</cumThickness>
|
||||
<hybridExtension>
|
||||
<Horse>
|
||||
<Hinny>1.0</Hinny>
|
||||
</Horse>
|
||||
</hybridExtension>
|
||||
</li>
|
||||
</value>
|
||||
</Operation>
|
||||
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
Textures/Fetus/Fetus.zip
Normal file
BIN
Textures/Fetus/Fetus.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Textures/Genitals/Genitals.zip
Normal file
BIN
Textures/Genitals/Genitals.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Textures/Womb/Womb.zip
Normal file
BIN
Textures/Womb/Womb.zip
Normal file
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,8 @@
|
|||
Version 1.0.1.12
|
||||
- added HybridExtension attribute to PawnDNAModExtension
|
||||
- this will overrides RJW's hybrid definitions
|
||||
- supports more detailed hybrid definition
|
||||
- fixed bugs when menopause option off
|
||||
Version 1.0.1.11
|
||||
- added a button for opening status window in health tab
|
||||
- added option for this
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
|
@ -51,6 +47,9 @@ namespace RJW_Menstruation
|
|||
public static int BleedingAmount = BleedingAmountDefault;
|
||||
public static bool EnableButtonInHT = false;
|
||||
public static PawnFlags ShowFlag = PawnFlags.Colonist | PawnFlags.Prisoner;
|
||||
public static bool UseHybridExtention = true;
|
||||
public static bool MotherFirst = false;
|
||||
|
||||
|
||||
public static bool HARActivated = false;
|
||||
public static bool LLActivated = false;
|
||||
|
@ -81,8 +80,14 @@ namespace RJW_Menstruation
|
|||
|
||||
|
||||
}
|
||||
public static string HybridString(bool b)
|
||||
{
|
||||
if (b) return Translations.Option23_Label_1;
|
||||
else return Translations.Option23_Label_2;
|
||||
}
|
||||
|
||||
[Flags]public enum PawnFlags
|
||||
[Flags]
|
||||
public enum PawnFlags
|
||||
{
|
||||
None = 0,
|
||||
Colonist = 1,
|
||||
|
@ -120,6 +125,8 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref BleedingAmount, "BleedingAmount", BleedingAmount, true);
|
||||
Scribe_Values.Look(ref EnableButtonInHT, "EnableButtonInHT", EnableButtonInHT, true);
|
||||
Scribe_Values.Look(ref ShowFlag, "ShowFlag", ShowFlag, true);
|
||||
Scribe_Values.Look(ref UseHybridExtention, "UseHybridExtention", UseHybridExtention, true);
|
||||
Scribe_Values.Look(ref MotherFirst, "MotherFirst", MotherFirst, true);
|
||||
base.ExposeData();
|
||||
}
|
||||
|
||||
|
@ -178,8 +185,8 @@ namespace RJW_Menstruation
|
|||
listmain.Begin(mainRect);
|
||||
listmain.Gap(20f);
|
||||
Rect optionrect1 = listmain.GetRect(30f);
|
||||
Widgets.CheckboxLabeled(optionrect1.LeftHalf(), Translations.Option1_Label_1, ref Configurations.EnableWombIcon);
|
||||
Widgets.CheckboxLabeled(optionrect1.RightHalf(), Translations.Option1_Label_2, ref Configurations.EnableButtonInHT);
|
||||
Widgets.CheckboxLabeled(optionrect1.LeftHalf(), Translations.Option1_Label_1, ref Configurations.EnableWombIcon,false,null,null,true);
|
||||
Widgets.CheckboxLabeled(optionrect1.RightHalf(), Translations.Option1_Label_2, ref Configurations.EnableButtonInHT, false, null, null, true);
|
||||
//listmain.CheckboxLabeled(Translations.Option1_Label, ref Configurations.EnableWombIcon, Translations.Option1_Desc);
|
||||
if (Configurations.EnableWombIcon || Configurations.EnableButtonInHT)
|
||||
{
|
||||
|
@ -275,9 +282,16 @@ namespace RJW_Menstruation
|
|||
listmain.CheckboxLabeled(Translations.Option13_Label, ref Configurations.UseMultiplePregnancy, Translations.Option13_Desc);
|
||||
if (Configurations.UseMultiplePregnancy)
|
||||
{
|
||||
float sectionheight = 50f;
|
||||
float sectionheight = 75f;
|
||||
if (Configurations.EnableEnzygoticTwins) sectionheight += 100;
|
||||
Listing_Standard twinsection = listmain.BeginSection_NewTemp(sectionheight);
|
||||
Rect hybridrect = twinsection.GetRect(25);
|
||||
Widgets.CheckboxLabeled(hybridrect.LeftHalf(), Translations.Option22_Label, ref Configurations.UseHybridExtention, false, null, null, true);
|
||||
if (Widgets.ButtonText(hybridrect.RightHalf(), Translations.Option23_Label + ": " + Configurations.HybridString(Configurations.MotherFirst)))
|
||||
{
|
||||
Configurations.MotherFirst = !Configurations.MotherFirst;
|
||||
}
|
||||
|
||||
twinsection.CheckboxLabeled(Translations.Option14_Label, ref Configurations.EnableHeteroOvularTwins, Translations.Option14_Desc);
|
||||
twinsection.CheckboxLabeled(Translations.Option15_Label, ref Configurations.EnableEnzygoticTwins, Translations.Option15_Desc);
|
||||
if (Configurations.EnableEnzygoticTwins)
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using RimWorld;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
@ -36,7 +30,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
private Color customColor;
|
||||
|
||||
public PawnDNAModExtention DNA
|
||||
public PawnDNAModExtension DNA
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -44,22 +38,22 @@ namespace RJW_Menstruation
|
|||
{
|
||||
try
|
||||
{
|
||||
DNAcache = pawn.def.GetModExtension<PawnDNAModExtention>();
|
||||
DNAcache = pawn.def.GetModExtension<PawnDNAModExtension>();
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtention>();
|
||||
DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtension>();
|
||||
}
|
||||
if (DNAcache == null)
|
||||
{
|
||||
DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtention>();
|
||||
DNAcache = ThingDefOf.Human.GetModExtension<PawnDNAModExtension>();
|
||||
}
|
||||
return DNAcache;
|
||||
}
|
||||
else return DNAcache;
|
||||
}
|
||||
}
|
||||
private PawnDNAModExtention DNAcache = null;
|
||||
private PawnDNAModExtension DNAcache = null;
|
||||
public ThingDef FilthDef
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using Verse.Sound;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
using System;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using UnityEngine;
|
||||
using Verse.Sound;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
using System;
|
||||
using HugsLib;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using HugsLib;
|
||||
using rjw;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
[Flags]public enum SeasonalBreed
|
||||
[Flags]
|
||||
public enum SeasonalBreed
|
||||
{
|
||||
Always = 0,
|
||||
Spring = 1,
|
||||
|
@ -181,7 +180,7 @@ namespace RJW_Menstruation
|
|||
get
|
||||
{
|
||||
float res = 1.0f;
|
||||
if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) res = 0.001f;
|
||||
if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) res = 0.01f;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
@ -308,9 +307,6 @@ namespace RJW_Menstruation
|
|||
{
|
||||
string res = "";
|
||||
if (!eggs.NullOrEmpty())
|
||||
{
|
||||
if (cums.NullOrEmpty() || TotalFertCum == 0) return eggs.Count + " " + Translations.Dialog_WombInfo07;
|
||||
else
|
||||
{
|
||||
int fertilized = 0;
|
||||
foreach (Egg egg in eggs)
|
||||
|
@ -319,6 +315,12 @@ namespace RJW_Menstruation
|
|||
}
|
||||
if (fertilized != 0) res += fertilized + " " + Translations.Dialog_WombInfo05;
|
||||
if (fertilized != 0 && eggs.Count - fertilized != 0) res += ", ";
|
||||
if (cums.NullOrEmpty() || TotalFertCum == 0)
|
||||
{
|
||||
if (eggs.Count - fertilized != 0) res += eggs.Count - fertilized + " " + Translations.Dialog_WombInfo07;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (eggs.Count - fertilized != 0) res += eggs.Count - fertilized + " " + Translations.Dialog_WombInfo06;
|
||||
}
|
||||
}
|
||||
|
@ -501,7 +503,7 @@ namespace RJW_Menstruation
|
|||
if (cum.pawn.Equals(pawn))
|
||||
{
|
||||
cum.volume += volume;
|
||||
cum.fertvolume += volume;
|
||||
cum.fertvolume += volume * CumInFactor;
|
||||
cum.FilthDef = filthdef;
|
||||
merged = true;
|
||||
}
|
||||
|
@ -861,7 +863,8 @@ namespace RJW_Menstruation
|
|||
foreach (Egg egg in eggs)
|
||||
{
|
||||
if (!egg.fertilized) egg.fertilizer = Fertilize();
|
||||
if (egg.fertilizer != null) {
|
||||
if (egg.fertilizer != null)
|
||||
{
|
||||
egg.fertilized = true;
|
||||
egg.lifespanhrs += 240;
|
||||
onefertilized = true;
|
||||
|
@ -898,6 +901,10 @@ namespace RJW_Menstruation
|
|||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_Menopause);
|
||||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
if (curStage == Stage.ClimactericBleeding) curStage = Stage.Bleeding;
|
||||
else if (curStage == Stage.ClimactericFollicular) curStage = Stage.Follicular;
|
||||
else if (curStage == Stage.ClimactericLuteal) curStage = Stage.Luteal;
|
||||
|
||||
}
|
||||
else if (ovarypower < -50000)
|
||||
{
|
||||
|
@ -914,7 +921,8 @@ namespace RJW_Menstruation
|
|||
avglittersize = 1;
|
||||
}
|
||||
ovarypower = (int)(((Props.ovaryPower * Rand.Range(0.7f, 1.3f) * parent.pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy)
|
||||
- (Math.Max(0, parent.pawn.ageTracker.AgeBiologicalYears - 15)) * (60 / (Props.folicularIntervalDays + Props.lutealIntervalDays) * Configurations.CycleAcceleration)) * avglittersize);
|
||||
- (Math.Max(0, parent.pawn.ageTracker.AgeBiologicalYears - RJWSettings.sex_minimum_age * parent.pawn.def.race.lifeExpectancy / ThingDefOf.Human.race.lifeExpectancy))
|
||||
* (60 / (Props.folicularIntervalDays + Props.lutealIntervalDays) * Configurations.CycleAcceleration)) * avglittersize);
|
||||
if (ovarypower < 1)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_Menopause, parent.pawn);
|
||||
|
@ -958,7 +966,7 @@ namespace RJW_Menstruation
|
|||
|
||||
public void AfterSimulator()
|
||||
{
|
||||
if (ovarypower < ovarypowerthreshold)
|
||||
if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
|
||||
{
|
||||
if (sexNeed == null) sexNeed = parent.pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
|
||||
else
|
||||
|
@ -987,6 +995,30 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsBreedingSeason()
|
||||
{
|
||||
if (Props.breedingSeason == SeasonalBreed.Always) return true;
|
||||
switch (GenLocalDate.Season(parent.pawn.Map))
|
||||
{
|
||||
case Season.Spring:
|
||||
if ((Props.breedingSeason & SeasonalBreed.Spring) != 0) return true;
|
||||
break;
|
||||
case Season.Summer:
|
||||
case Season.PermanentSummer:
|
||||
if ((Props.breedingSeason & SeasonalBreed.Summer) != 0) return true;
|
||||
break;
|
||||
case Season.Fall:
|
||||
if ((Props.breedingSeason & SeasonalBreed.Fall) != 0) return true;
|
||||
break;
|
||||
case Season.Winter:
|
||||
case Season.PermanentWinter:
|
||||
if ((Props.breedingSeason & SeasonalBreed.Winter) != 0) return true;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Pawn Fertilize()
|
||||
{
|
||||
|
@ -1164,6 +1196,14 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
private void AddCrampPain()
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
||||
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
|
||||
HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
|
||||
Prop.severityPerDay = -hediff.Severity / (bleedingIntervalhours / 24) * Configurations.CycleAcceleration;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
}
|
||||
|
||||
private Action PeriodSimulator(Stage targetstage)
|
||||
{
|
||||
|
@ -1173,29 +1213,11 @@ namespace RJW_Menstruation
|
|||
case Stage.Follicular:
|
||||
action = delegate
|
||||
{
|
||||
if (Props.breedingSeason != SeasonalBreed.Always)
|
||||
{
|
||||
if (!Props.breedingSeason.HasFlag(SeasonalBreed.Spring) && GenLocalDate.Season(parent.pawn.Map).Equals(Season.Spring))
|
||||
if (!IsBreedingSeason())
|
||||
{
|
||||
GoNextStage(Stage.Anestrus);
|
||||
return;
|
||||
}
|
||||
else if (!Props.breedingSeason.HasFlag(SeasonalBreed.Summer) && (GenLocalDate.Season(parent.pawn.Map).Equals(Season.Summer) || GenLocalDate.Season(parent.pawn.Map).Equals(Season.PermanentSummer)))
|
||||
{
|
||||
GoNextStage(Stage.Anestrus);
|
||||
return;
|
||||
}
|
||||
else if (!Props.breedingSeason.HasFlag(SeasonalBreed.Fall) && GenLocalDate.Season(parent.pawn.Map).Equals(Season.Fall))
|
||||
{
|
||||
GoNextStage(Stage.Anestrus);
|
||||
return;
|
||||
}
|
||||
else if (!Props.breedingSeason.HasFlag(SeasonalBreed.Winter) && (GenLocalDate.Season(parent.pawn.Map).Equals(Season.Winter) || GenLocalDate.Season(parent.pawn.Map).Equals(Season.PermanentWinter)))
|
||||
{
|
||||
GoNextStage(Stage.Anestrus);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (curStageHrs >= FollicularIntervalHours)
|
||||
{
|
||||
GoNextStage(Stage.Ovulatory);
|
||||
|
@ -1280,11 +1302,7 @@ namespace RJW_Menstruation
|
|||
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
|
||||
if (crampPain >= 0.05f)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
||||
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
|
||||
HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
|
||||
Prop.severityPerDay = - hediff.Severity / (bleedingIntervalhours/24) * Configurations.CycleAcceleration;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
AddCrampPain();
|
||||
}
|
||||
GoNextStage(Stage.Bleeding);
|
||||
}
|
||||
|
@ -1439,11 +1457,7 @@ namespace RJW_Menstruation
|
|||
bleedingIntervalhours = PeriodRandomizer(bleedingIntervalhours, Props.deviationFactor);
|
||||
if (crampPain >= 0.05f)
|
||||
{
|
||||
Hediff hediff = HediffMaker.MakeHediff(VariousDefOf.Hediff_MenstrualCramp, parent.pawn);
|
||||
hediff.Severity = crampPain * Rand.Range(0.9f, 1.1f);
|
||||
HediffCompProperties_SeverityPerDay Prop = (HediffCompProperties_SeverityPerDay)hediff.TryGetComp<HediffComp_SeverityPerDay>().props;
|
||||
Prop.severityPerDay = -hediff.Severity / (bleedingIntervalhours / 24) * Configurations.CycleAcceleration;
|
||||
parent.pawn.health.AddHediff(hediff, Genital_Helper.get_genitalsBPR(parent.pawn));
|
||||
AddCrampPain();
|
||||
}
|
||||
GoNextStage(Stage.ClimactericBleeding);
|
||||
}
|
||||
|
@ -1470,25 +1484,7 @@ namespace RJW_Menstruation
|
|||
case Stage.Anestrus:
|
||||
action = delegate
|
||||
{
|
||||
if (Props.breedingSeason == SeasonalBreed.Always)
|
||||
{
|
||||
//case for XML changes
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
|
||||
GoNextStage(Stage.Follicular);
|
||||
}
|
||||
else if (Props.breedingSeason.HasFlag(SeasonalBreed.Spring) && GenLocalDate.Season(parent.pawn.Map).Equals(Season.Spring))
|
||||
{
|
||||
GoFollicularOrBleeding();
|
||||
}
|
||||
else if (Props.breedingSeason.HasFlag(SeasonalBreed.Summer) && (GenLocalDate.Season(parent.pawn.Map).Equals(Season.Summer) || GenLocalDate.Season(parent.pawn.Map).Equals(Season.PermanentSummer)))
|
||||
{
|
||||
GoFollicularOrBleeding();
|
||||
}
|
||||
else if (Props.breedingSeason.HasFlag(SeasonalBreed.Fall) && GenLocalDate.Season(parent.pawn.Map).Equals(Season.Fall))
|
||||
{
|
||||
GoFollicularOrBleeding();
|
||||
}
|
||||
else if (Props.breedingSeason.HasFlag(SeasonalBreed.Winter) && (GenLocalDate.Season(parent.pawn.Map).Equals(Season.Winter) || GenLocalDate.Season(parent.pawn.Map).Equals(Season.PermanentWinter)))
|
||||
if (IsBreedingSeason())
|
||||
{
|
||||
GoFollicularOrBleeding();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
using rjw;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
@ -356,6 +352,7 @@ namespace RJW_Menstruation
|
|||
public PawnKindDef BabyPawnKindDecider(Pawn mother, Pawn father)
|
||||
{
|
||||
PawnKindDef spawn_kind_def = mother.kindDef;
|
||||
|
||||
int flag = 0;
|
||||
if (xxx.is_human(mother)) flag += 2;
|
||||
if (xxx.is_human(father)) flag += 1;
|
||||
|
@ -394,14 +391,30 @@ namespace RJW_Menstruation
|
|||
spawn_kind_def = mother.kindDef;
|
||||
}
|
||||
|
||||
|
||||
string MotherRaceName = "";
|
||||
string FatherRaceName = "";
|
||||
MotherRaceName = mother.kindDef.race.defName;
|
||||
PawnKindDef tmp = spawn_kind_def;
|
||||
if (father != null)
|
||||
FatherRaceName = father.kindDef.race.defName;
|
||||
if (MotherRaceName != FatherRaceName && FatherRaceName != "")
|
||||
{
|
||||
|
||||
if (Configurations.UseHybridExtention)
|
||||
{
|
||||
if (Configurations.MotherFirst)
|
||||
{
|
||||
spawn_kind_def = GetHybrid(mother, father);
|
||||
}
|
||||
else
|
||||
{
|
||||
spawn_kind_def = GetHybrid(father, mother);
|
||||
}
|
||||
Log.Message("pawnkind: " + spawn_kind_def?.defName);
|
||||
}
|
||||
if (!Configurations.UseHybridExtention || spawn_kind_def == null)
|
||||
{
|
||||
spawn_kind_def = tmp;
|
||||
var groups = DefDatabase<RaceGroupDef>.AllDefs.Where(x => !(x.hybridRaceParents.NullOrEmpty() || x.hybridChildKindDef.NullOrEmpty()));
|
||||
|
||||
|
||||
|
@ -428,8 +441,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -437,7 +449,6 @@ namespace RJW_Menstruation
|
|||
spawn_kind_def = mother.RaceProps.AnyPawnKind;
|
||||
}
|
||||
|
||||
|
||||
if (spawn_kind_def.defName.Contains("Nymph"))
|
||||
{
|
||||
//child is nymph, try to find other PawnKindDef
|
||||
|
@ -463,6 +474,25 @@ namespace RJW_Menstruation
|
|||
|
||||
}
|
||||
|
||||
public PawnKindDef GetHybrid(Pawn first, Pawn second)
|
||||
{
|
||||
PawnDNAModExtension dna;
|
||||
PawnKindDef res = null;
|
||||
dna = first.def.GetModExtension<PawnDNAModExtension>();
|
||||
if (dna != null)
|
||||
{
|
||||
res = dna.GetHybridWith(second.def.defName) ?? null;
|
||||
}
|
||||
else
|
||||
{
|
||||
dna = second.def.GetModExtension<PawnDNAModExtension>();
|
||||
if (dna != null)
|
||||
{
|
||||
res = dna.GetHybridWith(first.def.defName) ?? null;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copy from RJW
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Collections.Generic;
|
||||
using Verse.AI;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
using System;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using UnityEngine;
|
||||
using Verse.Sound;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
using System;
|
||||
using HarmonyLib;
|
||||
using HugsLib;
|
||||
using RimWorld;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
using HugsLib;
|
||||
using rjw;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\..\Assemblies\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -92,6 +92,7 @@
|
|||
<HintPath>..\..\..\..\RJW\1.2\Assemblies\RJW.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>..\..\..\..\..\RimWorldWin64_Data\Managed\Unity.TextMeshPro.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
|
@ -1,26 +1,83 @@
|
|||
using System;
|
||||
using System.Xml;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using rjw;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
public class PawnDNAModExtention : DefModExtension
|
||||
public class PawnDNAModExtension : DefModExtension
|
||||
{
|
||||
public string fetusTexPath;
|
||||
public ColorInt cumColor;
|
||||
public Color CumColor => cumColor.ToColor;
|
||||
public float cumThickness = 0f;
|
||||
public List<HybridExtension> hybridExtension;
|
||||
|
||||
public HybridExtension GetHybridExtention(string race)
|
||||
{
|
||||
if (hybridExtension.NullOrEmpty()) return null;
|
||||
else
|
||||
{
|
||||
return hybridExtension.Find(x => x.thingDef.defName.Equals(race));
|
||||
}
|
||||
}
|
||||
|
||||
public PawnKindDef GetHybridWith(string race)
|
||||
{
|
||||
return GetHybridExtention(race)?.ChooseOne() ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
public class HybridExtension
|
||||
{
|
||||
|
||||
public Dictionary<string, float> hybridInfo;
|
||||
public ThingDef thingDef;
|
||||
|
||||
public HybridExtension() { }
|
||||
|
||||
public PawnKindDef ChooseOne()
|
||||
{
|
||||
if (hybridInfo.EnumerableNullOrEmpty()) return null;
|
||||
PawnKindDef res = null;
|
||||
do
|
||||
{
|
||||
res = DefDatabase<PawnKindDef>.GetNamedSilentFail(hybridInfo.RandomElementByWeight(x => x.Value).Key);
|
||||
if (res == null) res = DefDatabase<ThingDef>.GetNamedSilentFail(hybridInfo.RandomElementByWeight(x => x.Value).Key).race.AnyPawnKind;
|
||||
|
||||
if (res == null) hybridInfo.Remove(res.defName);
|
||||
} while (res == null && !hybridInfo.EnumerableNullOrEmpty());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public void LoadDataFromXmlCustom(XmlNode xmlRoot)
|
||||
{
|
||||
hybridInfo = new Dictionary<string, float>();
|
||||
DirectXmlCrossRefLoader.RegisterObjectWantsCrossRef(this, "thingDef", xmlRoot.Name);
|
||||
XmlNodeList childNodes = xmlRoot.ChildNodes;
|
||||
|
||||
if (childNodes.Count >= 1) foreach (XmlNode node in childNodes)
|
||||
{
|
||||
//Log.Message(xmlRoot.Name + "HybridInfo: " + node.Name + " " + node.InnerText);
|
||||
hybridInfo.Add(node.Name, ParseHelper.FromString<float>(node.InnerText));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class AbsorberModExtention : DefModExtension
|
||||
|
||||
|
||||
|
||||
public class AbsorberModExtension : DefModExtension
|
||||
{
|
||||
public bool leakAfterDirty = false;
|
||||
public bool effectsAfterDirty = false;
|
||||
|
@ -34,10 +91,10 @@ namespace RJW_Menstruation
|
|||
public float absorbedfluids = 0;
|
||||
public bool dirty = false;
|
||||
public int wearhours = 0;
|
||||
public virtual bool LeakAfterDirty => def.GetModExtension<AbsorberModExtention>().leakAfterDirty;
|
||||
public virtual bool EffectAfterDirty => def.GetModExtension<AbsorberModExtention>().effectsAfterDirty;
|
||||
public virtual ThingDef DirtyDef => def.GetModExtension<AbsorberModExtention>().dirtyDef;
|
||||
public virtual int MinHrstoDirtyEffect => def.GetModExtension<AbsorberModExtention>().minHourstoDirtyEffect;
|
||||
public virtual bool LeakAfterDirty => def.GetModExtension<AbsorberModExtension>().leakAfterDirty;
|
||||
public virtual bool EffectAfterDirty => def.GetModExtension<AbsorberModExtension>().effectsAfterDirty;
|
||||
public virtual ThingDef DirtyDef => def.GetModExtension<AbsorberModExtension>().dirtyDef;
|
||||
public virtual int MinHrstoDirtyEffect => def.GetModExtension<AbsorberModExtension>().minHourstoDirtyEffect;
|
||||
|
||||
public Color fluidColor = Color.white;
|
||||
|
||||
|
|
|
@ -80,6 +80,11 @@ namespace RJW_Menstruation
|
|||
public static readonly string Option20_Label_5 = "Option20_Label_5".Translate();
|
||||
public static readonly string Option21_Label = "Option21_Label".Translate();
|
||||
public static readonly string Option21_Desc = "Option21_Desc".Translate();
|
||||
public static readonly string Option22_Label = "Option22_Label".Translate();
|
||||
public static readonly string Option22_Desc = "Option22_Desc".Translate();
|
||||
public static readonly string Option23_Label = "Option23_Label".Translate();
|
||||
public static readonly string Option23_Label_1 = "Option23_Label_1".Translate();
|
||||
public static readonly string Option23_Label_2 = "Option23_Label_2".Translate();
|
||||
|
||||
public static readonly string FloatMenu_CleanSelf = "FloatMenu_CleanSelf".Translate();
|
||||
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
using System;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using RimWorld;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
@ -178,7 +173,7 @@ namespace RJW_Menstruation
|
|||
else if (hediff is Hediff_BasePregnancy)
|
||||
{
|
||||
Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff;
|
||||
string fetustex = h.babies?.FirstOrDefault()?.def.GetModExtension<PawnDNAModExtention>()?.fetusTexPath ?? "Fetus/Fetus_Default";
|
||||
string fetustex = h.babies?.FirstOrDefault()?.def.GetModExtension<PawnDNAModExtension>()?.fetusTexPath ?? "Fetus/Fetus_Default";
|
||||
if (h.GestationProgress < 0.2f) icon = comp.wombTex + "_Implanted";
|
||||
else if (h.GestationProgress < 0.3f) icon += "Fetus/Fetus_Early00";
|
||||
else if (h.GestationProgress < 0.4f) icon += fetustex + "00";
|
||||
|
@ -310,24 +305,24 @@ namespace RJW_Menstruation
|
|||
{
|
||||
if (pawn.Faction.IsPlayer)
|
||||
{
|
||||
if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Colonist)) return true;
|
||||
if ((Configurations.ShowFlag & Configurations.PawnFlags.Colonist) != 0) return true;
|
||||
}
|
||||
else if (pawn.IsPrisonerOfColony)
|
||||
{
|
||||
if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Prisoner)) return true;
|
||||
if ((Configurations.ShowFlag & Configurations.PawnFlags.Prisoner) != 0) return true;
|
||||
}
|
||||
else if (pawn.Faction.PlayerRelationKind == FactionRelationKind.Ally)
|
||||
{
|
||||
if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Ally)) return true;
|
||||
if ((Configurations.ShowFlag & Configurations.PawnFlags.Ally) != 0) return true;
|
||||
}
|
||||
else if (pawn.Faction.PlayerRelationKind == FactionRelationKind.Hostile)
|
||||
{
|
||||
if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Hostile)) return true;
|
||||
if ((Configurations.ShowFlag & Configurations.PawnFlags.Hostile) != 0) return true;
|
||||
}
|
||||
else if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Neutral)) return true;
|
||||
else if ((Configurations.ShowFlag & Configurations.PawnFlags.Neutral) != 0) return true;
|
||||
else return false;
|
||||
}
|
||||
else if (Configurations.ShowFlag.HasFlag(Configurations.PawnFlags.Neutral)) return true;
|
||||
else if ((Configurations.ShowFlag & Configurations.PawnFlags.Neutral) != 0) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue