mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
cum mixtures
This commit is contained in:
parent
cd0809102a
commit
8d54a63532
17 changed files with 319 additions and 41 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.1.3</version>
|
||||
<version>1.0.1.4</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
Binary file not shown.
25
Defs/ThingDefs/Filth_Mixture.xml
Normal file
25
Defs/ThingDefs/Filth_Mixture.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<Defs>
|
||||
<ThingDef ParentName="BaseFilth">
|
||||
<defName>FilthMixture</defName>
|
||||
<label>mixture</label>
|
||||
<thingClass>RJW_Menstruation.Filth_Colored</thingClass>
|
||||
<statBases>
|
||||
<Beauty>-30</Beauty>
|
||||
<Cleanliness>-10</Cleanliness>
|
||||
</statBases>
|
||||
<graphicData>
|
||||
<graphicClass>Graphic_Random</graphicClass>
|
||||
<texPath>Things/Filth/PoolSoft</texPath>
|
||||
<color>(255, 255, 255, 180)</color>
|
||||
</graphicData>
|
||||
<filth>
|
||||
<rainWashes>true</rainWashes>
|
||||
<cleaningWorkToReduceThickness>40</cleaningWorkToReduceThickness>
|
||||
<canFilthAttach>true</canFilthAttach>
|
||||
</filth>
|
||||
</ThingDef>
|
||||
|
||||
|
||||
</Defs>
|
|
@ -22,11 +22,12 @@
|
|||
<durationDays>7.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
<description>I'm worried i might get pregnant.</description>
|
||||
<baseMoodEffect>-5</baseMoodEffect>
|
||||
<baseMoodEffect>-3</baseMoodEffect>
|
||||
<baseOpinionOffset>-2</baseOpinionOffset>
|
||||
</li>
|
||||
</stages>
|
||||
|
@ -38,11 +39,12 @@
|
|||
<durationDays>7.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
<description>I'm worried i might get pregnant. The chance is low, but...</description>
|
||||
<baseMoodEffect>-2</baseMoodEffect>
|
||||
<baseMoodEffect>-1</baseMoodEffect>
|
||||
</li>
|
||||
</stages>
|
||||
</ThoughtDef>
|
||||
|
@ -53,11 +55,12 @@
|
|||
<durationDays>3.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
<description>I might get pregnant.</description>
|
||||
<baseMoodEffect>15</baseMoodEffect>
|
||||
<baseMoodEffect>10</baseMoodEffect>
|
||||
<baseOpinionOffset>5</baseOpinionOffset>
|
||||
</li>
|
||||
</stages>
|
||||
|
@ -69,11 +72,12 @@
|
|||
<durationDays>3.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
<description>I loved it.</description>
|
||||
<baseMoodEffect>5</baseMoodEffect>
|
||||
<baseMoodEffect>3</baseMoodEffect>
|
||||
<baseOpinionOffset>1</baseOpinionOffset>
|
||||
</li>
|
||||
</stages>
|
||||
|
@ -100,6 +104,7 @@
|
|||
<durationDays>3.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
|
@ -116,6 +121,7 @@
|
|||
<durationDays>7.0</durationDays>
|
||||
<stackLimit>5</stackLimit>
|
||||
<stackedEffectMultiplier>0.1</stackedEffectMultiplier>
|
||||
<stackLimitForSameOtherPawn>1</stackLimitForSameOtherPawn>
|
||||
<stages>
|
||||
<li>
|
||||
<label>{0} came inside</label>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<OvaryRegenerationPill.description>난소를 재생시켜 배출할수있는 난자의 양을 증가시킵니다. 난자 소모량이 클수록 효과가 줄어듭니다. 갱년기 증상을 완화시키지 않습니다.</OvaryRegenerationPill.description>
|
||||
<SuperovulationInducingAgent.label>과배란 유도제</SuperovulationInducingAgent.label>
|
||||
<SuperovulationInducingAgent.description>과배란을 유도하는 약물입니다. 조기폐경을 초래할수도 있습니다.</SuperovulationInducingAgent.description>
|
||||
<FilthMixture.label>혼합물</FilthMixture.label>
|
||||
|
||||
|
||||
</LanguageData>
|
|
@ -1,5 +1,8 @@
|
|||
Version 1.0.1.4
|
||||
- fixed bugs that in period hediff not disappear in time
|
||||
- fixed enable menopause setting was not saved
|
||||
- now cum filth is generated as a single mixture filth
|
||||
Version 1.0.1.3
|
||||
*Note* you should update mod list
|
||||
- requires RJW 4.6.1 or later
|
||||
- max absorbable statbase added to vanilla fabrics.
|
||||
- added thoughts for cum inside
|
||||
|
@ -15,7 +18,7 @@ Version 1.0.1.3
|
|||
- fixed bugs with enzygotic twins
|
||||
- enzigotic twins will get same appearance
|
||||
- added HAR compatibllity
|
||||
-
|
||||
- removed unused textures
|
||||
Version 1.0.1.2
|
||||
- requires RJW 4.6.1 or later
|
||||
- reduced sex satisfaction debuffs
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref DrawVaginaStatus, "DrawVaginaStatus", DrawVaginaStatus, true);
|
||||
Scribe_Values.Look(ref Debug, "Debug", Debug, true);
|
||||
Scribe_Values.Look(ref InfoDetail, "InfoDetail", InfoDetail, true);
|
||||
Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", EnableMenopause, true);
|
||||
Scribe_Values.Look(ref UseMultiplePregnancy, "UseMultiplePregnancy", UseMultiplePregnancy, true);
|
||||
Scribe_Values.Look(ref EnableHeteroOvularTwins, "EnableHeteroOvularTwins", EnableHeteroOvularTwins, true);
|
||||
Scribe_Values.Look(ref EnableEnzygoticTwins, "EnableEnzygoticTwins", EnableEnzygoticTwins, true);
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace RJW_Menstruation
|
|||
fertvolume = 1.0f;
|
||||
decayresist = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Cum(Pawn pawn, float volume, string notcumlabel, float decayresist = 0, ThingDef filthDef = null)
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
public class FilthMaker_Colored
|
||||
{
|
||||
|
||||
public static bool TryMakeFilth(IntVec3 c, Map map, ThingDef filthDef, IEnumerable<string> sources, Color color , bool shouldPropagate, FilthSourceFlags additionalFlags = FilthSourceFlags.None)
|
||||
{
|
||||
Filth_Colored filth = (Filth_Colored)(from t in c.GetThingList(map)
|
||||
where t.def == filthDef
|
||||
select t).FirstOrDefault<Thing>();
|
||||
if (!c.Walkable(map) || (filth != null && !filth.CanBeThickened))
|
||||
{
|
||||
if (shouldPropagate)
|
||||
{
|
||||
List<IntVec3> list = GenAdj.AdjacentCells8WayRandomized();
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
IntVec3 c2 = c + list[i];
|
||||
if (c2.InBounds(map) && TryMakeFilth(c2, map, filthDef, sources, color,false, FilthSourceFlags.None))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filth != null)
|
||||
{
|
||||
filth.AddSources(sources);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (filth != null)
|
||||
{
|
||||
filth.ThickenFilth();
|
||||
filth.AddSources(sources);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!FilthMaker.CanMakeFilth(c, map, filthDef, additionalFlags))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Filth_Colored filth2 = (Filth_Colored)ThingMaker.MakeThing(filthDef, null);
|
||||
filth2.DrawColor = color;
|
||||
filth2.AddSources(sources);
|
||||
GenSpawn.Spawn(filth2, c, map, WipeMode.Vanish);
|
||||
}
|
||||
//FilthMonitor.Notify_FilthSpawned();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -91,6 +91,7 @@ namespace RJW_Menstruation
|
|||
private float crampPain= -1;
|
||||
private Need sexNeed = null;
|
||||
private string customwombtex = null;
|
||||
private string customvagtex = null;
|
||||
|
||||
public float TotalCum
|
||||
{
|
||||
|
@ -251,6 +252,19 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
public string vagTex
|
||||
{
|
||||
get
|
||||
{
|
||||
if (customvagtex == null) return Props.vagTex;
|
||||
else return customvagtex;
|
||||
}
|
||||
set
|
||||
{
|
||||
customvagtex = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetFertilizingInfo
|
||||
{
|
||||
get
|
||||
|
@ -434,6 +448,7 @@ namespace RJW_Menstruation
|
|||
public void CumIn(Pawn pawn, float injectedvolume, float fertility = 1.0f, ThingDef filthdef = null)
|
||||
{
|
||||
float volume = injectedvolume * CumInFactor;
|
||||
float cumd = TotalCumPercent;
|
||||
float tmp = TotalCum + volume;
|
||||
if (tmp > CumCapacity)
|
||||
{
|
||||
|
@ -469,7 +484,9 @@ namespace RJW_Menstruation
|
|||
}
|
||||
if (!merged) cums.Add(new Cum(pawn, volume, fertility, filthdef));
|
||||
}
|
||||
cumd = TotalCumPercent - cumd;
|
||||
AfterCumIn(pawn);
|
||||
AfterFluidIn(cumd);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -483,6 +500,7 @@ namespace RJW_Menstruation
|
|||
public void CumIn(Pawn pawn, float volume, string notcumlabel, float decayresist = 0, ThingDef filthdef = null)
|
||||
{
|
||||
float tmp = TotalCum + volume;
|
||||
float cumd = TotalCumPercent;
|
||||
if (tmp > CumCapacity)
|
||||
{
|
||||
float cumoutrate = 1 - (CumCapacity / tmp);
|
||||
|
@ -519,7 +537,9 @@ namespace RJW_Menstruation
|
|||
}
|
||||
if (!merged) cums.Add(new Cum(pawn, volume, notcumlabel,decayresist, filthdef));
|
||||
}
|
||||
cumd = TotalCumPercent - cumd;
|
||||
AfterNotCumIn();
|
||||
AfterFluidIn(cumd);
|
||||
}
|
||||
|
||||
public void AfterCumIn(Pawn cummer)
|
||||
|
@ -573,6 +593,66 @@ namespace RJW_Menstruation
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Action for both Cum and NotCum
|
||||
/// </summary>
|
||||
/// <param name="fd">Fluid deviation</param>
|
||||
public void AfterFluidIn(float fd)
|
||||
{
|
||||
//ModLog.Message("LLActivated: " + Configurations.LLActivated);
|
||||
//if (Configurations.LLActivated)
|
||||
//{
|
||||
// LLCumflationIn(fd);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cumflation for Licentia Labs
|
||||
/// </summary>
|
||||
/// <param name="fd"></param>
|
||||
public void LLCumflationIn(float fd)
|
||||
{
|
||||
if (TotalCumPercent > 1.0f)
|
||||
{
|
||||
ModLog.Message("cumflation in");
|
||||
BodyPartRecord genital = Genital_Helper.get_genitalsBPR(parent.pawn);
|
||||
HediffWithComps hediff = parent.pawn.health?.hediffSet?.GetHediffs<HediffWithComps>()?.FirstOrDefault(x => x.def == VariousDefOf.Cumflation && x.Part.Equals(genital));
|
||||
|
||||
if (hediff == null) // 1.0 fd = 0.002 severity
|
||||
{
|
||||
ModLog.Message("hediff null");
|
||||
hediff = (HediffWithComps)HediffMaker.MakeHediff(VariousDefOf.Cumflation, parent.pawn);
|
||||
hediff.Severity = (TotalCumPercent - 1.0f) * 0.002f;
|
||||
parent.pawn.health.AddHediff(hediff, genital);
|
||||
ModLog.Message("added hediff");
|
||||
}
|
||||
else
|
||||
{
|
||||
ModLog.Message("increase severity: " + hediff.Part.Label);
|
||||
hediff.Severity += fd * 0.002f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void LLCumflationOut(float fd)
|
||||
{
|
||||
HediffWithComps hediff = parent.pawn.health?.hediffSet?.GetHediffs<HediffWithComps>()?.FirstOrDefault(x => x.def == VariousDefOf.Cumflation && x.Part.def.Equals(xxx.genitalsDef));
|
||||
if (hediff != null)
|
||||
{
|
||||
if (TotalCumPercent < 1.0f) parent.pawn.health.RemoveHediff(hediff);
|
||||
else
|
||||
{
|
||||
ModLog.Message("decrease severity: " + hediff?.Part?.Label + TotalCumPercent * 0.002f);
|
||||
hediff.Severity -= fd * 0.002f;
|
||||
if (hediff.Severity < TotalCumPercent * 0.002f) hediff.Severity = TotalCumPercent * 0.002f;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void BeforeCumOut(out Absorber absorber)
|
||||
{
|
||||
absorber = (Absorber)parent.pawn.apparel?.WornApparel?.Find(x => x.def.apparel.tags.Contains("Absorber"));
|
||||
|
@ -583,12 +663,29 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For natural leaking
|
||||
/// </summary>
|
||||
public void AfterCumOut()
|
||||
{
|
||||
parent.pawn.needs.mood.thoughts.memories.TryGainMemory(VariousDefOf.LeakingFluids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For all type of leaking
|
||||
/// </summary>
|
||||
/// <param name="fd"></param>
|
||||
public void AfterFluidOut(float fd)
|
||||
{
|
||||
//if (Configurations.LLActivated)
|
||||
//{
|
||||
// LLCumflationOut(fd);
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excrete cums in womb naturally
|
||||
/// </summary>
|
||||
|
@ -596,8 +693,9 @@ namespace RJW_Menstruation
|
|||
{
|
||||
float leakfactor = 1.0f;
|
||||
float totalleak = 0f;
|
||||
Absorber absorber;
|
||||
BeforeCumOut(out absorber);
|
||||
float cumd = TotalCumPercent;
|
||||
List<string> filthlabels = new List<string>();
|
||||
BeforeCumOut(out Absorber absorber);
|
||||
if (cums.NullOrEmpty()) return;
|
||||
else if (absorber != null && absorber.dirty && !absorber.LeakAfterDirty) leakfactor = 0f;
|
||||
List<Cum> removecums = new List<Cum>();
|
||||
|
@ -607,16 +705,23 @@ namespace RJW_Menstruation
|
|||
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;
|
||||
totalleak += MakeCumFilth(cum, vd, absorber);
|
||||
totalleak += AbsorbCum(cum, vd, absorber);
|
||||
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 1.ToString());
|
||||
filthlabels.Add(tmp.Replace(" x1",""));
|
||||
if (cum.fertvolume < 0.01f) cum.fertvolume = 0;
|
||||
if (cum.volume < 0.01f) removecums.Add(cum);
|
||||
}
|
||||
foreach(Cum cum in removecums)
|
||||
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;
|
||||
if (totalleak >= 1.0f) AfterCumOut();
|
||||
AfterFluidOut(cumd);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -628,8 +733,11 @@ namespace RJW_Menstruation
|
|||
public float CumOut(Cum targetcum, float portion = 0.1f)
|
||||
{
|
||||
float leakfactor = 1.0f;
|
||||
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)
|
||||
{
|
||||
|
@ -637,15 +745,22 @@ namespace RJW_Menstruation
|
|||
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))));
|
||||
MakeCumFilth(cum, vd - cum.volume);
|
||||
//MakeCumFilth(cum, vd - cum.volume);
|
||||
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -659,6 +774,9 @@ namespace RJW_Menstruation
|
|||
{
|
||||
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)
|
||||
{
|
||||
|
@ -666,15 +784,22 @@ namespace RJW_Menstruation
|
|||
if (cum.Equals(targetcum)) outcum = cum.volume * (portion);
|
||||
cum.volume *= 1 - (portion);
|
||||
cum.fertvolume *= (1 - (portion)) * (1 - (Configurations.CumFertilityDecayRatio));
|
||||
MakeCumFilth(cum, vd - cum.volume);
|
||||
//MakeCumFilth(cum, vd - cum.volume);
|
||||
string tmp = "FilthLabelWithSource".Translate(cum.FilthDef.label, cum.pawn.LabelShort, 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;
|
||||
}
|
||||
|
||||
|
@ -784,24 +909,6 @@ namespace RJW_Menstruation
|
|||
if (sexNeed.CurLevel < 0.5) sexNeed.CurLevel += 0.01f;
|
||||
}
|
||||
}
|
||||
|
||||
//if (Configurations.LLActivated)
|
||||
//{
|
||||
// float tcp = TotalCumPercent;
|
||||
// if (tcp > 2.0f)
|
||||
// {
|
||||
// Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Cumflation);
|
||||
// if (hediff != null)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
@ -910,13 +1017,13 @@ namespace RJW_Menstruation
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make filth from considering absorber
|
||||
/// Absorb cum and return leaked amount
|
||||
/// </summary>
|
||||
/// <param name="cum"></param>
|
||||
/// <param name="amount"></param>
|
||||
/// <param name="absorber"></param>
|
||||
/// <returns></returns>
|
||||
private float MakeCumFilth(Cum cum, float amount, Absorber absorber)
|
||||
private float AbsorbCum(Cum cum, float amount, Absorber absorber)
|
||||
{
|
||||
|
||||
if (absorber != null)
|
||||
|
@ -935,18 +1042,40 @@ namespace RJW_Menstruation
|
|||
}
|
||||
else
|
||||
{
|
||||
if (absorber.LeakAfterDirty) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
|
||||
|
||||
//if (absorber.LeakAfterDirty) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
|
||||
//if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn.LabelShort);
|
||||
return amount;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private float MakeCumFilthMixture(float amount, List<string> cumlabels)
|
||||
{
|
||||
|
||||
if (amount >= minmakefilthvalue)
|
||||
{
|
||||
FilthMaker_Colored.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, VariousDefOf.FilthMixture, cumlabels,GetCumMixtureColor,false);
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
private string FilthLabelMaker(List<string> labels)
|
||||
{
|
||||
string res = "";
|
||||
foreach (string label in labels)
|
||||
{
|
||||
res += label;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void EggDecay()
|
||||
|
@ -1073,6 +1202,8 @@ namespace RJW_Menstruation
|
|||
if (curStageHrs >= bleedingIntervalhours)
|
||||
{
|
||||
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
|
||||
Hediff hediff = parent.pawn.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_MenstrualCramp);
|
||||
if (hediff != null) parent.pawn.health.RemoveHediff(hediff);
|
||||
GoNextStage(Stage.Follicular);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
static First()
|
||||
{
|
||||
var har = new Harmony("LL");
|
||||
var har = new Harmony("RJW_Menstruation");
|
||||
har.PatchAll(Assembly.GetExecutingAssembly());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,4 +89,5 @@ namespace RJW_Menstruation
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<Compile Include="Dialog_WombStatus.cs" />
|
||||
<Compile Include="DNADef.cs" />
|
||||
<Compile Include="DrugOutcomDoers.cs" />
|
||||
<Compile Include="FilthMaker_Colored.cs" />
|
||||
<Compile Include="HARCompatibility.cs" />
|
||||
<Compile Include="Hediff_MultiplePregnancy.cs" />
|
||||
<Compile Include="JobDrivers.cs" />
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
using RimWorld;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
|
@ -12,14 +13,14 @@ namespace RJW_Menstruation
|
|||
public static object GetMemberValue(this Type type, string name)
|
||||
{
|
||||
BindingFlags flags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
|
||||
FieldInfo fieldInfo = (type != null) ? type.GetField(name, flags) : null;
|
||||
FieldInfo fieldInfo = type?.GetField(name, flags);
|
||||
return fieldInfo?.GetValue(null);
|
||||
}
|
||||
|
||||
public static object GetMemberValue(this object obj, string name)
|
||||
{
|
||||
BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
|
||||
FieldInfo fieldInfo = (obj != null) ? obj.GetType().GetField(name, flags) : null;
|
||||
FieldInfo fieldInfo = obj?.GetType().GetField(name, flags);
|
||||
return fieldInfo?.GetValue(obj);
|
||||
}
|
||||
|
||||
|
@ -43,5 +44,6 @@ namespace RJW_Menstruation
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,44 @@ namespace RJW_Menstruation
|
|||
}
|
||||
|
||||
|
||||
public class Filth_Colored : Filth
|
||||
{
|
||||
|
||||
private Color color = Color.white;
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
Scribe_Values.Look(ref color, "color", color, true);
|
||||
}
|
||||
|
||||
public override Color DrawColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (color != Color.white)
|
||||
{
|
||||
return color;
|
||||
}
|
||||
if (Stuff != null)
|
||||
{
|
||||
return def.GetColorForStuff(Stuff);
|
||||
}
|
||||
if (def.graphicData != null)
|
||||
{
|
||||
return def.graphicData.color;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
set
|
||||
{
|
||||
color = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -202,9 +204,9 @@ namespace RJW_Menstruation
|
|||
public static Texture2D GetGenitalIcon(this Pawn pawn)
|
||||
{
|
||||
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn)).Find((Hediff h) => h.def.defName.ToLower().Contains("vagina"));
|
||||
CompProperties_Menstruation Props = (CompProperties_Menstruation)hediff.TryGetComp<HediffComp_Menstruation>().props;
|
||||
HediffComp_Menstruation comp = pawn.GetMenstruationComp();
|
||||
string icon;
|
||||
if (Props != null) icon = Props.vagTex;
|
||||
if (comp != null) icon = comp.vagTex;
|
||||
else icon = "Genitals/Vagina";
|
||||
|
||||
if (hediff.Severity < 0.20f) icon += "00"; //micro
|
||||
|
@ -279,5 +281,6 @@ namespace RJW_Menstruation
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace RJW_Menstruation
|
|||
public static readonly ThingDef CumFilth = DefDatabase<ThingDef>.GetNamed("FilthCum");
|
||||
public static readonly ThingDef Tampon = DefDatabase<ThingDef>.GetNamed("Absorber_Tampon");
|
||||
public static readonly ThingDef Tampon_Dirty = DefDatabase<ThingDef>.GetNamed("Absorber_Tampon_Dirty");
|
||||
public static readonly ThingDef FilthMixture = DefDatabase<ThingDef>.GetNamed("FilthMixture");
|
||||
public static readonly HediffDef RJW_IUD = DefDatabase<HediffDef>.GetNamed("RJW_IUD");
|
||||
public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
|
||||
public static readonly HediffDef Hediff_Climacteric = DefDatabase<HediffDef>.GetNamed("Hediff_Climacteric");
|
||||
|
@ -47,6 +48,8 @@ namespace RJW_Menstruation
|
|||
|
||||
// Defs from Licentia Labs
|
||||
public static readonly HediffDef Cumflation = DefDatabase<HediffDef>.GetNamedSilentFail("Cumflation");
|
||||
public static readonly ThoughtDef GotOverCumflated = DefDatabase<ThoughtDef>.GetNamedSilentFail("GotOverCumflated");
|
||||
public static readonly ThoughtDef GotOverCumflatedEnjoyed = DefDatabase<ThoughtDef>.GetNamedSilentFail("GotOverCumflatedEnjoyed");
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue