Change the egg health modifiers to properties

This commit is contained in:
lutepickle 2022-09-11 16:17:39 -07:00
parent af82bad406
commit 34aa9f0c3d
2 changed files with 29 additions and 20 deletions

View file

@ -203,28 +203,37 @@ namespace RJW_Menstruation
}
}
public float SexFrequencyModifier()
public float SexFrequencyModifier
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.01f;
else return SexFrequencyCurve.Evaluate(eggHealth);
get
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.01f;
else return SexFrequencyCurve.Evaluate(eggHealth);
}
}
public float SexSatisfactionModifier()
public float SexSatisfactionModifier
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.5f;
else return SexSatisfactionCurve.Evaluate(eggHealth);
get
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.5f;
else return SexSatisfactionCurve.Evaluate(eggHealth);
}
}
public float FertilityModifier()
public float FertilityModifier
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.0f;
else return FertilityCurve.Evaluate(eggHealth);
get
{
float eggHealth = EggHealth;
if (eggHealth >= 1) return 1.0f;
else if (eggHealth <= 0) return 0.0f;
else return FertilityCurve.Evaluate(eggHealth);
}
}
public float TotalCum
@ -274,7 +283,7 @@ namespace RJW_Menstruation
{
float factor = 1.0f;
if (Pawn.Has(Quirk.Breeder)) factor = 10.0f;
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier() * factor;
return Pawn.health.capacities.GetLevel(xxx.reproduction) * Props.baseImplantationChanceFactor * FertilityModifier * factor;
}
}
public IEnumerable<string> GetCumsInfo

View file

@ -60,7 +60,7 @@ namespace RJW_Menstruation
{
protected override float GetFactor(Pawn pawn)
{
return AllComps(pawn).Average(comp => comp.SexFrequencyModifier());
return AllComps(pawn).Average(comp => comp.SexFrequencyModifier);
}
}
@ -68,7 +68,7 @@ namespace RJW_Menstruation
{
protected override float GetFactor(Pawn pawn)
{
return AllComps(pawn).Average(comp => comp.SexSatisfactionModifier());
return AllComps(pawn).Average(comp => comp.SexSatisfactionModifier);
}
}
@ -76,7 +76,7 @@ namespace RJW_Menstruation
{
protected override float GetFactor(Pawn pawn)
{
return AllComps(pawn).Average(comp => comp.SexFrequencyModifier());
return AllComps(pawn).Average(comp => comp.SexFrequencyModifier);
}
}
@ -84,7 +84,7 @@ namespace RJW_Menstruation
{
protected override float GetFactor(Pawn pawn)
{
return AllComps(pawn).Average(comp => comp.SexSatisfactionModifier());
return AllComps(pawn).Average(comp => comp.SexSatisfactionModifier);
}
}
}