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
|
|
|
|
{
|
2023-02-05 10:55:37 +00:00
|
|
|
|
public const float DEFAULT_FERTILIN_PER_UNIT = 1f;
|
|
|
|
|
public float FertilinPerUnit = 1f;
|
2023-01-22 08:06:28 +00:00
|
|
|
|
|
2022-12-29 19:42:39 +00:00
|
|
|
|
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
|
|
|
|
|
{
|
2023-01-22 14:59:00 +00:00
|
|
|
|
if (GeneUtility.HasLifeForce(pawn) && GeneUtility.IsCumEater(pawn))
|
2022-12-29 19:42:39 +00:00
|
|
|
|
{
|
2023-02-05 10:55:37 +00:00
|
|
|
|
float num = ingested.stackCount * this.FertilinPerUnit / 100;
|
2023-01-08 14:51:07 +00:00
|
|
|
|
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(pawn), num);
|
2022-12-29 19:42:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-05 10:55:37 +00:00
|
|
|
|
|
2022-12-29 19:42:39 +00:00
|
|
|
|
}
|
|
|
|
|
}
|