Cumeater gene, fertilin craving hediff and thought

hediff and thought are just reflavored hemogen hediffs, in the future could customize them some more
This commit is contained in:
Shabakur 2023-01-17 16:44:08 +01:00
parent 5c0af8a430
commit 49cdc09e5f
22 changed files with 246 additions and 109 deletions

View file

@ -28,16 +28,21 @@ namespace RJW_Genes
{
float old_value = drain.Resource.Value;
drain.Resource.Value += offset;
//PostOffSetLifeForce(drain, old_value);
PostOffSetLifeForce(drain, old_value);
}
public static void PostOffSetLifeForce(IGeneResourceDrain drain, float old_value)
{
if (old_value > 0.2f && drain.Resource.Value <= 0.2f)
{
//Mood debuff
}
else if (old_value > 0f && drain.Resource.Value <= 0f)
{
Pawn pawn = drain.Pawn;
//Do things
if (!drain.Pawn.health.hediffSet.HasHediff(HediffDefOf.rjw_genes_fertilin_craving))
{
drain.Pawn.health.AddHediff(HediffDefOf.rjw_genes_fertilin_craving);
}
}
}