This commit is contained in:
moreoreganostodump 2021-07-10 23:51:56 +09:00
parent b75a181f79
commit 4b4a54c11b
42 changed files with 334 additions and 114 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>RJW Menstruation</identifier>
<version>1.0.4.2a</version>
<version>1.0.4.3</version>
<dependencies>
</dependencies>
<incompatibleWith />

Binary file not shown.

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<RecipeDef Abstract="True" Name="BaseBreastSurgery">
<effectWorking>Surgery</effectWorking>
<soundWorking>Recipe_Surgery</soundWorking>
<workSpeedStat>MedicalOperationSpeed</workSpeedStat>
<workSkill>Medicine</workSkill>
<workSkillLearnFactor>0.2</workSkillLearnFactor>
<workAmount>400</workAmount>
<anesthetize>false</anesthetize>
<recipeUsers>
<li>Human</li>
</recipeUsers>
<surgerySuccessChanceFactor>100</surgerySuccessChanceFactor>
<ingredients>
<li>
<filter>
<categories>
<li>Medicine</li>
</categories>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Medicine</li>
</categories>
</fixedIngredientFilter>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_ExpandAreola</defName>
<label>expand areola</label>
<description>expand areola.</description>
<workerClass>RJW_Menstruation.Recipe_ExpandAreola</workerClass>
<jobString>expanding areola</jobString>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_ContractAreola</defName>
<label>contract areola</label>
<description>contract areola.</description>
<workerClass>RJW_Menstruation.Recipe_ContractAreola</workerClass>
<jobString>contracting areola</jobString>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_ExpandNipple</defName>
<label>expand nipple</label>
<description>expand nipple.</description>
<workerClass>RJW_Menstruation.Recipe_ExpandNipple</workerClass>
<jobString>expanding nipple</jobString>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_ContractNipple</defName>
<label>contract nipple</label>
<description>contract nipple.</description>
<workerClass>RJW_Menstruation.Recipe_ContractNipple</workerClass>
<jobString>contracting nipple</jobString>
</RecipeDef>
</Defs>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

View File

@ -1,3 +1,13 @@
Version 1.0.4.3
- fixed errors on pregnancy
- added surgeries for nipple/areola
- changed cum calculate method
- cum's fertility will remain
- IUD will diminish cum's fertility
- changed default settings
- fertilization chance raised 5% to 15%
- cum decay ratio raised 15% to 30%
Version 1.0.4.2a
- fixed hybrid custom UI

View File

