Package mekhq.campaign.personnel
Class RandomDependents
java.lang.Object
mekhq.campaign.personnel.RandomDependents
The
RandomDependents class manages the random addition and removal of dependent personnel based on the
current campaign state and options.
This class processes dependents, determining if some should be removed or new dependents added, based on predefined campaign rules.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomDependents(Campaign campaign) Constructs a newRandomDependentsinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidProcesses the monthly removal and addition of dependents based on campaign options and capacity.
-
Constructor Details
-
RandomDependents
Constructs a newRandomDependentsinstance.Initializes the dependent management process by calculating the current dependent capacity, randomly removing dependents, and potentially adding new ones.
- Parameters:
campaign- TheCampaigninstance to which dependent operations are applied.
-
-
Method Details
-
processMonthlyRemovalAndAddition
public void processMonthlyRemovalAndAddition()Processes the monthly removal and addition of dependents based on campaign options and capacity.This method manages both the removal and addition of dependents for the campaign within the given constraints. The process consists of two phases:
- Random addition of new dependents, if enabled in campaign options.
- Random removal of dependents, if enabled in campaign options.
-