Added an Unbreakable Gene

This commit is contained in:
Vegapnk 2023-01-06 16:23:13 +01:00
parent 75891ca0b3
commit 8e63e69385
6 changed files with 136 additions and 7 deletions

View file

@ -10,8 +10,6 @@ namespace RJW_Genes
/// </summary>
public class Gene_Elasticity : Gene
{
private int ticksToReset = RESET_INTERVAL;
private const int RESET_INTERVAL = 60000; // 60k should be 1 day
public override void PostAdd()
@ -26,11 +24,8 @@ namespace RJW_Genes
public override void Tick()
{
base.Tick();
--this.ticksToReset;
if (this.ticksToReset > 0)
return;
this.ticksToReset = RESET_INTERVAL;
ResetSeverity();
if (pawn.IsHashIntervalTick(RESET_INTERVAL))
ResetSeverity();
}
public override void PostRemove()