Class UntreatedPersonnelNagLogic

java.lang.Object
mekhq.gui.dialog.nagDialogs.nagLogic.UntreatedPersonnelNagLogic

public class UntreatedPersonnelNagLogic extends Object
  • Constructor Details

    • UntreatedPersonnelNagLogic

      public UntreatedPersonnelNagLogic()
  • Method Details

    • campaignHasUntreatedInjuries

      public static boolean campaignHasUntreatedInjuries(List<Person> activePersonnel, int doctorCapacity)
      Determines whether the campaign has any personnel with untreated injuries.

      This method evaluates the active personnel in the campaign to identify individuals who:

      • Require medical treatment (Person.needsFixing()).
      • Have not been assigned to a doctor (their getDoctorId() is null).

      If any personnel meet these criteria, the method returns true.

      Parameters:
      activePersonnel - A List of active personnel in the campaign.
      Returns:
      true if there are untreated injuries among the personnel, false otherwise.
    • calculateTotalDoctorCapacity

      public static int calculateTotalDoctorCapacity(List<Person> activePersonnel, boolean isDoctorsUseAdministration, int baseBedCount)
      Calculates the total medical capacity of all doctors in the provided list of active personnel.

      This method iterates through the list of active personnel and calculates each individual's medical capacity based on their skills and experience, while optionally factoring in their administrative capabilities. The total capacity is the sum of all individual doctor capacities.

      Parameters:
      activePersonnel - The list of active personnel to evaluate. Only those with the ability to act as doctors are considered in the calculation.
      isDoctorsUseAdministration - A flag determining whether to include each doctor's administrative skills as part of the capacity calculation.
      baseBedCount - The base number of beds or patients a doctor can handle, which serves as the starting capacity for each doctor before adjustments.
      Returns:
      The total medical capacity of the doctors in the provided list, as an integer representing the total number of beds or patients they can collectively manage.