public override void Initialize(CompProperties props) { pawn = parent as Pawn; cachedDiscomfort = DiscomfortUtility.CalculateDiscomfort(pawn); /*if (cachedDiscomfort >= 1f) * { * tickWhenUncomfortable = Find.TickManager.TicksGame; * currentlyUncomfortable = true; * }*/ }
public void Refresh() { cachedDiscomfort = DiscomfortUtility.CalculateDiscomfort(pawn); if (currentlyUncomfortable && cachedDiscomfort < 1f) { currentlyUncomfortable = false; } else if (currentlyUncomfortable == false && cachedDiscomfort >= 1f) { currentlyUncomfortable = true; } }