1.0.5.5
This commit is contained in:
parent
c1ac806cb2
commit
07e05f0e92
Binary file not shown.
|
@ -42,9 +42,9 @@
|
||||||
<cumThickness>0.2</cumThickness>
|
<cumThickness>0.2</cumThickness>
|
||||||
<ingestionOutcomeDoers>
|
<ingestionOutcomeDoers>
|
||||||
<li Class="IngestionOutcomeDoer_GiveHediff">
|
<li Class="IngestionOutcomeDoer_GiveHediff">
|
||||||
<chance>0.02</chance>
|
<chance>0.005</chance>
|
||||||
<hediffDef>Hediff_ASA</hediffDef>
|
<hediffDef>Hediff_ASA</hediffDef>
|
||||||
<severity>0.02</severity>
|
<severity>0.01</severity>
|
||||||
</li>
|
</li>
|
||||||
</ingestionOutcomeDoers>
|
</ingestionOutcomeDoers>
|
||||||
<hybridExtension>
|
<hybridExtension>
|
||||||
|
|
|
@ -163,5 +163,7 @@
|
||||||
</comps>
|
</comps>
|
||||||
</value>
|
</value>
|
||||||
</Operation>
|
</Operation>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Patch>
|
</Patch>
|
Binary file not shown.
|
@ -92,12 +92,26 @@ namespace RJW_Menstruation
|
||||||
Anestrus
|
Anestrus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static readonly Dictionary<Stage, Texture2D> StageTexture = new Dictionary<Stage, Texture2D>()
|
||||||
|
{
|
||||||
|
{ Stage.Follicular, TextureCache.humanTexture },
|
||||||
|
{ Stage.ClimactericFollicular, TextureCache.humanTexture },
|
||||||
|
{ Stage.Luteal, TextureCache.fertilityTexture },
|
||||||
|
{ Stage.ClimactericLuteal, TextureCache.fertilityTexture },
|
||||||
|
{ Stage.Bleeding, TextureCache.khorneTexture },
|
||||||
|
{ Stage.ClimactericBleeding, TextureCache.khorneTexture },
|
||||||
|
{ Stage.Recover, TextureCache.nurgleTexture }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
protected List<Cum> cums;
|
protected List<Cum> cums;
|
||||||
protected List<Egg> eggs;
|
protected List<Egg> eggs;
|
||||||
protected int follicularIntervalhours = -1;
|
protected int follicularIntervalhours = -1;
|
||||||
protected int lutealIntervalhours = -1;
|
protected int lutealIntervalhours = -1;
|
||||||
protected int bleedingIntervalhours = -1;
|
protected int bleedingIntervalhours = -1;
|
||||||
protected int recoveryIntervalhours = -1;
|
protected int recoveryIntervalhours = -1;
|
||||||
|
protected int currentIntervalhours = -1;
|
||||||
protected float crampPain = -1;
|
protected float crampPain = -1;
|
||||||
protected Need sexNeed = null;
|
protected Need sexNeed = null;
|
||||||
protected string customwombtex = null;
|
protected string customwombtex = null;
|
||||||
|
@ -106,6 +120,7 @@ namespace RJW_Menstruation
|
||||||
protected int opcache = -1;
|
protected int opcache = -1;
|
||||||
protected HediffComp_Breast breastcache = null;
|
protected HediffComp_Breast breastcache = null;
|
||||||
protected float antisperm = 0.0f;
|
protected float antisperm = 0.0f;
|
||||||
|
protected float? originvagsize = null;
|
||||||
|
|
||||||
public int ovarypowerthreshold
|
public int ovarypowerthreshold
|
||||||
{
|
{
|
||||||
|
@ -415,6 +430,64 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float OriginVagSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (originvagsize == null)
|
||||||
|
{
|
||||||
|
originvagsize = parent.Severity;
|
||||||
|
}
|
||||||
|
return originvagsize ?? 0.1f;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
originvagsize = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float CurStageIntervalHours
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
switch (curStage)
|
||||||
|
{
|
||||||
|
case Stage.Follicular:
|
||||||
|
case Stage.ClimactericFollicular:
|
||||||
|
return FollicularIntervalHours;
|
||||||
|
case Stage.Luteal:
|
||||||
|
case Stage.ClimactericLuteal:
|
||||||
|
return lutealIntervalhours;
|
||||||
|
case Stage.Bleeding:
|
||||||
|
case Stage.ClimactericBleeding:
|
||||||
|
return bleedingIntervalhours;
|
||||||
|
case Stage.Recover:
|
||||||
|
return recoveryIntervalhours;
|
||||||
|
case Stage.Pregnant:
|
||||||
|
return currentIntervalhours;
|
||||||
|
default:
|
||||||
|
return float.PositiveInfinity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float StageProgress
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return curStageHrs / CurStageIntervalHours;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Texture2D GetStageTexture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Texture2D tex;
|
||||||
|
if (!StageTexture.TryGetValue(curStage, out tex)) tex = TextureCache.tzeentchTexture;
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void CompExposeData()
|
public override void CompExposeData()
|
||||||
{
|
{
|
||||||
|
@ -427,12 +500,12 @@ namespace RJW_Menstruation
|
||||||
Scribe_Values.Look(ref lutealIntervalhours, "lutealIntervalhours", lutealIntervalhours, true);
|
Scribe_Values.Look(ref lutealIntervalhours, "lutealIntervalhours", lutealIntervalhours, true);
|
||||||
Scribe_Values.Look(ref bleedingIntervalhours, "bleedingIntervalhours", bleedingIntervalhours, true);
|
Scribe_Values.Look(ref bleedingIntervalhours, "bleedingIntervalhours", bleedingIntervalhours, true);
|
||||||
Scribe_Values.Look(ref recoveryIntervalhours, "recoveryIntervalhours", recoveryIntervalhours, true);
|
Scribe_Values.Look(ref recoveryIntervalhours, "recoveryIntervalhours", recoveryIntervalhours, true);
|
||||||
|
Scribe_Values.Look(ref currentIntervalhours, "currentIntervalhours", currentIntervalhours, true);
|
||||||
Scribe_Values.Look(ref crampPain, "crampPain", crampPain, true);
|
Scribe_Values.Look(ref crampPain, "crampPain", crampPain, true);
|
||||||
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
|
Scribe_Values.Look(ref ovarypower, "ovarypower", ovarypower, true);
|
||||||
Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true);
|
Scribe_Values.Look(ref eggstack, "eggstack", eggstack, true);
|
||||||
Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true);
|
Scribe_Values.Look(ref estrusflag, "estrusflag", estrusflag, true);
|
||||||
|
Scribe_Values.Look(ref originvagsize, "originvagsize", originvagsize, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -795,7 +868,12 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
InitOvary(parent.pawn.ageTracker.AgeBiologicalYears);
|
InitOvary(parent.pawn.ageTracker.AgeBiologicalYears);
|
||||||
|
|
||||||
if (parent.pawn.IsPregnant()) curStage = Stage.Pregnant;
|
if (parent.pawn.IsPregnant())
|
||||||
|
{
|
||||||
|
Hediff_BasePregnancy hediff = (Hediff_BasePregnancy)PregnancyHelper.GetPregnancy(parent.pawn);
|
||||||
|
currentIntervalhours = (int)(hediff?.GestationHours());
|
||||||
|
curStage = Stage.Pregnant;
|
||||||
|
}
|
||||||
if (parent.pawn.IsAnimal())
|
if (parent.pawn.IsAnimal())
|
||||||
{
|
{
|
||||||
if (Configurations.EnableAnimalCycle)
|
if (Configurations.EnableAnimalCycle)
|
||||||
|
@ -953,7 +1031,7 @@ namespace RJW_Menstruation
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//for now, only one egg can be implanted
|
|
||||||
protected bool Implant()
|
protected bool Implant()
|
||||||
{
|
{
|
||||||
if (!eggs.NullOrEmpty())
|
if (!eggs.NullOrEmpty())
|
||||||
|
@ -970,18 +1048,17 @@ namespace RJW_Menstruation
|
||||||
if (!Configurations.UseMultiplePregnancy)
|
if (!Configurations.UseMultiplePregnancy)
|
||||||
{
|
{
|
||||||
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
||||||
|
Hediff_BasePregnancy hediff = (Hediff_BasePregnancy)PregnancyHelper.GetPregnancy(parent.pawn);
|
||||||
|
currentIntervalhours = (int)hediff?.GestationHours();
|
||||||
pregnant = true;
|
pregnant = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(parent.pawn, egg.fertilizer);
|
Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(parent.pawn, egg.fertilizer);
|
||||||
Hediff hediff = PregnancyHelper.GetPregnancy(parent.pawn);
|
Hediff_BasePregnancy hediff = (Hediff_BasePregnancy)PregnancyHelper.GetPregnancy(parent.pawn);
|
||||||
//if (hediff is Hediff_BasePregnancy)
|
currentIntervalhours = (int)hediff?.GestationHours();
|
||||||
//{
|
|
||||||
// Hediff_BasePregnancy h = (Hediff_BasePregnancy)hediff;
|
|
||||||
// if (h.babies.Count > 1) h.babies.RemoveRange(1, h.babies.Count - 1);
|
|
||||||
//}
|
|
||||||
pregnant = true;
|
pregnant = true;
|
||||||
deadeggs.Add(egg);
|
deadeggs.Add(egg);
|
||||||
}
|
}
|
||||||
|
@ -1263,7 +1340,11 @@ namespace RJW_Menstruation
|
||||||
EggDecay();
|
EggDecay();
|
||||||
Implant();
|
Implant();
|
||||||
}
|
}
|
||||||
if (parent.pawn.IsPregnant()) StayCurrentStageConst(Stage.Pregnant);
|
if (parent.pawn.IsPregnant())
|
||||||
|
{
|
||||||
|
curStageHrs += 1;
|
||||||
|
StayCurrentStageConst(Stage.Pregnant);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Breast != null)
|
if (Breast != null)
|
||||||
|
@ -1671,6 +1752,26 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public class HediffComp_Anus : HediffComp
|
public class HediffComp_Anus : HediffComp
|
||||||
{
|
{
|
||||||
|
protected float? originanussize;
|
||||||
|
|
||||||
|
public float OriginAnusSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (originanussize == null)
|
||||||
|
{
|
||||||
|
originanussize = parent.Severity;
|
||||||
|
}
|
||||||
|
return originanussize ?? 0.1f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void CompExposeData()
|
||||||
|
{
|
||||||
|
base.CompExposeData();
|
||||||
|
Scribe_Values.Look(ref originanussize, "originanussize", originanussize, true);
|
||||||
|
}
|
||||||
|
|
||||||
public override void CompPostTick(ref float severityAdjustment)
|
public override void CompPostTick(ref float severityAdjustment)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
public static class MenstruationUtility
|
public static class MenstruationUtility
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public static HediffComp_Menstruation GetMenstruationComp(this Pawn pawn)
|
public static HediffComp_Menstruation GetMenstruationComp(this Pawn pawn)
|
||||||
{
|
{
|
||||||
var hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff h) => h.def.defName.ToLower().Contains("vagina"));
|
var hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff h) => h.def.defName.ToLower().Contains("vagina"));
|
||||||
|
@ -37,6 +39,31 @@ namespace RJW_Menstruation
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static HediffComp_Anus GetAnusComp(this Pawn pawn)
|
||||||
|
{
|
||||||
|
var hedifflist = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.FindAll((Hediff h) => h.def.defName.ToLower().Contains("anus"));
|
||||||
|
HediffComp_Anus result;
|
||||||
|
if (!hedifflist.NullOrEmpty())
|
||||||
|
{
|
||||||
|
foreach (Hediff h in hedifflist)
|
||||||
|
{
|
||||||
|
result = h.TryGetComp<HediffComp_Anus>();
|
||||||
|
if (result != null) return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static HediffComp_Anus GetAnusComp(this Hediff hediff)
|
||||||
|
{
|
||||||
|
if (hediff is Hediff_PartBaseNatural || hediff is Hediff_PartBaseArtifical)
|
||||||
|
{
|
||||||
|
return hediff.TryGetComp<HediffComp_Anus>();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static float GetFertilityChance(this HediffComp_Menstruation comp)
|
public static float GetFertilityChance(this HediffComp_Menstruation comp)
|
||||||
{
|
{
|
||||||
return comp.TotalFertCum * Configurations.FertilizeChance;
|
return comp.TotalFertCum * Configurations.FertilizeChance;
|
||||||
|
@ -120,7 +147,6 @@ namespace RJW_Menstruation
|
||||||
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
|
Texture2D cumtex = ContentFinder<Texture2D>.Get((icon), true);
|
||||||
return cumtex;
|
return cumtex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
|
public static Texture2D GetWombIcon(this HediffComp_Menstruation comp)
|
||||||
{
|
{
|
||||||
if (comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().FirstOrDefault() != null) return ContentFinder<Texture2D>.Get(("Womb/Womb_Egged"), true);
|
if (comp.Pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().FirstOrDefault() != null) return ContentFinder<Texture2D>.Get(("Womb/Womb_Egged"), true);
|
||||||
|
@ -161,5 +187,75 @@ namespace RJW_Menstruation
|
||||||
GUI.DrawTexture(rect, comp.GetEggIcon(), ScaleMode.ScaleToFit);
|
GUI.DrawTexture(rect, comp.GetEggIcon(), ScaleMode.ScaleToFit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Texture2D GetGenitalIcon(this Pawn pawn, HediffComp_Menstruation comp, bool drawOrigin = false)
|
||||||
|
{
|
||||||
|
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_genitalsBPR(pawn))?.Find((Hediff h) => h.def.defName.ToLower().Contains("vagina"));
|
||||||
|
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
|
||||||
|
//HediffComp_Menstruation comp = hediff.GetMenstruationComp();
|
||||||
|
string icon;
|
||||||
|
float severity;
|
||||||
|
if (drawOrigin) severity = comp.OriginVagSize;
|
||||||
|
else severity = hediff.Severity;
|
||||||
|
if (comp != null) icon = comp.vagTex;
|
||||||
|
else icon = "Genitals/Vagina";
|
||||||
|
|
||||||
|
if (severity < 0.20f) icon += "00"; //micro
|
||||||
|
else if (severity < 0.30f) icon += "01"; //tight
|
||||||
|
else if (severity < 0.40f) icon += "02"; //tight
|
||||||
|
else if (severity < 0.47f) icon += "03"; //average
|
||||||
|
else if (severity < 0.53f) icon += "04"; //average
|
||||||
|
else if (severity < 0.60f) icon += "05"; //average
|
||||||
|
else if (severity < 0.70f) icon += "06"; //accomodating
|
||||||
|
else if (severity < 0.80f) icon += "07"; //accomodating
|
||||||
|
else if (severity < 0.87f) icon += "08"; //cavernous
|
||||||
|
else if (severity < 0.94f) icon += "09"; //cavernous
|
||||||
|
else if (severity < 1.01f) icon += "10"; //cavernous
|
||||||
|
else icon += "11"; //abyssal
|
||||||
|
|
||||||
|
return ContentFinder<Texture2D>.Get((icon), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Texture2D GetAnalIcon(this Pawn pawn, bool drawOrigin = false)
|
||||||
|
{
|
||||||
|
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus"));
|
||||||
|
if (hediff != null)
|
||||||
|
{
|
||||||
|
string icon;
|
||||||
|
float severity;
|
||||||
|
HediffComp_Anus comp = hediff.GetAnusComp();
|
||||||
|
if (comp != null)
|
||||||
|
{
|
||||||
|
CompProperties_Anus Props = (CompProperties_Anus)comp.props;
|
||||||
|
icon = Props.analTex ?? "Genitals/Anal";
|
||||||
|
if (drawOrigin) severity = comp.OriginAnusSize;
|
||||||
|
else severity = hediff.Severity;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
icon = "Genitals/Anal";
|
||||||
|
severity = hediff.Severity;
|
||||||
|
}
|
||||||
|
if (severity < 0.20f) icon += "00"; //micro
|
||||||
|
else if (severity < 0.40f) icon += "01"; //tight
|
||||||
|
else if (severity < 0.60f) icon += "02"; //average
|
||||||
|
else if (severity < 0.80f) icon += "03"; //accomodating
|
||||||
|
else if (severity < 1.01f) icon += "04"; //cavernous
|
||||||
|
else icon += "05"; //abyssal
|
||||||
|
|
||||||
|
return ContentFinder<Texture2D>.Get((icon), true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float GestationHours(this Hediff_BasePregnancy hediff)
|
||||||
|
{
|
||||||
|
return (1 / hediff?.progress_per_tick ?? 1) / 2500f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,18 +19,23 @@ namespace RJW_Menstruation
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Configurations.EnableWombIcon && __instance.gender == Gender.Female)
|
if (__instance.ShouldShowWombGizmo())
|
||||||
{
|
{
|
||||||
if (!__instance.IsAnimal())
|
AddWombGizmos(__instance, ref gizmoList);
|
||||||
{
|
|
||||||
AddWombGizmos(__instance, ref gizmoList);
|
|
||||||
}
|
|
||||||
else if (Configurations.EnableAnimalCycle)
|
|
||||||
{
|
|
||||||
AddWombGizmos(__instance, ref gizmoList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//if (Configurations.EnableWombIcon && __instance.gender == Gender.Female)
|
||||||
|
//{
|
||||||
|
// if (!__instance.IsAnimal())
|
||||||
|
// {
|
||||||
|
// AddWombGizmos(__instance, ref gizmoList);
|
||||||
|
// }
|
||||||
|
// else if (Configurations.EnableAnimalCycle)
|
||||||
|
// {
|
||||||
|
// AddWombGizmos(__instance, ref gizmoList);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -89,15 +89,15 @@ namespace RJW_Menstruation
|
||||||
public static readonly Texture2D FertChanceTex = SolidColorMaterials.NewSolidColorTexture(new Color(1f, 1f, 1f, 0.4f));
|
public static readonly Texture2D FertChanceTex = SolidColorMaterials.NewSolidColorTexture(new Color(1f, 1f, 1f, 0.4f));
|
||||||
|
|
||||||
|
|
||||||
private static Texture2D milktexturecache = null;
|
private static Texture2D milktexturecache = SolidColorMaterials.NewSolidColorTexture(0.992f, 1.0f, 0.960f, 1.0f);
|
||||||
private static Texture2D slaaneshtexturecache = null;
|
private static Texture2D slaaneshtexturecache = SolidColorMaterials.NewSolidColorTexture(0.686f, 0.062f, 0.698f, 1.0f);
|
||||||
private static Texture2D khornetexturecache = null;
|
private static Texture2D khornetexturecache = SolidColorMaterials.NewSolidColorTexture(0.415f, 0.0f, 0.003f, 1.0f);
|
||||||
private static Texture2D tzeentchtexturecache = null;
|
private static Texture2D tzeentchtexturecache = SolidColorMaterials.NewSolidColorTexture(0.082f, 0.453f, 0.6f, 1.0f);
|
||||||
private static Texture2D nurgletexturecache = null;
|
private static Texture2D nurgletexturecache = SolidColorMaterials.NewSolidColorTexture(0.6f, 0.83f, 0.35f, 1.0f);
|
||||||
private static Texture2D humantexturecache = null;
|
private static Texture2D humantexturecache = SolidColorMaterials.NewSolidColorTexture(0.878f, 0.674f, 0.411f, 1.0f);
|
||||||
private static Texture2D animaltexturecache = null;
|
private static Texture2D animaltexturecache = SolidColorMaterials.NewSolidColorTexture(0.411f, 0.521f, 0.878f, 1.0f);
|
||||||
private static Texture2D fertilitytexturecache = null;
|
private static Texture2D fertilitytexturecache = SolidColorMaterials.NewSolidColorTexture(0.843f, 0.474f, 0.6f, 1.0f);
|
||||||
private static Texture2D ghalmaraztexturecache = null;
|
private static Texture2D ghalmaraztexturecache = SolidColorMaterials.NewSolidColorTexture(0.7f, 0.7f, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using rjw;
|
using rjw;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -72,7 +73,16 @@ namespace RJW_Menstruation
|
||||||
Dialog_WombStatus window = (Dialog_WombStatus)Find.WindowStack.Windows.FirstOrDefault(x => x.GetType().Equals(typeof(Dialog_WombStatus)));
|
Dialog_WombStatus window = (Dialog_WombStatus)Find.WindowStack.Windows.FirstOrDefault(x => x.GetType().Equals(typeof(Dialog_WombStatus)));
|
||||||
if (window != null)
|
if (window != null)
|
||||||
{
|
{
|
||||||
if (window.pawn != pawn)
|
List<Pawn> pawns = Find.Selector.SelectedPawns.FindAll(x => x.ShouldShowWombGizmo());
|
||||||
|
if (!pawns.NullOrEmpty() && pawns.Count > 1)
|
||||||
|
{
|
||||||
|
int index = pawns.IndexOf(window.pawn);
|
||||||
|
|
||||||
|
SoundDefOf.TabOpen.PlayOneShotOnCamera();
|
||||||
|
Pawn newpawn = pawns[(index + 1) % pawns.Count];
|
||||||
|
window.ChangePawn(newpawn, newpawn.GetMenstruationComp());
|
||||||
|
}
|
||||||
|
else if (window.pawn != pawn)
|
||||||
{
|
{
|
||||||
SoundDefOf.TabOpen.PlayOneShotOnCamera();
|
SoundDefOf.TabOpen.PlayOneShotOnCamera();
|
||||||
window.ChangePawn(pawn, comp);
|
window.ChangePawn(pawn, comp);
|
||||||
|
@ -223,13 +233,14 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect wombInfoRect = new Rect(0f, mainRect.yMax - wombrecth - fontheight - 2, wombRectWidth, fontheight);
|
Rect wombInfoRect = new Rect(0f, mainRect.yMax - wombrecth - fontheight - 2, wombRectWidth, fontheight - 4f);
|
||||||
|
Rect progressRect = new Rect(wombInfoRect.x,wombInfoRect.yMax,wombRectWidth, 4f);
|
||||||
buttonstyle.normal.textColor = Color.white;
|
buttonstyle.normal.textColor = Color.white;
|
||||||
//boxstyle.normal.background = Texture2D.whiteTexture;
|
//boxstyle.normal.background = Texture2D.whiteTexture;
|
||||||
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
buttonstyle.alignment = TextAnchor.MiddleLeft;
|
||||||
GUI.backgroundColor = new Color(0.24f, 0.29f, 0.35f, 1);
|
GUI.backgroundColor = new Color(0.24f, 0.29f, 0.35f, 1);
|
||||||
GUI.Box(wombInfoRect, Translations.Dialog_WombInfo01 + ": " + comp.GetCurStageLabel, buttonstyle);
|
GUI.Box(wombInfoRect, Translations.Dialog_WombInfo01 + ": " + comp.GetCurStageLabel, buttonstyle);
|
||||||
|
Widgets.FillableBar(progressRect, comp.StageProgress, comp.GetStageTexture);
|
||||||
GUI.color = Color.white;
|
GUI.color = Color.white;
|
||||||
|
|
||||||
|
|
||||||
|
@ -248,7 +259,7 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
Rect genitalRect = new Rect(pawnRectWidth + 24, pawnRectHeight + 2 * fontheight, genitalRectWidth, genitalRectHeight + fontheight * 2);
|
Rect genitalRect = new Rect(pawnRectWidth + 24, pawnRectHeight + 2 * fontheight, genitalRectWidth, genitalRectHeight + fontheight * 2);
|
||||||
Rect breastRect = new Rect(pawnRectWidth + 24, 40f, breastRectWidth, breastRectHeight + fontheight);
|
Rect breastRect = new Rect(pawnRectWidth + 24, 40f, breastRectWidth, breastRectHeight + fontheight);
|
||||||
DrawVagina(genitalRect);
|
DrawVagina(genitalRect, comp);
|
||||||
DrawBreast(breastRect);
|
DrawBreast(breastRect);
|
||||||
cumlistTitle = new Rect(wombRectWidth + 4f, 0, 150f, fontheight);
|
cumlistTitle = new Rect(wombRectWidth + 4f, 0, 150f, fontheight);
|
||||||
cumlistRect = new Rect(wombRectWidth + 4f, fontheight, 150f, mainRect.yMax - fontheight + preginfoheight + 3);
|
cumlistRect = new Rect(wombRectWidth + 4f, fontheight, 150f, mainRect.yMax - fontheight + preginfoheight + 3);
|
||||||
|
@ -311,14 +322,15 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void DrawVagina(Rect rect)
|
private void DrawVagina(Rect rect, HediffComp_Menstruation comp)
|
||||||
{
|
{
|
||||||
Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
|
Rect genitalIconRect = new Rect(rect.x, rect.y + fontheight, genitalRectWidth, genitalRectHeight);
|
||||||
Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
|
Rect genitalVaginaLabelRect = new Rect(rect.x, rect.y + 10f, genitalRectWidth, fontheight);
|
||||||
Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
|
Rect genitalAnusLabelRect = new Rect(rect.x, rect.y + fontheight + genitalRectHeight, genitalRectWidth, fontheight);
|
||||||
|
bool showOrigin = Mouse.IsOver(genitalIconRect) && Input.GetMouseButton(0);
|
||||||
|
|
||||||
vagina = pawn.GetGenitalIcon();
|
vagina = pawn.GetGenitalIcon(comp, showOrigin);
|
||||||
anal = pawn.GetAnalIcon();
|
anal = pawn.GetAnalIcon(showOrigin);
|
||||||
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
|
GUI.color = new Color(1.00f, 0.47f, 0.47f, 1);
|
||||||
GUI.Box(rect, "", boxstyle);
|
GUI.Box(rect, "", boxstyle);
|
||||||
GUI.color = pawn.story.SkinColor;
|
GUI.color = pawn.story.SkinColor;
|
||||||
|
|
|
@ -9,6 +9,8 @@ namespace RJW_Menstruation
|
||||||
public Color cumcolor;
|
public Color cumcolor;
|
||||||
public HediffComp_Menstruation comp;
|
public HediffComp_Menstruation comp;
|
||||||
|
|
||||||
|
public const float progressbarHeight = 2f;
|
||||||
|
|
||||||
protected override void DrawIcon(Rect rect, Material buttonMat, GizmoRenderParms parms)
|
protected override void DrawIcon(Rect rect, Material buttonMat, GizmoRenderParms parms)
|
||||||
{
|
{
|
||||||
Texture2D badTex = icon;
|
Texture2D badTex = icon;
|
||||||
|
@ -31,6 +33,8 @@ namespace RJW_Menstruation
|
||||||
Widgets.DrawTextureFitted(rect, overay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat);
|
Widgets.DrawTextureFitted(rect, overay, iconDrawScale * 0.85f, iconProportions, iconTexCoords, iconAngle, buttonMat);
|
||||||
GUI.color = Color.white;
|
GUI.color = Color.white;
|
||||||
if (Configurations.DrawEggOverlay) comp.DrawEggOverlay(rect);
|
if (Configurations.DrawEggOverlay) comp.DrawEggOverlay(rect);
|
||||||
|
Rect progressRect = new Rect(rect.x + 2f, rect.y, rect.width - 4f, progressbarHeight);
|
||||||
|
Widgets.FillableBar(progressRect, comp.StageProgress, comp.GetStageTexture);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace RJW_Menstruation
|
||||||
public static System.Random random = new System.Random(Environment.TickCount);
|
public static System.Random random = new System.Random(Environment.TickCount);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static float GetCumVolume(this Pawn pawn)
|
public static float GetCumVolume(this Pawn pawn)
|
||||||
{
|
{
|
||||||
|
@ -179,54 +179,6 @@ namespace RJW_Menstruation
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
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"));
|
|
||||||
if (hediff == null) return ContentFinder<Texture2D>.Get("Genitals/Vagina00", true);
|
|
||||||
HediffComp_Menstruation comp = hediff.GetMenstruationComp();
|
|
||||||
string icon;
|
|
||||||
if (comp != null) icon = comp.vagTex;
|
|
||||||
else icon = "Genitals/Vagina";
|
|
||||||
|
|
||||||
if (hediff.Severity < 0.20f) icon += "00"; //micro
|
|
||||||
else if (hediff.Severity < 0.30f) icon += "01"; //tight
|
|
||||||
else if (hediff.Severity < 0.40f) icon += "02"; //tight
|
|
||||||
else if (hediff.Severity < 0.47f) icon += "03"; //average
|
|
||||||
else if (hediff.Severity < 0.53f) icon += "04"; //average
|
|
||||||
else if (hediff.Severity < 0.60f) icon += "05"; //average
|
|
||||||
else if (hediff.Severity < 0.70f) icon += "06"; //accomodating
|
|
||||||
else if (hediff.Severity < 0.80f) icon += "07"; //accomodating
|
|
||||||
else if (hediff.Severity < 0.87f) icon += "08"; //cavernous
|
|
||||||
else if (hediff.Severity < 0.94f) icon += "09"; //cavernous
|
|
||||||
else if (hediff.Severity < 1.01f) icon += "10"; //cavernous
|
|
||||||
else icon += "11"; //abyssal
|
|
||||||
|
|
||||||
return ContentFinder<Texture2D>.Get((icon), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Texture2D GetAnalIcon(this Pawn pawn)
|
|
||||||
{
|
|
||||||
var hediff = Genital_Helper.get_PartsHediffList(pawn, Genital_Helper.get_anusBPR(pawn)).FirstOrDefault((Hediff h) => h.def.defName.ToLower().Contains("anus"));
|
|
||||||
if (hediff != null)
|
|
||||||
{
|
|
||||||
CompProperties_Anus Props = (CompProperties_Anus)hediff.TryGetComp<HediffComp_Anus>()?.props;
|
|
||||||
string icon;
|
|
||||||
if (Props != null) icon = Props.analTex ?? "Genitals/Anal";
|
|
||||||
else icon = "Genitals/Anal";
|
|
||||||
if (hediff.Severity < 0.20f) icon += "00"; //micro
|
|
||||||
else if (hediff.Severity < 0.40f) icon += "01"; //tight
|
|
||||||
else if (hediff.Severity < 0.60f) icon += "02"; //average
|
|
||||||
else if (hediff.Severity < 0.80f) icon += "03"; //accomodating
|
|
||||||
else if (hediff.Severity < 1.01f) icon += "04"; //cavernous
|
|
||||||
else icon += "05"; //abyssal
|
|
||||||
|
|
||||||
return ContentFinder<Texture2D>.Get((icon), true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return ContentFinder<Texture2D>.Get(("Genitals/Anal00"), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void DrawBreastIcon(this Pawn pawn, Rect rect , bool drawOrigin = false)
|
public static void DrawBreastIcon(this Pawn pawn, Rect rect , bool drawOrigin = false)
|
||||||
{
|
{
|
||||||
|
@ -501,5 +453,22 @@ namespace RJW_Menstruation
|
||||||
return num * Rand.Range(1.0f - variant, 1.0f + variant);
|
return num * Rand.Range(1.0f - variant, 1.0f + variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool ShouldShowWombGizmo(this Pawn pawn)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Configurations.EnableWombIcon && pawn.gender == Gender.Female)
|
||||||
|
{
|
||||||
|
if (!pawn.IsAnimal())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (Configurations.EnableAnimalCycle)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace RJW_Menstruation.Sexperience
|
||||||
{
|
{
|
||||||
public class GatheredCumMixture : ThingWithComps
|
public class GatheredCumMixture : ThingWithComps
|
||||||
{
|
{
|
||||||
public Color cumColor;
|
public Color cumColor = Color.white;
|
||||||
public List<string> ingredients = new List<string>();
|
public List<string> ingredients = new List<string>();
|
||||||
|
|
||||||
public override Color DrawColor => cumColor;
|
public override Color DrawColor => cumColor;
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
<li>UnlimitedHugs.HugsLib</li>
|
<li>UnlimitedHugs.HugsLib</li>
|
||||||
<li>brrainz.harmony</li>
|
<li>brrainz.harmony</li>
|
||||||
<li>rim.job.world</li>
|
<li>rim.job.world</li>
|
||||||
|
<li>Abraxas.RJW.RaceSupport</li>
|
||||||
|
<li>rjw.milk.humanoid</li>
|
||||||
|
<li>rjw.sexperience</li>
|
||||||
</loadAfter>
|
</loadAfter>
|
||||||
<packageId>rjw.menstruation</packageId>
|
<packageId>rjw.menstruation</packageId>
|
||||||
<description>yes yes</description>
|
<description>yes yes</description>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<identifier>RJW Menstruation</identifier>
|
<identifier>RJW Menstruation</identifier>
|
||||||
<version>1.0.5.4</version>
|
<version>1.0.5.5</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
<loadFolders>
|
<loadFolders>
|
||||||
<v1.2>
|
<v1.2>
|
||||||
<li>1.2</li>
|
<li>1.2</li>
|
||||||
<li IfModActive="Abraxas.RJW.RaceSupport">1.2\RJW Menstruation Race Support</li>
|
<li IfModActive="Abraxas.RJW.RaceSupport">1.2/RJW Menstruation Race Support</li>
|
||||||
<li IfModActive="rjw.milk.humanoid">1.2\MilkModule</li>
|
<li IfModActive="rjw.milk.humanoid">1.2/MilkModule</li>
|
||||||
</v1.2>
|
</v1.2>
|
||||||
<v1.3>
|
<v1.3>
|
||||||
<li>1.3</li>
|
<li>1.3</li>
|
||||||
<li IfModActive="Abraxas.RJW.RaceSupport">1.3\RJW Menstruation Race Support</li>
|
<li IfModActive="Abraxas.RJW.RaceSupport">1.3/RJW Menstruation Race Support</li>
|
||||||
<li IfModActive="rjw.milk.humanoid">1.3\MilkModule</li>
|
<li IfModActive="rjw.milk.humanoid">1.3/MilkModule</li>
|
||||||
<li IfModActive="rjw.sexperience">1.3\SexperienceModule</li>
|
<li IfModActive="rjw.sexperience">1.3/SexperienceModule</li>
|
||||||
</v1.3>
|
</v1.3>
|
||||||
</loadFolders>
|
</loadFolders>
|
|
@ -1,3 +1,9 @@
|
||||||
|
Version 1.0.5.5
|
||||||
|
- clicking vagina and anus image will show origin state
|
||||||
|
- fixed loadfolders.xml for other platforms
|
||||||
|
- added load orders
|
||||||
|
- added stage progress bar
|
||||||
|
|
||||||
Version 1.0.5.4
|
Version 1.0.5.4
|
||||||
- lactating cause nipple morph
|
- lactating cause nipple morph
|
||||||
- clicking breast image will show nipple's origin state(before & after)
|
- clicking breast image will show nipple's origin state(before & after)
|
||||||
|
|
Loading…
Reference in New Issue