Interface IFacilityStrategy

All Known Implementing Classes:
NoOpFacilityStrategy, StratConFacilityStrategy

public interface IFacilityStrategy
Strategy for map facilities — applying their periodic effects, updating them when a scenario resolves, and transferring ownership. Mapless (and, by extension, Singles) play has no facility map at all, so its implementation is a no-op; the legacy engine gated the periodic call behind if (!isUseStratConMapless) and skipped facility placement entirely, so the remaining operations are already inert there.

The method signatures mirror the corresponding static entry points on StratConRulesManager; the default StratCon implementation delegates to them, so the rules themselves are unchanged.

Since:
0.51.01
  • Method Details

    • applyPeriodicEffects

      void applyPeriodicEffects(StratConTrackState track, StratConCampaignState campaignState, boolean isStartOfMonth)
      Applies the periodic (daily, and where relevant monthly) effects of the facilities on a track.
      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

      void updateFacilityForScenario(AtBScenario scenario, AtBContract contract, boolean destroy, boolean capture)
      Updates the facility associated with a resolved scenario, destroying or capturing it as required.
      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

      void switchFacilityOwner(StratConFacility facility)
      Transfers ownership of a facility to the opposing side (or its captured definition).
      Parameters:
      facility - the facility whose owner changes