mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Add animal pheromone slider to affect humanlikes
This commit is contained in:
parent
55b94d9d58
commit
bd19a8c2ca
5 changed files with 18 additions and 1 deletions
Binary file not shown.
|
@ -77,6 +77,8 @@
|
||||||
<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>
|
<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_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>
|
<Option_EnablePheromones_Desc>Allow humanlikes in visible estrus to increase the sex drive of nearby humanlike males.</Option_EnablePheromones_Desc>
|
||||||
|
<Option_AnimalPheromoneEffect_Label>Animal pheromone effect</Option_AnimalPheromoneEffect_Label>
|
||||||
|
<Option_AnimalPheromoneEffect_Desc>Set the effect that animals in visible estrus have on humanlikes.</Option_AnimalPheromoneEffect_Desc>
|
||||||
<Option13_Label>Use multiple pregnancy</Option13_Label>
|
<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>
|
<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>
|
<Option14_Label>Enable hetero ovular twins</Option14_Label>
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace RJW_Menstruation
|
||||||
public static bool Debug = false;
|
public static bool Debug = false;
|
||||||
public static bool EnableMenopause = true;
|
public static bool EnableMenopause = true;
|
||||||
public static bool EnablePheromones = true;
|
public static bool EnablePheromones = true;
|
||||||
|
public static float AnimalPheromoneEffect = 0.0f;
|
||||||
public static DetailLevel InfoDetail => infoDetail;
|
public static DetailLevel InfoDetail => infoDetail;
|
||||||
public static bool EstrusOverridesHookupSettings = false;
|
public static bool EstrusOverridesHookupSettings = false;
|
||||||
public static float EstrusFuckabilityToHookup = RJWHookupSettings.MinimumFuckabilityToHookup;
|
public static float EstrusFuckabilityToHookup = RJWHookupSettings.MinimumFuckabilityToHookup;
|
||||||
|
@ -95,6 +96,7 @@ namespace RJW_Menstruation
|
||||||
EnableAnimalCycle = false;
|
EnableAnimalCycle = false;
|
||||||
EnableMenopause = true;
|
EnableMenopause = true;
|
||||||
EnablePheromones = true;
|
EnablePheromones = true;
|
||||||
|
AnimalPheromoneEffect = 0.0f;
|
||||||
CycleAcceleration = CycleAccelerationDefault;
|
CycleAcceleration = CycleAccelerationDefault;
|
||||||
ColonistTickInterval = ColonistTickIntervalDefault;
|
ColonistTickInterval = ColonistTickIntervalDefault;
|
||||||
NonColonistTickInterval = NonColonistTickIntervalDefault;
|
NonColonistTickInterval = NonColonistTickIntervalDefault;
|
||||||
|
@ -214,6 +216,7 @@ namespace RJW_Menstruation
|
||||||
Scribe_Values.Look(ref infoDetail, "InfoDetail", DetailLevel.All);
|
Scribe_Values.Look(ref infoDetail, "InfoDetail", DetailLevel.All);
|
||||||
Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", true);
|
Scribe_Values.Look(ref EnableMenopause, "EnableMenopause", true);
|
||||||
Scribe_Values.Look(ref EnablePheromones, "EnablePheromones", true);
|
Scribe_Values.Look(ref EnablePheromones, "EnablePheromones", true);
|
||||||
|
Scribe_Values.Look(ref AnimalPheromoneEffect, "AnimalPheromoneEffect", 0.0f);
|
||||||
Scribe_Values.Look(ref EstrusOverridesHookupSettings, "EstrusOverridesHookupSettings", false);
|
Scribe_Values.Look(ref EstrusOverridesHookupSettings, "EstrusOverridesHookupSettings", false);
|
||||||
Scribe_Values.Look(ref EstrusFuckabilityToHookup, "EstrusFuckabilityToHookup", EstrusFuckabilityToHookup, true);
|
Scribe_Values.Look(ref EstrusFuckabilityToHookup, "EstrusFuckabilityToHookup", EstrusFuckabilityToHookup, true);
|
||||||
Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true);
|
Scribe_Values.Look(ref EstrusAttractivenessToHookup, "EstrusAttractivenessToHookup", EstrusAttractivenessToHookup, true);
|
||||||
|
@ -293,6 +296,7 @@ namespace RJW_Menstruation
|
||||||
float mainRectHeight = 126f +
|
float mainRectHeight = 126f +
|
||||||
(Configurations.EnableWombIcon || Configurations.EnableButtonInHT ? 400f : 0f) +
|
(Configurations.EnableWombIcon || Configurations.EnableButtonInHT ? 400f : 0f) +
|
||||||
(Configurations.EnableAnimalCycle ? 48f : 0f) +
|
(Configurations.EnableAnimalCycle ? 48f : 0f) +
|
||||||
|
(Configurations.EnableAnimalCycle && Configurations.EnablePheromones ? 48f : 0f) +
|
||||||
(Configurations.EstrusOverridesHookupSettings ? 144f : 0f) +
|
(Configurations.EstrusOverridesHookupSettings ? 144f : 0f) +
|
||||||
(Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy ? (Configurations.EnableEnzygoticTwins ? 175f : 75f) : 0f) +
|
(Configurations.PregnancySource == Configurations.PregnancyType.MultiplePregnancy ? (Configurations.EnableEnzygoticTwins ? 175f : 75f) : 0f) +
|
||||||
(Configurations.PregnancySource == Configurations.PregnancyType.Biotech ? 75f : 0f) +
|
(Configurations.PregnancySource == Configurations.PregnancyType.Biotech ? 75f : 0f) +
|
||||||
|
@ -396,6 +400,14 @@ namespace RJW_Menstruation
|
||||||
listmain.CheckboxLabeled(Translations.Option12_Label, ref Configurations.EnableMenopause, Translations.Option12_Desc);
|
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.CheckboxLabeled(Translations.Option_EnablePheromones_Label, ref Configurations.EnablePheromones, Translations.Option_EnablePheromones_Desc);
|
||||||
|
if (Configurations.EnablePheromones && Configurations.EnableAnimalCycle)
|
||||||
|
{
|
||||||
|
Adjust = (int)(Configurations.AnimalPheromoneEffect * 1000);
|
||||||
|
listmain.Label(Translations.Option_AnimalPheromoneEffect_Label + " " + Configurations.AnimalPheromoneEffect * 100 + "%", -1, Translations.Option_AnimalPheromoneEffect_Desc);
|
||||||
|
Adjust = (int)listmain.Slider(Adjust, 0, 1000);
|
||||||
|
Configurations.AnimalPheromoneEffect = (float)Adjust / 1000f;
|
||||||
|
}
|
||||||
|
else Configurations.AnimalPheromoneEffect = 0.0f;
|
||||||
|
|
||||||
listmain.Label(Translations.Option3_Label + " " + Configurations.ImplantationChance * 100 + "%", -1, Translations.Option3_Desc);
|
listmain.Label(Translations.Option3_Label + " " + Configurations.ImplantationChance * 100 + "%", -1, Translations.Option3_Desc);
|
||||||
Configurations.ImplantationChanceAdjust = (int)listmain.Slider(Configurations.ImplantationChanceAdjust, 0, 1000);
|
Configurations.ImplantationChanceAdjust = (int)listmain.Slider(Configurations.ImplantationChanceAdjust, 0, 1000);
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace RJW_Menstruation
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!Configurations.EnablePheromones) return;
|
if (!Configurations.EnablePheromones) return;
|
||||||
if (!Pawn.RaceProps.Humanlike) return;
|
if (!Pawn.RaceProps.Humanlike && (!Configurations.EnableAnimalCycle || Configurations.AnimalPheromoneEffect <= 0.0f)) return;
|
||||||
if (!Pawn.IsHashIntervalTick(emitInterval)) return;
|
if (!Pawn.IsHashIntervalTick(emitInterval)) return;
|
||||||
if (!Pawn.SpawnedOrAnyParentSpawned) return;
|
if (!Pawn.SpawnedOrAnyParentSpawned) return;
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ namespace RJW_Menstruation
|
||||||
Hediff pheromones = target.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_AffectedByPheromones);
|
Hediff pheromones = target.health.hediffSet.GetFirstHediffOfDef(VariousDefOf.Hediff_AffectedByPheromones);
|
||||||
float decay = VariousDefOf.Hediff_AffectedByPheromones.CompProps<HediffCompProperties_SeverityPerDay>().severityPerDay;
|
float decay = VariousDefOf.Hediff_AffectedByPheromones.CompProps<HediffCompProperties_SeverityPerDay>().severityPerDay;
|
||||||
float raiseSeverityPerDay = intensity / Props.daysToMaxSeverity - decay; // Desired increase plus enough to overcome pheromone decay
|
float raiseSeverityPerDay = intensity / Props.daysToMaxSeverity - decay; // Desired increase plus enough to overcome pheromone decay
|
||||||
|
if (!Pawn.RaceProps.Humanlike) raiseSeverityPerDay *= Configurations.AnimalPheromoneEffect;
|
||||||
float amountToApply = emitRatio * raiseSeverityPerDay;
|
float amountToApply = emitRatio * raiseSeverityPerDay;
|
||||||
if (pheromones != null)
|
if (pheromones != null)
|
||||||
pheromones.Severity += amountToApply;
|
pheromones.Severity += amountToApply;
|
||||||
|
|
|
@ -81,6 +81,8 @@ namespace RJW_Menstruation
|
||||||
public static readonly string Option12_Desc = "Option12_Desc".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_Label = "Option_EnablePheromones_Label".Translate();
|
||||||
public static readonly string Option_EnablePheromones_Desc = "Option_EnablePheromones_Desc".Translate();
|
public static readonly string Option_EnablePheromones_Desc = "Option_EnablePheromones_Desc".Translate();
|
||||||
|
public static readonly string Option_AnimalPheromoneEffect_Label = "Option_AnimalPheromoneEffect_Label".Translate();
|
||||||
|
public static readonly string Option_AnimalPheromoneEffect_Desc = "Option_AnimalPheromoneEffect_Desc".Translate();
|
||||||
public static readonly string Option13_Label = "Option13_Label".Translate();
|
public static readonly string Option13_Label = "Option13_Label".Translate();
|
||||||
public static readonly string Option13_Desc = "Option13_Desc".Translate();
|
public static readonly string Option13_Desc = "Option13_Desc".Translate();
|
||||||
public static readonly string Option14_Label = "Option14_Label".Translate();
|
public static readonly string Option14_Label = "Option14_Label".Translate();
|
||||||
|
|
Loading…
Reference in a new issue