@ -9,10 +9,10 @@ namespace RJW_Menstruation
{
public const float ImplantationChanceDefault = 0.65f;
public const int ImplantationChanceAdjustDefault = 65;
public const float FertilizeChanceDefault = 0.05f;
public const int FertilizeChanceAdjustDefault = 50;
public const float CumDecayRatioDefault = 0.15f;
public const int CumDecayRatioAdjustDefault = 150;
public const float FertilizeChanceDefault = 0.15f;
public const int FertilizeChanceAdjustDefault = 150;
public const float CumDecayRatioDefault = 0.30f;
public const int CumDecayRatioAdjustDefault = 300;
public const float CumFertilityDecayRatioDefault = 0.2f;
public const int CumFertilityDecayRatioAdjustDefault = 200;
public const int CycleAccelerationDefault = 6;

View File

@ -9,14 +9,30 @@ namespace RJW_Menstruation
{
public Pawn pawn;
public float volume; // ml
public float fertvolume;
protected float volume; // ml
protected float fertvolume;
public float fertFactor = 1.0f;
public bool notcum = false; // for other fluids
public string notcumLabel = "";
private bool useCustomColor = false;
private float notcumthickness = 0;
private float cumthickness = 1.0f;
protected bool useCustomColor = false;
protected float notcumthickness = 0;
protected float cumthickness = 1.0f;
public float Volume
{
get
{
return volume;
}
}
public float FertVolume
{
get
{
return fertvolume;
}
}
public float CumThickness
{
@ -38,7 +54,7 @@ namespace RJW_Menstruation
notcumthickness = value;
}
}
private Color customColor;
protected Color customColor;
public PawnDNAModExtension DNA
{
@ -63,7 +79,7 @@ namespace RJW_Menstruation
else return DNAcache;
}
}
private PawnDNAModExtension DNAcache = null;
protected PawnDNAModExtension DNAcache = null;
public ThingDef FilthDef
{
get
@ -76,7 +92,7 @@ namespace RJW_Menstruation
filthDef = value;
}
}
private ThingDef filthDef = null;
protected ThingDef filthDef = null;
public Color color
{
get
@ -102,6 +118,14 @@ namespace RJW_Menstruation
fertvolume = 1.0f;
}
/// <summary>
/// Not Cum
/// </summary>
/// <param name="pawn"></param>
/// <param name="volume"></param>
/// <param name="notcumlabel"></param>
/// <param name="decayresist"></param>
/// <param name="filthDef"></param>
public Cum(Pawn pawn, float volume, string notcumlabel, float decayresist = 0, ThingDef filthDef = null)
{
this.pawn = pawn;
@ -117,12 +141,7 @@ namespace RJW_Menstruation
{
this.pawn = pawn;
this.volume = volume;
if (fertility > 0)
{
this.fertvolume = volume;
this.fertFactor = fertility;
}
else this.fertvolume = 0;
this.fertvolume = volume * fertility;
this.filthDef = filthDef;
}
@ -150,21 +169,57 @@ namespace RJW_Menstruation
}
}
public void MergeWithCum(float volumein, ThingDef updatefilthDef = null)
public void MergeWithCum(float volumein, float fertility, ThingDef updatefilthDef = null)
{
if (updatefilthDef != null) filthDef = updatefilthDef;
volume = volumein;
fertvolume = volumein;
volume += volumein;
fertvolume += volumein*fertility;
cumthickness = Mathf.Lerp(cumthickness, 1.0f, volumein / volume);
}
public void MergeWithFluid(float volumein, float thickness, ThingDef updatefilthDef = null)
{
if (updatefilthDef != null) filthDef = updatefilthDef;
volume = volumein;
volume += volumein;
cumthickness = Mathf.Lerp(cumthickness, thickness, volumein / volume);
}
public bool ShouldRemove()
{
if (fertvolume < 0.001f && volume < 0.001f) return true;
return false;
}
public float DismishNatural(float leakfactor, float antisperm = 0.0f)
{
float totalleak = volume;
volume *= Math.Max(0, (1 - (Configurations.CumDecayRatio * (1 - decayresist)) * leakfactor));
fertvolume *= Math.Max(0, 1 - (Configurations.CumFertilityDecayRatio * (1 - decayresist) + antisperm));
CutMinor();
totalleak -= volume;
return totalleak;
}
public float DismishForce(float portion, float leakfactor = 1.0f)
{
float totalleak = volume;
volume *= Math.Max(0, 1 - (portion * (1 - decayresist)) * leakfactor);
fertvolume *= Math.Max(0, 1 - (portion * (1 - decayresist)) * leakfactor);
CutMinor();
totalleak -= volume;
return totalleak;
}
protected void CutMinor()
{
if (volume < 0.01f) volume = 0f;
if (fertvolume < 0.001f) fertvolume = 0f;
}
}

View File

