Class PersonnelMarketMekHQ

java.lang.Object
mekhq.campaign.market.personnelMarket.markets.NewPersonnelMarket
mekhq.campaign.market.personnelMarket.markets.PersonnelMarketMekHQ

public class PersonnelMarketMekHQ extends NewPersonnelMarket
Implements MekHQ's custom personnel market system.

This market style provides the classic MekHQ logic for generating and selecting personnel applicants. It introduces several classic-specific behaviors, such as using resource bundles for availability messaging, population multipliers, and custom system status recruitment multipliers.

  • Uses MekHQ’s custom market logic as a selectable option.
  • Determines applicant origins and handles availability messages.
  • Recruitment roll calculations incorporate system population and system status.

Extends: NewPersonnelMarket

Associated Market Style: PersonnelMarketStyle.MEKHQ

Since:
0.50.06
  • Field Details

    • ALTERNATE_ADVANCED_MEDICAL_RECRUITMENT_MULTIPLIER

      public static final int ALTERNATE_ADVANCED_MEDICAL_RECRUITMENT_MULTIPLIER
      See Also:
  • Constructor Details

    • PersonnelMarketMekHQ

      public PersonnelMarketMekHQ()
      Constructs a personnel market using the MekHQ classic ruleset.

      Initializes data and behaviors for compatibility.

      Since:
      0.50.06
  • Method Details

    • setCampaign

      public void setCampaign(Campaign campaign)

      Once the campaign has been attached, the unit reputation recruitment cutoff is refined based on the CampaignOption.USE_CHAOS_REPUTATION campaign option. This can't be done in the constructor because the campaign reference isn't available at that point.

      Overrides:
      setCampaign in class NewPersonnelMarket
      Parameters:
      campaign - Campaign instance that this instance will be attached to and access
      Since:
      0.51.01
    • getApplicantOriginFactions

      public ArrayList<Faction> getApplicantOriginFactions()
      Determines the list of factions from which personnel applicants may originate, according to MekHQ rules and campaign context.
      Overrides:
      getApplicantOriginFactions in class NewPersonnelMarket
      Returns:
      a list of possible applicant origin factions
      Since:
      0.50.06
    • getAvailabilityMessage

      public String getAvailabilityMessage()
      Returns a localized message pertaining to market availability modifiers.
      Overrides:
      getAvailabilityMessage in class NewPersonnelMarket
      Returns:
      an availability message string
      Since:
      0.50.06
    • generateApplicants

      public void generateApplicants()
      Generates market applicants for the current period, factoring in population multipliers and custom system status.
      Overrides:
      generateApplicants in class NewPersonnelMarket
      Since:
      0.50.06
    • getSystemStatusRecruitmentMultiplier

      public int getSystemStatusRecruitmentMultiplier()
      Calculates an additional recruitment multiplier based on system status.
      Returns:
      recruitment multiplier as an int
      Since:
      0.50.06
    • getHiringCost

      public Money getHiringCost(Person applicant)
      Overrides:
      getHiringCost in class NewPersonnelMarket
    • getHiringCostBreakdown

      public HiringCostBreakdown getHiringCostBreakdown(Person applicant)
      Description copied from class: NewPersonnelMarket
      Gets the cost of hiring an applicant, split by part, so the hiring hall can show how it is made up.
      Overrides:
      getHiringCostBreakdown in class NewPersonnelMarket
      Parameters:
      applicant - the applicant
      Returns:
      the hiring cost, by part; its total matches NewPersonnelMarket.getHiringCost(Person)