From b5f37623b57aaad66f777209ace9afefbbd73231 Mon Sep 17 00:00:00 2001 From: amevarashi Date: Thu, 13 Jun 2024 21:58:57 +0500 Subject: [PATCH] GetGenitalSize returns penis size for futa --- Source/IdeologyAddon/IdeoUtility.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/IdeologyAddon/IdeoUtility.cs b/Source/IdeologyAddon/IdeoUtility.cs index e61eb54..c103729 100644 --- a/Source/IdeologyAddon/IdeoUtility.cs +++ b/Source/IdeologyAddon/IdeoUtility.cs @@ -61,22 +61,31 @@ namespace RJWSexperience.Ideology } } + /// + /// If the pawn has multiple genitalia, the "best" is picked (the biggest penis or tightest vagina). + /// For futanari return the biggest penis size + /// public static float GetGenitalSize(Pawn p) { if (p == null) return 0f; - // Iff the pawn has multiple genitalia, the "best" is picked (the biggest penis or tightest vagina) float bestSize = 0f; + bool foundPenis = false; foreach (Hediff part in Genital_Helper.get_AllPartsHediffList(p)) { float size; // 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 (!foundPenis) + { + foundPenis = true; + bestSize = 0f; + } size = part.Severity; } - else if (Genital_Helper.is_vagina(part)) + else if (!foundPenis && Genital_Helper.is_vagina(part)) { // For vagina, the scale is inverted. size = 1 - part.Severity;