mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Compare commits
No commits in common. "28d77ed1fb848ac981013968a3506aae8989a2cb" and "d752bcfed4dc63cc6555abbc96c80d7c480ca64f" have entirely different histories.
28d77ed1fb
...
d752bcfed4
12 changed files with 15 additions and 187 deletions
Binary file not shown.
|
@ -84,13 +84,6 @@
|
|||
</statFactors>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="RJW_Menstruation.CompProperties_Pheromones">
|
||||
<daysToMaxSeverity>0.5</daysToMaxSeverity> <!-- The amount of time spent near someone in estrus for full effect -->
|
||||
<range>6</range>
|
||||
<intensity>1</intensity>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef Name="Hediff_Estrus_Concealed">
|
||||
|
@ -120,52 +113,6 @@
|
|||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef Name="Hediff_AffectedByPheromones">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defName>Hediff_AffectedByPheromones</defName>
|
||||
<label>Affected by pheromones</label>
|
||||
<description>A condition caused by being around someone in estrus. Sex drive and satisfaction is increased by the scent of heat.</description>
|
||||
<defaultLabelColor>(1.00,0.60,0.75)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<tendable>false</tendable>
|
||||
<makesSickThought>false</makesSickThought>
|
||||
<makesAlert>false</makesAlert>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<injuryProps>
|
||||
<canMerge>true</canMerge>
|
||||
</injuryProps>
|
||||
<stages>
|
||||
<li>
|
||||
<label>weak</label>
|
||||
<statFactors>
|
||||
<SexFrequency>1.1</SexFrequency>
|
||||
<SexSatisfaction>1.0</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.4</minSeverity>
|
||||
<label>moderate</label>
|
||||
<statFactors>
|
||||
<SexFrequency>1.4</SexFrequency>
|
||||
<SexSatisfaction>1.1</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.8</minSeverity>
|
||||
<label>strong</label>
|
||||
<statFactors>
|
||||
<SexFrequency>2.0</SexFrequency>
|
||||
<SexSatisfaction>1.2</SexSatisfaction>
|
||||
</statFactors>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_SeverityPerDay">
|
||||
<severityPerDay>-1.0</severityPerDay>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
|
||||
<HediffDef Name="Hediff_PainReliever">
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
|
|
|
@ -74,9 +74,7 @@
|
|||
<Option11_Desc_3>Show only image of a fetus after discovered pregnancy.</Option11_Desc_3>
|
||||
<Option11_Desc_4>Do not show any information about a fetus.</Option11_Desc_4>
|
||||
<Option12_Label>Enable menopause</Option12_Label>
|
||||
<Option12_Desc>Enable menopause effect that makes pawn infertile when they run out of eggs. If you have problems with long lived races, turn off this option.</Option12_Desc>
|
||||
<Option_EnablePheromones_Label>Enable pheromones</Option_EnablePheromones_Label>
|
||||
<Option_EnablePheromones_Desc>Allow humanlikes in visible estrus to increase the sex drive of nearby humanlike males.</Option_EnablePheromones_Desc>
|
||||
<Option12_Desc>Enable menopause effect that makes pawn infertile when they run out of eggs If you have problems with long lived races, turn off this option.</Option12_Desc>
|
||||
<Option13_Label>Use multiple pregnancy</Option13_Label>
|
||||
<Option13_Desc>Use multiple pregnancy instead RJW's default pregnancy Disable this option if you are in trouble with impregnation RJW pregnancy should be turned on.</Option13_Desc>
|
||||
<Option14_Label>Enable hetero ovular twins</Option14_Label>
|
||||
|
|
|
@ -18,9 +18,9 @@ namespace RJW_Menstruation
|
|||
public const float CumFertilityDecayRatioDefault = 0.05f;
|
||||
public const int CumFertilityDecayRatioAdjustDefault = 50;
|
||||
public const int CycleAccelerationDefault = 6;
|
||||
public const int ColonistTickIntervalDefault = GenDate.TicksPerHour;
|
||||
public const int NonColonistTickIntervalDefault = GenDate.TicksPerHour;
|
||||
public const int AnimalTickIntervalDefault = GenDate.TicksPerHour;
|
||||
public const int ColonistTickIntervalDefault = 2500; // 1 hour
|
||||
public const int NonColonistTickIntervalDefault = 2500;
|
||||
public const int AnimalTickIntervalDefault = 2500;
|
||||
public const int TickIntervalMinimum = 20;
|
||||
public const float EnzygoticTwinsChanceDefault = 0.002f;
|
||||
public const int EnzygoticTwinsChanceAdjustDefault = 2;
|
||||
|
@ -57,7 +57,6 @@ namespace RJW_Menstruation
|
|||
public static bool DrawEggOverlay = true;
|
||||
public static bool Debug = false;
|
||||
public static bool EnableMenopause = true;
|
||||
public static bool EnablePheromones = true;
|
||||
public static DetailLevel InfoDetail => infoDetail;
|
||||
public static bool EstrusOverridesHookupSettings = false;
|
||||
public static float EstrusFuckabilityToHookup = RJWHookupSettings.MinimumFuckabilityToHookup;
|
||||
|
@ -75,6 +74,7 @@ namespace RJW_Menstruation
|
|||
public static bool EnableGatherCumGizmo = true;
|
||||
public static PawnFlags ShowFlag = PawnFlags.Colonist | PawnFlags.Prisoner;
|
||||
public static bool UseHybridExtention = true;
|
||||
public static bool MotherFirst = false;
|
||||
public static bool AllowShrinkIcon = false;
|
||||
public static float EggLifespanMultiplier = EggLifespanMultiplierDefault;
|
||||
public static bool EnableBirthVaginaMorph = false;
|
||||
|
@ -92,8 +92,6 @@ namespace RJW_Menstruation
|
|||
EnableDraftedIcon = true;
|
||||
EnableGatherCumGizmo = true;
|
||||
EnableAnimalCycle = false;
|
||||
EnableMenopause = true;
|
||||
EnablePheromones = true;
|
||||
CycleAcceleration = CycleAccelerationDefault;
|
||||
ColonistTickInterval = ColonistTickIntervalDefault;
|
||||
NonColonistTickInterval = NonColonistTickIntervalDefault;
|
||||
|
@ -109,6 +107,7 @@ namespace RJW_Menstruation
|
|||
PregnancySource = PregnancyType.MultiplePregnancy;
|
||||
MaxEnzygoticTwins = MaxEnzygoticTwinsDefault;
|
||||
BleedingAmount = BleedingAmountDefault;
|
||||
MotherFirst = false;
|
||||
MaxBreastIncrementFactor = MaxBreastIncrementFactorDefault;
|
||||
MaxNippleIncrementFactor= MaxNippleIncrementFactorDefault;
|
||||
PermanentNippleChange = PermanentNippleChangeDefault;
|
||||
|
@ -212,7 +211,6 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref Debug, "Debug", false);
|
||||
Scribe_Values.Look(ref infoDetail, "InfoDetail", DetailLevel.All);
|
||||
Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", true);
|
||||
Scribe_Values.Look(ref EnablePheromones, "EnablePheromones", true);
|
||||
Scribe_Values.Look(ref EstrusOverridesHookupSettings, "EstrusOverridesHookupSettings", false);
|
||||
Scribe_Values.Look(ref EstrusFuckabilityToHookup, "EstrusFuckabilityToHookup", EstrusFuckabilityToHookup, true);
|
||||
Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true);
|
||||
|
@ -229,6 +227,7 @@ namespace RJW_Menstruation
|
|||
Scribe_Values.Look(ref EnableGatherCumGizmo, "EnableGatherCumGizmo", true);
|
||||
Scribe_Values.Look(ref ShowFlag, "ShowFlag", PawnFlags.Colonist | PawnFlags.Prisoner);
|
||||
Scribe_Values.Look(ref UseHybridExtention, "UseHybridExtention", true);
|
||||
Scribe_Values.Look(ref MotherFirst, "MotherFirst", false);
|
||||
Scribe_Values.Look(ref MaxBreastIncrementFactor, "MaxBreastIncrementFactor", MaxBreastIncrementFactorDefault);
|
||||
Scribe_Values.Look(ref MaxNippleIncrementFactor, "MaxNippleIncrementFactor", MaxNippleIncrementFactorDefault);
|
||||
Scribe_Values.Look(ref PermanentNippleChange, "PermanentNippleChange", PermanentNippleChangeDefault);
|
||||
|
@ -394,8 +393,6 @@ namespace RJW_Menstruation
|
|||
|
||||
listmain.CheckboxLabeled(Translations.Option12_Label, ref Configurations.EnableMenopause, Translations.Option12_Desc);
|
||||
|
||||
listmain.CheckboxLabeled(Translations.Option_EnablePheromones_Label, ref Configurations.EnablePheromones, Translations.Option_EnablePheromones_Desc);
|
||||
|
||||
listmain.Label(Translations.Option3_Label + " " + Configurations.ImplantationChance * 100 + "%", -1, Translations.Option3_Desc);
|
||||
Configurations.ImplantationChanceAdjust = (int)listmain.Slider(Configurations.ImplantationChanceAdjust, 0, 1000);
|
||||
Configurations.ImplantationChance = (float)Configurations.ImplantationChanceAdjust / 100;
|
||||
|
|
|
@ -1524,8 +1524,8 @@ namespace RJW_Menstruation
|
|||
/// <param name="amount"></param>
|
||||
protected void MakeCumFilth(Cum cum, float amount)
|
||||
{
|
||||
if (Pawn.MapHeld == null) return;
|
||||
if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(Pawn.PositionHeld, Pawn.MapHeld, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown");
|
||||
if (Pawn.Map == null) return;
|
||||
if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(Pawn.Position, Pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1563,10 +1563,10 @@ namespace RJW_Menstruation
|
|||
|
||||
protected float MakeCumFilthMixture(float amount, List<string> cumlabels)
|
||||
{
|
||||
if (Pawn.MapHeld == null) return 0;
|
||||
if (Pawn.Map == null) return 0;
|
||||
if (amount >= minmakefilthvalue)
|
||||
{
|
||||
FilthMaker_Colored.TryMakeFilth(Pawn.PositionHeld, Pawn.MapHeld, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false);
|
||||
FilthMaker_Colored.TryMakeFilth(Pawn.Position, Pawn.Map, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false);
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
|
|
@ -77,13 +77,6 @@ namespace RJW_Menstruation
|
|||
else return base.TicksToNextStage();
|
||||
}
|
||||
|
||||
protected override void LutealAction()
|
||||
{
|
||||
base.LutealAction();
|
||||
if (curStage == Stage.Follicular)
|
||||
GoNextStage(Stage.Anestrus);
|
||||
}
|
||||
|
||||
protected override void BleedingAction()
|
||||
{
|
||||
base.BleedingAction();
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
|
||||
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Menstruation
|
||||
{
|
||||
public class CompProperties_Pheromones : HediffCompProperties
|
||||
{
|
||||
public float daysToMaxSeverity;
|
||||
public float range;
|
||||
public float intensity = 1.0f;
|
||||
|
||||
public CompProperties_Pheromones()
|
||||
{
|
||||
compClass = typeof(HediffComp_Pheromones);
|
||||
}
|
||||
}
|
||||
|
||||
public class HediffComp_Pheromones : HediffComp
|
||||
{
|
||||
public CompProperties_Pheromones Props => (CompProperties_Pheromones)props;
|
||||
public const int emitInterval = GenTicks.TickRareInterval;
|
||||
public float emitRatio => (float)emitInterval / GenDate.TicksPerDay;
|
||||
|
||||
public override void CompPostTick(ref float severityAdjustment)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Configurations.EnablePheromones) return;
|
||||
if (!Pawn.RaceProps.Humanlike) return;
|
||||
if (!Pawn.IsHashIntervalTick(emitInterval)) return;
|
||||
if (!Pawn.SpawnedOrAnyParentSpawned) return;
|
||||
|
||||
foreach (Pawn pawn in AffectedPawns())
|
||||
ApplyEffectToPawn(pawn);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error($"Error when trying to emit pheromones: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
protected IEnumerable<Pawn> AffectedPawns()
|
||||
{
|
||||
Map mapHeld = Pawn.MapHeld;
|
||||
if (mapHeld == null) yield break;
|
||||
foreach (Pawn pawn in mapHeld.mapPawns.AllPawnsSpawned)
|
||||
{
|
||||
if (pawn == Pawn) continue;
|
||||
if (!pawn.RaceProps.Humanlike) continue;
|
||||
if (Pawn.PositionHeld.InHorDistOf(pawn.PositionHeld, Props.range) && Pawn.GetRoom() == pawn.GetRoom())
|
||||
yield return pawn;
|
||||
}
|
||||
}
|
||||
|
||||
protected float GetEffectOnPawn(Pawn target)
|
||||
{
|
||||
if (target.Suspended || target.Dead) return 0.0f;
|
||||
if (target.needs?.TryGetNeed(VariousDefOf.SexNeed) == null) return 0.0f;
|
||||
if (!xxx.can_do_loving(target)) return 0.0f;
|
||||
if (target.story?.traits.HasTrait(TraitDefOf.Asexual) ?? true) return 0.0f;
|
||||
float penisEffect;
|
||||
if (Genital_Helper.has_penis_fertile(target)) penisEffect = 1.0f;
|
||||
else if (target.gender == Gender.Male) penisEffect = 0.25f;
|
||||
else return 0.0f;
|
||||
|
||||
BodyDef body = target.RaceProps.body;
|
||||
if (!PawnCapacityUtility.BodyCanEverDoCapacity(body, PawnCapacityDefOf.Breathing)) return 0.0f;
|
||||
HediffSet hediffs = target.health.hediffSet;
|
||||
float breathingEffect = PawnCapacityUtility.CalculateCapacityLevel(hediffs, PawnCapacityDefOf.Breathing);
|
||||
float noseEffect = 1.0f;
|
||||
List<BodyPartRecord> noses = body.GetPartsWithDef(BodyPartDefOf.Nose);
|
||||
if (noses.Any()) // if the body doesn't have a nose but still breathes, then let it be affected
|
||||
noseEffect = noses.Average(nose => PawnCapacityUtility.CalculatePartEfficiency(hediffs, nose));
|
||||
|
||||
return penisEffect * breathingEffect * noseEffect;
|
||||
}
|
||||
|
||||
protected void ApplyEffectToPawn(Pawn target)
|
||||
{
|
||||
float intensity = Props.intensity * GetEffectOnPawn(target);
|
||||
if (intensity <= 0.0f) return;
|
||||
Hediff pheromones = target.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_AffectedByPheromones);
|
||||
float decay = VariousDefOf.Hediff_AffectedByPheromones.CompProps<HediffCompProperties_SeverityPerDay>().severityPerDay;
|
||||
float raiseSeverityPerDay = intensity / Props.daysToMaxSeverity - decay; // Desired increase plus enough to overcome pheromone decay
|
||||
float amountToApply = emitRatio * raiseSeverityPerDay;
|
||||
if (pheromones != null)
|
||||
pheromones.Severity += amountToApply;
|
||||
else
|
||||
{
|
||||
pheromones = HediffMaker.MakeHediff(VariousDefOf.Hediff_AffectedByPheromones, target);
|
||||
pheromones.Severity = amountToApply;
|
||||
target.health.AddHediff(pheromones);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -69,7 +69,6 @@
|
|||
<Compile Include="EstrusPartKindUsageRule.cs" />
|
||||
<Compile Include="HediffComps\HediffComp_InducedOvulator.cs" />
|
||||
<Compile Include="HediffComps\HediffComp_PeriodicOvulator.cs" />
|
||||
<Compile Include="HediffComps\HediffComp_Pheromones.cs" />
|
||||
<Compile Include="HediffComps\HediffComp_PregeneratedBabies.cs" />
|
||||
<Compile Include="HediffComps\MenstruationUtility.cs" />
|
||||
<Compile Include="Hediff_Estrus.cs" />
|
||||
|
|
|
@ -79,8 +79,6 @@ namespace RJW_Menstruation
|
|||
public static readonly string Option11_Desc_4 = "Option11_Desc_4".Translate();
|
||||
public static readonly string Option12_Label = "Option12_Label".Translate();
|
||||
public static readonly string Option12_Desc = "Option12_Desc".Translate();
|
||||
public static readonly string Option_EnablePheromones_Label = "Option_EnablePheromones_Label".Translate();
|
||||
public static readonly string Option_EnablePheromones_Desc = "Option_EnablePheromones_Desc".Translate();
|
||||
public static readonly string Option13_Label = "Option13_Label".Translate();
|
||||
public static readonly string Option13_Desc = "Option13_Desc".Translate();
|
||||
public static readonly string Option14_Label = "Option14_Label".Translate();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using RimWorld;
|
||||
using rjw;
|
||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules.Implementation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Verse;
|
||||
|
@ -18,7 +20,6 @@ namespace RJW_Menstruation
|
|||
public static readonly HediffDef Hediff_MenstrualCramp = DefDatabase<HediffDef>.GetNamed("Hediff_MenstrualCramp");
|
||||
public static readonly HediffDef Hediff_Estrus = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus");
|
||||
public static readonly HediffDef Hediff_Estrus_Concealed = DefDatabase<HediffDef>.GetNamed("Hediff_Estrus_Concealed");
|
||||
public static readonly HediffDef Hediff_AffectedByPheromones = DefDatabase<HediffDef>.GetNamed("Hediff_AffectedByPheromones");
|
||||
public static readonly HediffDef Hediff_ASA = DefDatabase<HediffDef>.GetNamed("Hediff_ASA");
|
||||
public static readonly StatDef MaxAbsorbable = DefDatabase<StatDef>.GetNamed("MaxAbsorbable");
|
||||
public static readonly NeedDef SexNeed = DefDatabase<NeedDef>.GetNamed("Sex");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<Manifest>
|
||||
<identifier>RJW Menstruation</identifier>
|
||||
<version>1.0.9.1</version>
|
||||
<version>1.0.9.0</version>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<incompatibleWith />
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
Version 1.0.9.1
|
||||
- Add new ideology-related thoughts with the sexperience-ideology mod.
|
||||
- New pheromone system: Pawns in visible estrus will increase the sex drive of nearby males. Can be disabled in the options.
|
||||
- Using the egg restoration biosculptor cycle will give a small mood buff.
|
||||
- Periodic ovulators that don't bleed will properly enter anestrus after their luteal stage.
|
||||
|
||||
Version 1.0.9.0
|
||||
- Fix errors when opening the womb dialog of some low fertility pawns.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue