mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Hardened Fertilin per Ingestion, should help with #39
This commit is contained in:
parent
b9a2466425
commit
5d35102338
1 changed files with 17 additions and 11 deletions
|
@ -17,12 +17,17 @@ namespace RJW_Genes
|
||||||
|
|
||||||
public static void OffsetLifeForce(IGeneResourceDrain drain, float offset)
|
public static void OffsetLifeForce(IGeneResourceDrain drain, float offset)
|
||||||
{
|
{
|
||||||
|
if (drain.Resource != null && drain.Resource.Active) {
|
||||||
float old_value = drain.Resource.Value;
|
float old_value = drain.Resource.Value;
|
||||||
drain.Resource.Value += offset;
|
drain.Resource.Value += offset;
|
||||||
PostOffSetLifeForce(drain, old_value);
|
PostOffSetLifeForce(drain, old_value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void PostOffSetLifeForce(IGeneResourceDrain drain, float 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)
|
if (old_value > 0.2f && drain.Resource.Value <= 0.2f)
|
||||||
{
|
{
|
||||||
|
@ -37,6 +42,7 @@ namespace RJW_Genes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static bool HasLowLifeForce(Pawn pawn)
|
public static bool HasLowLifeForce(Pawn pawn)
|
||||||
|
|
Loading…
Reference in a new issue