Class ContractAutomation

java.lang.Object
mekhq.campaign.market.contractMarket.ContractAutomation

public class ContractAutomation extends Object
The ContractAutomation class provides a suite of methods used in automating actions when a contract starts. This includes actions like mothballing of units, transit to mission location and the automated activation of units when arriving in system.
  • Constructor Details

    • ContractAutomation

      public ContractAutomation()
  • Method Details

    • contractStartPrompt

      public static void contractStartPrompt(Campaign campaign, Contract contract)
      Main function to initiate a sequence of automated tasks when a contract is started. The tasks include prompt and execution for unit mothballing, calculating and starting the journey to the target system.
      Parameters:
      campaign - The current campaign.
      contract - Selected contract.
    • performAutomatedActivation

      public static void performAutomatedActivation(Campaign campaign)
      Perform automated activation of units. Identifies all units that were mothballed previously and are now needing activation. The activation action is executed for each unit, and they are returned to their prior Force if it still exists.
      Parameters:
      campaign - The current campaign.