2023-01-22 08:06:28 +00:00
|
|
|
|
using RimWorld;
|
2022-12-29 19:42:39 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
2023-01-22 08:06:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This class checks for pawns with LifeForce and Cumeater Gene to add Fertilin when eating cum (the Item from RJW-Sexperience).
|
|
|
|
|
/// </summary>
|
2022-12-29 19:42:39 +00:00
|
|
|
|
public class IngestionOutcomeDoer_LifeForceOffset : IngestionOutcomeDoer
|
2023-01-22 08:06:28 +00:00
|
|
|
|
{
|
|
|
|
|
public const float FERTILIN_PER_UNIT = 1f;
|
|
|
|
|
|
2022-12-29 19:42:39 +00:00
|
|
|
|
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
|
|
|
|
|
{
|
2023-01-17 15:44:08 +00:00
|
|
|
|
if (GeneUtility.HasLifeForce(pawn) && GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_cum_eater))
|
2022-12-29 19:42:39 +00:00
|
|
|
|
{
|
2023-01-22 08:06:28 +00:00
|
|
|
|
float num = ingested.stackCount * FERTILIN_PER_UNIT / 100;
|
2023-01-08 14:51:07 +00:00
|
|
|
|
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(pawn), num);
|
2022-12-29 19:42:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|