private int GetBonusesToPay() { int bonusesToPay = 0; for (int i = 0; i < CrewManager.Instance.Kerbals.Count; i++) { CrewMember c = CrewManager.Instance.Kerbals.ElementAt(i).Value; bonusesToPay += c.GetBonus(false); } return(bonusesToPay); }
public int Bonuses(double availableFunding, bool clearBonuses) { int bonus = 0; for (int i = 0; i < Kerbals.Count; i++) { CrewMember c = Kerbals.ElementAt(i).Value; int bonusToProcess = c.GetBonus(clearBonuses); if (clearBonuses && bonusToProcess > 0 && availableFunding < bonusToProcess) { c.AddUnhappiness("not being paid"); } else { bonus += bonusToProcess; } availableFunding -= bonus; } lastBonus = bonus; return(bonus); }