2022-11-21 16:20:50 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
using rjw;
|
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
|
|
|
|
public class CumUtility
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public static void MultiplyFluidAmountBy(Pawn pawn, float multiplier)
|
|
|
|
|
{
|
|
|
|
|
var partBPR = Genital_Helper.get_genitalsBPR(pawn);
|
|
|
|
|
var parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);
|
|
|
|
|
|
|
|
|
|
if (!parts.NullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
CompHediffBodyPart CompHediff;
|
|
|
|
|
|
|
|
|
|
foreach (Hediff part in parts)
|
|
|
|
|
{
|
|
|
|
|
if (GenitaliaChanger.IsArtificial(part))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (rjw.Genital_Helper.is_penis(part))
|
|
|
|
|
{
|
|
|
|
|
CompHediff = part.TryGetComp<rjw.CompHediffBodyPart>();
|
|
|
|
|
if (CompHediff != null)
|
|
|
|
|
{
|
|
|
|
|
CompHediff.FluidAmmount *= multiplier;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2022-12-27 12:48:38 +00:00
|
|
|
|
|
2022-12-27 13:54:47 +00:00
|
|
|
|
//Get total fluidamount a person has.
|
2022-12-27 12:48:38 +00:00
|
|
|
|
public static float GetTotalFluidAmount(Pawn pawn, float multiplier = 1f)
|
|
|
|
|
{
|
|
|
|
|
var partBPR = Genital_Helper.get_genitalsBPR(pawn);
|
|
|
|
|
var parts = Genital_Helper.get_PartsHediffList(pawn, partBPR);
|
|
|
|
|
float total_cum = 0;
|
|
|
|
|
if (!parts.NullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
CompHediffBodyPart CompHediff;
|
|
|
|
|
|
|
|
|
|
foreach (Hediff part in parts)
|
|
|
|
|
{
|
|
|
|
|
if (GenitaliaChanger.IsArtificial(part))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (rjw.Genital_Helper.is_penis(part))
|
|
|
|
|
{
|
|
|
|
|
CompHediff = part.TryGetComp<rjw.CompHediffBodyPart>();
|
|
|
|
|
if (CompHediff != null)
|
|
|
|
|
{
|
2022-12-31 10:42:00 +00:00
|
|
|
|
total_cum += CompHediff.FluidAmmount * CompHediff.FluidModifier * multiplier;
|
2022-12-27 12:48:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return total_cum;
|
|
|
|
|
|
|
|
|
|
}
|
2022-11-21 16:20:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|