@ -260,9 +260,26 @@ namespace RJW_Menstruation
float variance = breastSizeIncreased * Math.Min(ratio, 1.0f);
breastSizeIncreased -= variance;
parent.Severity -= variance;
}
public void AdjustNippleSizeImmidiately(float amount)
{
originnipple = Math.Max(0, originnipple + amount);
nippleSizePermanent = Math.Min(MaxNipple, nippleSizePermanent + amount);
nippleSize = Math.Min(MaxNipple, nippleSize + amount);
nippleSizeCurrent = nippleSize;
}
public void AdjustAreolaSizeImmidiately(float amount)
{
originareola = Math.Max(0, originareola + amount);
areolaSizePermanent = Math.Min(MaxAreola, areolaSizePermanent + amount);
areolaSize = Math.Min(MaxAreola, areolaSize + amount);
areolaSizeCurrent = areolaSize;
}
public void UpdateColor()
{
cachedcolor = Colors.CMYKLerp(parent?.pawn?.story?.SkinColor ?? Color.white, Props.BlackNippleColor, Alpha);

View File

@ -43,7 +43,7 @@ namespace RJW_Menstruation
}
}
public override void AfterCumIn(Pawn cummer)
protected override void AfterCumIn(Pawn cummer)
{
base.AfterCumIn(cummer);
if (curStage == Stage.Follicular) curStage = Stage.Ovulatory;

View File

@ -111,6 +111,7 @@ namespace RJW_Menstruation
protected bool estrusflag = false;
protected int opcache = -1;
protected HediffComp_Breast breastcache = null;
protected float antisperm = 0.0f;
public int ovarypowerthreshold
{
@ -137,7 +138,7 @@ namespace RJW_Menstruation
if (cums.NullOrEmpty()) return 0;
foreach (Cum cum in cums)
{
res += cum.volume;
res += cum.Volume;
}
return res;
}
@ -150,7 +151,7 @@ namespace RJW_Menstruation
if (cums.NullOrEmpty()) return 0;
foreach (Cum cum in cums)
{
if (!cum.notcum) res += cum.fertvolume;
if (!cum.notcum) res += cum.FertVolume;
}
return res;
}
@ -163,7 +164,7 @@ namespace RJW_Menstruation
if (cums.NullOrEmpty()) return 0;
foreach (Cum cum in cums)
{
res += cum.volume;
res += cum.Volume;
}
return res / Props.maxCumCapacity;
}
@ -214,8 +215,8 @@ namespace RJW_Menstruation
{
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (!cum.notcum) yield return String.Format(cum.pawn?.Label + ": {0:0.##}ml", cum.volume);
else yield return String.Format(cum.notcumLabel + ": {0:0.##}ml", cum.volume);
if (!cum.notcum) yield return String.Format(cum.pawn?.Label + ": {0:0.##}ml", cum.Volume);
else yield return String.Format(cum.notcumLabel + ": {0:0.##}ml", cum.Volume);
}
else yield return Translations.Info_noCum;
}
@ -231,8 +232,11 @@ namespace RJW_Menstruation
float mixedsofar = 0;
foreach (Cum cum in cums)
{
mixedcolor = Colors.CMYKLerp(mixedcolor, cum.color, cum.volume / (mixedsofar + cum.volume));
mixedsofar += cum.volume;
if (cum.Volume > 0)
{
mixedcolor = Colors.CMYKLerp(mixedcolor, cum.color, cum.Volume / (mixedsofar + cum.Volume));
mixedsofar += cum.Volume;
}
}
}
return mixedcolor;
@ -334,7 +338,7 @@ namespace RJW_Menstruation
{
if (!cums.NullOrEmpty()) foreach (Cum cum in cums)
{
if (cum.fertvolume > 0) return true;
if (cum.FertVolume > 0) return true;
}
return false;
@ -367,6 +371,8 @@ namespace RJW_Menstruation
{
get
{
if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) return false;
if (curStage == Stage.Follicular || curStage == Stage.ClimactericFollicular)
{
if (curStageHrs > 0.7f * (follicularIntervalhours - bleedingIntervalhours)) return true;
@ -432,7 +438,7 @@ namespace RJW_Menstruation
Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true);
Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true);
}
@ -510,11 +516,10 @@ namespace RJW_Menstruation
{
if (cum.pawn.Equals(pawn))
{
cum.MergeWithCum(volume, filthdef);
cum.MergeWithCum(volume, fertility, filthdef);
merged = true;
}
cum.volume *= 1 - cumoutrate;
cum.fertvolume *= 1 - cumoutrate;
cum.DismishForce(cumoutrate);
}
if (!merged) cums.Add(new Cum(pawn, volume * (1 - cumoutrate), fertility, filthdef));
}
@ -526,7 +531,7 @@ namespace RJW_Menstruation
{
if (cum.pawn.Equals(pawn))
{
cum.MergeWithCum(volume, filthdef);
cum.MergeWithCum(volume, fertility, filthdef);
merged = true;
}
}
@ -560,8 +565,7 @@ namespace RJW_Menstruation
cum.MergeWithFluid(volume, decayresist, filthdef);
merged = true;
}
cum.volume *= 1 - cumoutrate;
cum.fertvolume *= 1 - cumoutrate;
cum.DismishForce(cumoutrate);
}
if (!merged) cums.Add(new Cum(pawn, volume * (1 - cumoutrate), notcumlabel, decayresist, filthdef));
}
@ -584,13 +588,13 @@ namespace RJW_Menstruation
AfterFluidIn(cumd);
}
public virtual void AfterCumIn(Pawn cummer)
protected virtual void AfterCumIn(Pawn cummer)
{
ThoughtCumInside(cummer);
}
public virtual void AfterNotCumIn()
protected virtual void AfterNotCumIn()
{
}
@ -599,15 +603,19 @@ namespace RJW_Menstruation
/// Action for both Cum and NotCum
/// </summary>
/// <param name="fd">Fluid deviation</param>
public virtual void AfterFluidIn(float fd)
protected virtual void AfterFluidIn(float fd)
{
}
public void BeforeCumOut(out Absorber absorber)
protected void BeforeCumOut(out Absorber absorber)
{
if (parent.pawn.health.hediffSet.HasHediff(VariousDefOf.RJW_IUD)) antisperm = 0.70f;
else antisperm = 0.0f;
absorber = (Absorber)parent.pawn.apparel?.WornApparel?.Find(x => x is Absorber);
if (absorber != null)
{
@ -619,7 +627,7 @@ namespace RJW_Menstruation
/// <summary>
/// For natural leaking
/// </summary>
public virtual void AfterCumOut()
protected virtual void AfterCumOut()
{
parent.pawn.needs?.mood?.thoughts?.memories?.TryGainMemory(VariousDefOf.LeakingFluids);
}
@ -628,7 +636,7 @@ namespace RJW_Menstruation
/// For all type of leaking
/// </summary>
/// <param name="fd"></param>
public virtual void AfterFluidOut(float fd)
protected virtual void AfterFluidOut(float fd)
{
}
@ -651,16 +659,12 @@ namespace RJW_Menstruation
List<Cum> removecums = new List<Cum>();
foreach (Cum cum in cums)
{
float vd = cum.volume;
cum.volume *= Math.Max(0, (1 - (Configurations.CumDecayRatio * (1 - cum.decayresist)) * leakfactor));
cum.fertvolume *= Math.Max(0, (1 - (Configurations.CumDecayRatio * (1 - cum.decayresist)) * leakfactor) * (1 - (Configurations.CumFertilityDecayRatio * (1 - cum.decayresist))));
vd -= cum.volume;
float vd = cum.DismishNatural(leakfactor, antisperm);
cum.MakeThinner(Configurations.CycleAcceleration);
totalleak += AbsorbCum(cum, vd, absorber);
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());
filthlabels.Add(tmp.Replace(" x1", ""));
if (cum.fertvolume < 0.01f) cum.fertvolume = 0;
if (cum.volume < 0.01f) removecums.Add(cum);
if (cum.ShouldRemove()) removecums.Add(cum);
}
if (cums.Count > 1) MakeCumFilthMixture(totalleak, filthlabels);
else if (cums.Count == 1) MakeCumFilth(cums.First(), totalleak);
@ -683,25 +687,21 @@ namespace RJW_Menstruation
/// <returns></returns>
public float CumOut(Cum targetcum, float portion = 0.1f)
{
float leakfactor = 1.0f;
if (cums.NullOrEmpty()) return 0;
float totalleak = 0;
List<string> filthlabels = new List<string>();
if (cums.NullOrEmpty()) return 0;
float outcum = 0;
float cumd = TotalCumPercent;
List<Cum> removecums = new List<Cum>();
foreach (Cum cum in cums)
{
float vd = cum.volume;
if (cum.Equals(targetcum)) outcum = cum.volume * (portion * (1 - cum.decayresist));
cum.volume *= Math.Max(0, 1 - (portion * (1 - cum.decayresist)) * leakfactor);
cum.fertvolume *= Math.Max(0, (1 - (portion * (1 - cum.decayresist)) * leakfactor) * (1 - (Configurations.CumFertilityDecayRatio * (1 - cum.decayresist))));
float vd = cum.DismishForce(portion);
if (cum.Equals(targetcum)) outcum = vd;
//MakeCumFilth(cum, vd - cum.volume);
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());
filthlabels.Add(tmp.Replace(" x1", ""));
totalleak += vd - cum.volume;
if (cum.fertvolume < 0.01f) cum.fertvolume = 0;
if (cum.volume < 0.01f) removecums.Add(cum);
totalleak += vd;
if (cum.ShouldRemove()) removecums.Add(cum);
}
if (cums.Count > 1) MakeCumFilthMixture(totalleak, filthlabels);
else if (cums.Count == 1) MakeCumFilth(cums.First(), totalleak);
@ -715,54 +715,13 @@ namespace RJW_Menstruation
return outcum;
}
/// <summary>
/// Ignores cum's decayratio and absorber and get excreted amount of specific cum
/// </summary>
/// <param name="targetcum"></param>
/// <param name="portion"></param>
/// <returns></returns>
public float CumOutForce(Cum targetcum = null, float portion = 0.1f)
{
if (cums.NullOrEmpty()) return 0;
float outcum = 0;
float totalleak = 0;
List<string> filthlabels = new List<string>();
float cumd = TotalCumPercent;
List<Cum> removecums = new List<Cum>();
foreach (Cum cum in cums)
{
float vd = cum.volume;
if (cum.Equals(targetcum)) outcum = cum.volume * (portion);
cum.volume *= 1 - (portion);
cum.fertvolume *= (1 - (portion)) * (1 - (Configurations.CumFertilityDecayRatio));
//MakeCumFilth(cum, vd - cum.volume);
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn?.LabelShort ?? "Unknown", 1.ToString());
filthlabels.Add(tmp.Replace(" x1", ""));
totalleak += vd - cum.volume;
if (cum.fertvolume < 0.01f) cum.fertvolume = 0;
if (cum.volume < 0.1f) removecums.Add(cum);
}
if (cums.Count > 1) MakeCumFilthMixture(totalleak, filthlabels);
else if (cums.Count == 1) MakeCumFilth(cums.First(), totalleak);
foreach (Cum cum in removecums)
{
cums.Remove(cum);
}
removecums.Clear();
cumd = TotalCumPercent - cumd;
AfterFluidOut(cumd);
return outcum;
}
/// <summary>
/// Fertilize eggs and return the result
/// </summary>
/// <returns></returns>
public bool FertilizationCheck()
protected bool FertilizationCheck()
{
if (!eggs.NullOrEmpty())
{
@ -864,7 +823,7 @@ namespace RJW_Menstruation
loaded = true;
}
public void AfterSimulator()
protected void AfterSimulator()
{
if (Configurations.EnableMenopause && ovarypower < ovarypowerthreshold)
{
@ -926,7 +885,7 @@ namespace RJW_Menstruation
foreach (Cum cum in cums)
{
float rand = Rand.Range(0.0f, 1.0f);
if (cum.pawn != null && !cum.notcum && rand < cum.fertvolume * cum.fertFactor * Configurations.FertilizeChance * Props.basefertilizationChanceFactor)
if (cum.pawn != null && !cum.notcum && rand < cum.FertVolume * cum.fertFactor * Configurations.FertilizeChance * Props.basefertilizationChanceFactor)
{
if (!RJWPregnancySettings.bestial_pregnancy_enabled && (xxx.is_animal(parent.pawn) ^ xxx.is_animal(cum.pawn))) continue;
return cum.pawn;

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Menstruation
{
public static class MenstruationUtility
{
public static float GetFertilityChance(this HediffComp_Menstruation comp)
{
return comp.TotalFertCum * Configurations.FertilizeChance;
}
}
}

View File

@ -490,11 +490,17 @@ namespace RJW_Menstruation
{
PawnKindDef res = null;
Pawn opposite = second;
HybridInformations info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == first.def?.defName && (x.hybridExtension?.Exists(y => y.defName == second.def?.defName) ?? false));
if (info == null)
HybridInformations info = null;
if (!Configurations.HybridOverride.NullOrEmpty())
{
info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == second.def?.defName && (x.hybridExtension?.Exists(y => y.defName == first.def?.defName) ?? false));
opposite = first;
info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == first.def?.defName && (x.hybridExtension?.Exists(y => y.defName == second.def?.defName) ?? false));
if (info == null)
{
info = Configurations.HybridOverride.FirstOrDefault(x => x.defName == second.def?.defName && (x.hybridExtension?.Exists(y => y.defName == first.def?.defName) ?? false));
opposite = first;
}
}
if (info != null)

View File

@ -20,7 +20,7 @@ namespace RJW_Menstruation
HediffComp_Menstruation Comp = Utility.GetMenstruationComp(pawn);
this.FailOn(delegate
{
return !(Comp.TotalCumPercent > 0.01);
return !(Comp.TotalCumPercent > 0.001);
});
Toil excreting = Toils_General.Wait(excretingTime, TargetIndex.None);//duration of
@ -30,8 +30,8 @@ namespace RJW_Menstruation
{
initAction = delegate ()
{
Comp.CumOutForce(null, 0.5f);
if (Comp.TotalCumPercent > 0.01) this.JumpToToil(excreting);
Comp.CumOut(null, 0.5f);
if (Comp.TotalCumPercent > 0.001) JumpToToil(excreting);
}
};
//yield return excreting;

View File

@ -57,6 +57,8 @@
<ItemGroup>
<Compile Include="Configurations.cs" />
<Compile Include="Cum.cs" />
<Compile Include="HediffComps\MenstruationUtility.cs" />
<Compile Include="Recipe_Surgery.cs" />
<Compile Include="UI\Dialog_HybridCustom.cs" />
<Compile Include="UI\Dialog_WombStatus.cs" />
<Compile Include="DrugOutcomDoers.cs" />

View File

@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
using rjw;
namespace RJW_Menstruation
{
public class Recipe_BreastSurgery : Recipe_Surgery
{
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
{
if (pawn.gender != Gender.Female)
{
yield break;
}
BodyPartRecord part = Genital_Helper.get_breastsBPR(pawn);
if (part != null)
{
if (pawn.GetBreastComp() != null) yield return part;
}
}
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
{
HediffComp_Breast breast = pawn.GetBreastComp();
if (billDoer != null && breast != null)
{
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
{
billDoer,
pawn
});
SurgeryResult(breast);
}
}
protected virtual void SurgeryResult(HediffComp_Breast breast)
{
}
}
public class Recipe_ExpandAreola : Recipe_BreastSurgery
{
protected override void SurgeryResult(HediffComp_Breast breast)
{
breast.AdjustAreolaSizeImmidiately(0.1f);
}
}
public class Recipe_ContractAreola : Recipe_BreastSurgery
{
protected override void SurgeryResult(HediffComp_Breast breast)
{
breast.AdjustAreolaSizeImmidiately(-0.1f);
}
}
public class Recipe_ExpandNipple : Recipe_BreastSurgery
{
protected override void SurgeryResult(HediffComp_Breast breast)
{
breast.AdjustNippleSizeImmidiately(0.1f);
}
}
public class Recipe_ContractNipple : Recipe_BreastSurgery
{
protected override void SurgeryResult(HediffComp_Breast breast)
{
breast.AdjustNippleSizeImmidiately(-0.1f);
}
}
}

View File

@ -86,7 +86,7 @@ namespace RJW_Menstruation
}
}
public static readonly Texture2D FertChanceTex = SolidColorMaterials.NewSolidColorTexture(new Color(1f, 1f, 1f, 0.4f));
private static Texture2D milktexturecache = null;

View File

@ -394,6 +394,8 @@ namespace RJW_Menstruation
statvalue = Configurations.ImplantationChance * comp.Props.baseImplantationChanceFactor * comp.ImplantFactor;
FillableBarLabeled(lineRect, " " + xxx.reproduction.LabelCap.CapitalizeFirst() + " " + statvalue.ToStringPercent(), statvalue, TextureCache.fertilityTexture, Texture2D.blackTexture);
Rect overayRect = new Rect(lineRect.x, lineRect.y, lineRect.width * Math.Min(1.0f, comp.GetFertilityChance()), lineRect.height);
GUI.DrawTexture(overayRect, TextureCache.FertChanceTex);
lineRect.y += height;
}