Class NoOpFacilityStrategy

java.lang.Object
mekhq.campaign.digitalGM.stratCon.NoOpFacilityStrategy
All Implemented Interfaces:
IFacilityStrategy

public class NoOpFacilityStrategy extends Object implements IFacilityStrategy
IFacilityStrategy for play types with no facility map (Mapless and Singles). Every facility operation is a deliberate no-op: Mapless/Singles skip facility placement entirely (see StratConContractInitializer), so there are never any facilities to affect. The periodic no-op also mirrors the legacy engine's if (!isUseStratConMapless) guard.
Since:
0.51.01
  • Constructor Details

    • NoOpFacilityStrategy

      public NoOpFacilityStrategy()
  • Method Details

    • applyPeriodicEffects

      public void applyPeriodicEffects(StratConTrackState track, StratConCampaignState campaignState, boolean isStartOfMonth)
      Description copied from interface: IFacilityStrategy
      Applies the periodic (daily, and where relevant monthly) effects of the facilities on a track.
      Specified by:
      applyPeriodicEffects in interface IFacilityStrategy
      Parameters:
      track - the track whose facilities are processed
      campaignState - the StratCon state for the contract
      isStartOfMonth - true on the first day of the month, when monthly effects also apply
    • updateFacilityForScenario

      public void updateFacilityForScenario(AtBScenario scenario, AtBContract contract, boolean destroy, boolean capture)
      Description copied from interface: IFacilityStrategy
      Updates the facility associated with a resolved scenario, destroying or capturing it as required.
      Specified by:
      updateFacilityForScenario in interface IFacilityStrategy
      Parameters:
      scenario - the resolved scenario
      contract - the contract owning the facility
      destroy - true if the facility should be destroyed
      capture - true if the facility should change hands
    • switchFacilityOwner

      public void switchFacilityOwner(StratConFacility facility)
      Description copied from interface: IFacilityStrategy
      Transfers ownership of a facility to the opposing side (or its captured definition).
      Specified by:
      switchFacilityOwner in interface IFacilityStrategy
      Parameters:
      facility - the facility whose owner changes