Class LegacyStratConSectorGeneration

java.lang.Object
mekhq.campaign.digitalGM.stratCon.sectorGeneration.LegacyStratConSectorGeneration
All Implemented Interfaces:
ISectorGenerationStrategy

public class LegacyStratConSectorGeneration extends Object implements ISectorGenerationStrategy
The legacy sector generation: the original biome-stripe terrain placer (StratConTerrainPlacer). It places no cities and builds no road network, so connectFacilitiesToRoads(mekhq.campaign.digitalGM.stratCon.StratConTrackState, java.util.Collection<mekhq.campaign.digitalGM.stratCon.StratConCoords>) is a no-op.
Since:
0.51.01
  • Constructor Details

    • LegacyStratConSectorGeneration

      public LegacyStratConSectorGeneration()
  • Method Details

    • initializeTrack

      public void initializeTrack(StratConTrackState track, PlanetProfile planetProfile, LatitudeBand latitudeBand, boolean allowCities)
      Description copied from interface: ISectorGenerationStrategy
      Places terrain onto a freshly-sized track.
      Specified by:
      initializeTrack in interface ISectorGenerationStrategy
      Parameters:
      track - the track to fill (dimensions and temperature already set)
      planetProfile - the destination planet's resolved data
      latitudeBand - the sector's latitude band
      allowCities - true to allow cities to be placed (ignored by strategies that place none)
    • regenerateTrack

      public void regenerateTrack(StratConTrackState track, PlanetProfile planetProfile, LatitudeBand latitudeBand, boolean allowCities)
      Description copied from interface: ISectorGenerationStrategy
      Clears and re-places a track's terrain in place, as used by the GM "Regenerate Sector" tool. The track's dimensions and temperature are kept; scenarios, facilities, and assigned forces are left for the caller to reconcile.
      Specified by:
      regenerateTrack in interface ISectorGenerationStrategy
      Parameters:
      track - the track to regenerate
      planetProfile - the destination planet's resolved data
      latitudeBand - the latitude band to regenerate under
      allowCities - true to allow cities to be placed (ignored by strategies that place none)
    • connectFacilitiesToRoads

      public void connectFacilitiesToRoads(StratConTrackState track, Collection<StratConCoords> facilityCoords)
      Description copied from interface: ISectorGenerationStrategy
      Folds the given facility hexes into the track's road network, so bases belonging to the planet's owner sit on the road grid alongside cities. A strategy that produces no roads (e.g. the legacy placer) does nothing.
      Specified by:
      connectFacilitiesToRoads in interface ISectorGenerationStrategy
      Parameters:
      track - the track whose road network to update
      facilityCoords - the facility hexes to connect