GetGenitalSize returns penis size for futa

This commit is contained in:
amevarashi 2024-06-13 21:58:57 +05:00
parent 40af29a193
commit b5f37623b5

View file

@ -61,22 +61,31 @@ namespace RJWSexperience.Ideology
} }
} }
///<summary>
/// If the pawn has multiple genitalia, the "best" is picked (the biggest penis or tightest vagina).
/// For futanari return the biggest penis size
///</summary>
public static float GetGenitalSize(Pawn p) public static float GetGenitalSize(Pawn p)
{ {
if (p == null) if (p == null)
return 0f; return 0f;
// Iff the pawn has multiple genitalia, the "best" is picked (the biggest penis or tightest vagina)
float bestSize = 0f; float bestSize = 0f;
bool foundPenis = false;
foreach (Hediff part in Genital_Helper.get_AllPartsHediffList(p)) foreach (Hediff part in Genital_Helper.get_AllPartsHediffList(p))
{ {
float size; float size;
// Only check for Vaginas and Penises, not for Anus or for things not categorized as primary sexual parts // Only check for Vaginas and Penises, not for Anus or for things not categorized as primary sexual parts
if (Genital_Helper.is_penis(part)) if (Genital_Helper.is_penis(part))
{ {
if (!foundPenis)
{
foundPenis = true;
bestSize = 0f;
}
size = part.Severity; size = part.Severity;
} }
else if (Genital_Helper.is_vagina(part)) else if (!foundPenis && Genital_Helper.is_vagina(part))
{ {
// For vagina, the scale is inverted. // For vagina, the scale is inverted.
size = 1 - part.Severity; size = 1 - part.Severity;