Class PersonnelMarketMekHQ
java.lang.Object
mekhq.campaign.market.personnelMarket.markets.NewPersonnelMarket
mekhq.campaign.market.personnelMarket.markets.PersonnelMarketMekHQ
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a personnel market using the MekHQ classic ruleset. -
Method Summary
Modifier and TypeMethodDescriptionvoidGenerates market applicants for the current period, factoring in population multipliers and custom system status.Determines the list of factions from which personnel applicants may originate, according to MekHQ rules and campaign context.Returns a localized message pertaining to market availability modifiers.getHiringCost(Person applicant) getHiringCostBreakdown(Person applicant) Gets the cost of hiring an applicant, split by part, so the hiring hall can show how it is made up.intCalculates an additional recruitment multiplier based on system status.voidsetCampaign(Campaign campaign) Methods inherited from class mekhq.campaign.market.personnelMarket.markets.NewPersonnelMarket
addApplicant, addRarePerson, addRareProfession, clearCurrentApplicants, gatherApplications, generatePersonnelMarketDataFromXML, getAssociatedPersonnelMarketStyle, getCampaign, getCampaignFaction, getClanMarketEntries, getCurrentApplicants, getCurrentSystem, getGameYear, getHasRarePersonnel, getInnerSphereMarketEntries, getLastSelectedFilter, getLowPopulationRecruitmentDivider, getMarketEntriesAsList, getRarePersonnel, getRareProfessions, getRecruitmentRolls, getSingleApplicant, getToday, getUnitReputationRecruitmentCutoff, isOfferingGoldenHello, isWasOfferingGoldenHello, sanitizeMarketEntries, setApplicantOriginFactions, setAssociatedPersonnelMarketStyle, setCampaignFaction, setClanMarketEntries, setCurrentApplicants, setCurrentSystem, setGameYear, setHasRarePersonnel, setInnerSphereMarketEntries, setLastSelectedFilter, setLowPopulationRecruitmentDivider, setOfferingGoldenHello, setRecruitmentRolls, setToday, setUnitReputationRecruitmentCutoff, setWasOfferingGoldenHello, showPersonnelMarketDialog, writePersonnelMarketDataToXML
-
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
Once the campaign has been attached, the unit reputation recruitment cutoff is refined based on the
CampaignOption.USE_CHAOS_REPUTATIONcampaign option. This can't be done in the constructor because the campaign reference isn't available at that point.- Overrides:
setCampaignin classNewPersonnelMarket- Parameters:
campaign- Campaign instance that this instance will be attached to and access- Since:
- 0.51.01
-
getApplicantOriginFactions
Determines the list of factions from which personnel applicants may originate, according to MekHQ rules and campaign context.- Overrides:
getApplicantOriginFactionsin classNewPersonnelMarket- Returns:
- a list of possible applicant origin factions
- Since:
- 0.50.06
-
getAvailabilityMessage
Returns a localized message pertaining to market availability modifiers.- Overrides:
getAvailabilityMessagein classNewPersonnelMarket- 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:
generateApplicantsin classNewPersonnelMarket- 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
- Overrides:
getHiringCostin classNewPersonnelMarket
-
getHiringCostBreakdown
Description copied from class:NewPersonnelMarketGets the cost of hiring an applicant, split by part, so the hiring hall can show how it is made up.- Overrides:
getHiringCostBreakdownin classNewPersonnelMarket- Parameters:
applicant- the applicant- Returns:
- the hiring cost, by part; its total matches
NewPersonnelMarket.getHiringCost(Person)
-