Have TotalFertCum account for destroyed pawns and animals
This commit is contained in:
parent
c393ab45c0
commit
ba8801370f
|
@ -259,7 +259,7 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
public float TotalFertCum
|
public float TotalFertCum
|
||||||
{
|
{
|
||||||
get => cums?.Sum(cum => cum.FertVolume) ?? 0;
|
get => cums?.Where(cum => CumCanFertilize(cum)).Sum(cum => cum.FertVolume) ?? 0;
|
||||||
}
|
}
|
||||||
public float TotalCumPercent
|
public float TotalCumPercent
|
||||||
{
|
{
|
||||||
|
@ -1335,10 +1335,18 @@ namespace RJW_Menstruation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CumCanFertilize(Cum cum)
|
||||||
|
{
|
||||||
|
return !cum.notcum &&
|
||||||
|
cum.FertVolume > 0 &&
|
||||||
|
!(cum.pawn?.Destroyed ?? true) &&
|
||||||
|
(RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(Pawn) == xxx.is_animal(cum.pawn));
|
||||||
|
}
|
||||||
|
|
||||||
protected Pawn Fertilize()
|
protected Pawn Fertilize()
|
||||||
{
|
{
|
||||||
if (cums.NullOrEmpty()) return null;
|
if (cums.NullOrEmpty()) return null;
|
||||||
List<Cum> eligibleCum = cums.FindAll(cum => !cum.notcum && cum.FertVolume > 0 && !(cum.pawn?.Destroyed ?? true) && (RJWPregnancySettings.bestial_pregnancy_enabled || xxx.is_animal(Pawn) == xxx.is_animal(cum.pawn)));
|
List<Cum> eligibleCum = cums.FindAll(cum => CumCanFertilize(cum));
|
||||||
if (eligibleCum.Count == 0) return null;
|
if (eligibleCum.Count == 0) return null;
|
||||||
|
|
||||||
float totalFertPower = eligibleCum.Sum(cum => cum.FertVolume);
|
float totalFertPower = eligibleCum.Sum(cum => cum.FertVolume);
|
||||||
|
|
Loading…
Reference in New Issue