Unified Cum-Genes and made them configurable

This commit is contained in:
Vegapnk 2024-07-08 18:54:37 +02:00
parent 7339bd41a1
commit 832c3aa0b8
8 changed files with 66 additions and 90 deletions

View file

@ -34,8 +34,23 @@ namespace RJW_Genes
}
//Get total fluidamount a person has.
public static float GetTotalFluidAmount(Pawn pawn, float multiplier = 1f)
/// <summary>
/// Looks up the "MultiplierExtensions" Value for a given Gene, with a fall back.
/// Returns the fallback if there is no Extension, or if the Multiplier is smaller than 0.
/// </summary>
public static float LookupCumMultiplier(Gene gene, float FALLBACK = 3.0f) => LookupCumMultiplier(gene.def,FALLBACK);
public static float LookupCumMultiplier(GeneDef def, float FALLBACK = 3.0f)
{
MultiplierExtension multiplier = def.GetModExtension<MultiplierExtension>();
if (multiplier == null || multiplier.multiplier < 0)
return FALLBACK;
else return multiplier.multiplier;
}
//Get total fluidamount a person has.
public static float GetTotalFluidAmount(Pawn pawn, float multiplier = 1f)
{
var partBPR = Genital_Helper.get_genitalsBPR(pawn);
var parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);