Class NoOpFacilityStrategy
java.lang.Object
mekhq.campaign.digitalGM.stratCon.NoOpFacilityStrategy
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPeriodicEffects(StratConTrackState track, StratConCampaignState campaignState, boolean isStartOfMonth) Applies the periodic (daily, and where relevant monthly) effects of the facilities on a track.voidswitchFacilityOwner(StratConFacility facility) Transfers ownership of a facility to the opposing side (or its captured definition).voidupdateFacilityForScenario(AtBScenario scenario, AtBContract contract, boolean destroy, boolean capture) Updates the facility associated with a resolved scenario, destroying or capturing it as required.
-
Constructor Details
-
NoOpFacilityStrategy
public NoOpFacilityStrategy()
-
-
Method Details
-
applyPeriodicEffects
public void applyPeriodicEffects(StratConTrackState track, StratConCampaignState campaignState, boolean isStartOfMonth) Description copied from interface:IFacilityStrategyApplies the periodic (daily, and where relevant monthly) effects of the facilities on a track.- Specified by:
applyPeriodicEffectsin interfaceIFacilityStrategy- Parameters:
track- the track whose facilities are processedcampaignState- the StratCon state for the contractisStartOfMonth-trueon 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:IFacilityStrategyUpdates the facility associated with a resolved scenario, destroying or capturing it as required.- Specified by:
updateFacilityForScenarioin interfaceIFacilityStrategy- Parameters:
scenario- the resolved scenariocontract- the contract owning the facilitydestroy-trueif the facility should be destroyedcapture-trueif the facility should change hands
-
switchFacilityOwner
Description copied from interface:IFacilityStrategyTransfers ownership of a facility to the opposing side (or its captured definition).- Specified by:
switchFacilityOwnerin interfaceIFacilityStrategy- Parameters:
facility- the facility whose owner changes
-