rjw-genes/Source/Genes/Life_Force/IngestionOutcomeDoer_LifeForceOffset.cs

24 lines
650 B
C#
Raw Normal View History

2022-12-29 19:42:39 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RimWorld;
using Verse;
namespace RJW_Genes
{
public class IngestionOutcomeDoer_LifeForceOffset : IngestionOutcomeDoer
{
protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
{
if (GeneUtility.HasLifeForce(pawn) && GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_cum_eater))
2022-12-29 19:42:39 +00:00
{
float num = ingested.stackCount * this.FertilinPerUnit / 100;
GeneUtility.OffsetLifeForce(GeneUtility.GetLifeForceGene(pawn), num);
2022-12-29 19:42:39 +00:00
}
}
public float FertilinPerUnit = 1f;
}
}