private float GetChangePoints() { if (pawn.IsPrisoner && pawn.IsPrisonerOfColony) { if (pawn.GetRoomGroup() != null) { var value = InspirationTracker.GetInsiprationValue(pawn, true); if (PrisonLaborUtility.LaborEnabled(pawn)) { if (IsPrisonerWorking) { value -= BGP.Laziness_LazyRate; if (HealthAIUtility.ShouldSeekMedicalRest(pawn)) { value -= BGP.Laziness_HealthRate; } if (pawn.needs.food != null) { //warforged value -= (int)pawn.needs.food.CurCategory * BGP.Laziness_HungryRate; } // Some pawns have no rest need (e.g. Pawns with Circadian Half Cycler or androids from other mods) if (pawn.needs.rest != null) { value -= (int)pawn.needs.rest.CurCategory * BGP.Laziness_TiredRate; } } else if (pawn.timetable != null && pawn.timetable.CurrentAssignment == TimeAssignmentDefOf.Joy) { value += BGP.Laziness_JoyRate; } } _GUIChangeArrow = value.CompareTo(0.0f); return(value); } else { _GUIChangeArrow = 0; return(0.0f); } } else { _GUIChangeArrow = 1; return(+0.01f); } }
private float GetChangePoints() { if (pawn.IsPrisoner && pawn.IsPrisonerOfColony) { if (pawn.GetRoomGroup() != null) { var value = InspirationTracker.GetInsiprationValue(pawn, true); if (PrisonLaborUtility.LaborEnabled(pawn)) { if (IsPrisonerWorking) { value -= BGP.Laziness_LazyRate; if (HealthAIUtility.ShouldSeekMedicalRest(pawn)) { value -= BGP.Laziness_HealthRate; } value -= (int)pawn.needs.food.CurCategory * BGP.Laziness_HungryRate; value -= (int)pawn.needs.rest.CurCategory * BGP.Laziness_TiredRate; } else if (pawn.timetable != null && pawn.timetable.CurrentAssignment == TimeAssignmentDefOf.Joy) { value += BGP.Laziness_JoyRate; } } _GUIChangeArrow = value.CompareTo(0.0f); return(value); } else { _GUIChangeArrow = 0; return(0.0f); } } else { _GUIChangeArrow = 1; return(+0.01f); } }