Fix namings

This commit is contained in:
amevarashi 2022-10-14 22:37:55 +05:00
parent 075260f091
commit 92e9569e63
3 changed files with 12 additions and 10 deletions

View File

@ -34,6 +34,7 @@ namespace RJWSexperience.Ideology
}
return finalMultiplier;
}
internal static void ConvertPawnBySex(Pawn pawn, Pawn partner, float severity = 0.01f)
{
// Important Note: This is called on "orgasm" - hence when a pawn has the orgasm he is the "pawn" here.
@ -41,7 +42,9 @@ namespace RJWSexperience.Ideology
// Hence, the Conversion happens from Partner -> Pawn and not the other way round!
// Short Circuit: Either pawn is null, exit early and do nothing
if (pawn == null || partner == null) return;
if (pawn == null || partner == null)
return;
bool sameIdeo = pawn.Ideo == partner.Ideo;
// Option A: Partner has same Ideo as Pawn, increase certainty
if (sameIdeo)
@ -55,28 +58,27 @@ namespace RJWSexperience.Ideology
}
}
public static float getGenitalSize(Pawn p)
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 best_seen_size = 0f;
foreach (Hediff part in rjw.Genital_Helper.get_AllPartsHediffList(p))
float bestSeenSize = 0f;
foreach (Hediff part in Genital_Helper.get_AllPartsHediffList(p))
{
// Only check for Vaginas and Penises, not for Anus or for things not categorized as primary sexual parts
if (Genital_Helper.is_penis(part) || Genital_Helper.is_vagina(part))
{
best_seen_size = part.Severity > best_seen_size ? part.Severity : best_seen_size;
bestSeenSize = part.Severity > bestSeenSize ? part.Severity : bestSeenSize;
}
}
// For Women, the scale is inverted.
if (p.gender == Gender.Female)
return 1 - best_seen_size;
return 1 - bestSeenSize;
return best_seen_size;
return bestSeenSize;
}
}
}

View File

@ -24,7 +24,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
{
if (p != null && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
{
float bestSize = IdeoUtility.getGenitalSize(p);
float bestSize = IdeoUtility.GetGenitalSize(p);
return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));
}
// This might can happen if the pawn has no genitalia ... maybe?

View File

@ -25,7 +25,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
{
if (otherPawn != null && Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
{
float bestSize = IdeoUtility.getGenitalSize(otherPawn);
float bestSize = IdeoUtility.GetGenitalSize(otherPawn);
return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));
}
// This might can happen if the pawn has no genitalia ... maybe?