Hardened Fertilin per Ingestion, should help with #39

This commit is contained in:
Vegapnk 2023-06-04 15:46:30 +02:00
parent b9a2466425
commit 5d35102338
1 changed files with 17 additions and 11 deletions

View File

@ -17,12 +17,17 @@ namespace RJW_Genes
public static void OffsetLifeForce(IGeneResourceDrain drain, float offset)
{
if (drain.Resource != null && drain.Resource.Active) {
float old_value = drain.Resource.Value;
drain.Resource.Value += offset;
PostOffSetLifeForce(drain, old_value);
}
}
public static void PostOffSetLifeForce(IGeneResourceDrain drain, float old_value)
{
if (drain.Resource != null && drain.Resource.Active)
{
if (old_value > 0.2f && drain.Resource.Value <= 0.2f)
{
@ -37,6 +42,7 @@ namespace RJW_Genes
}
}
}
}
public static bool HasLowLifeForce(Pawn pawn)