mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Unified Cum-Genes and made them configurable
This commit is contained in:
parent
7339bd41a1
commit
832c3aa0b8
8 changed files with 66 additions and 90 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue