diff --git a/.gitignore b/.gitignore index 9f22b322..5e953c36 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ a.py resources/tools/a.miz # User-specific stuff .idea/ +.env /kneeboards /liberation_preferences.json diff --git a/game/theater/conflicttheater.py b/game/theater/conflicttheater.py index 80194189..16a8a0b0 100644 --- a/game/theater/conflicttheater.py +++ b/game/theater/conflicttheater.py @@ -365,7 +365,7 @@ class MizCampaignLoader: for group in self.ewrs: closest, distance = self.objective_info(group) if distance < self.BASE_DEFENSE_RADIUS: - closest.preset_locations.ewrs.append( + closest.preset_locations.base_ewrs.append( PointWithHeading.from_point(group.position, group.units[0].heading) ) else: diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index f2a95200..4e4f3bbc 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -63,6 +63,7 @@ class LocationType(Enum): BaseAirDefense = "base air defense" Coastal = "coastal defense" Ewr = "EWR" + BaseEwr = "Base EWR" Garrison = "garrison" MissileSite = "missile site" OffshoreStrikeTarget = "offshore strike target" @@ -86,6 +87,9 @@ class PresetLocations: #: Locations used by EWRs. ewrs: List[PointWithHeading] = field(default_factory=list) + #: Locations used by Base EWRs. + base_ewrs: List[PointWithHeading] = field(default_factory=list) + #: Locations used by non-carrier ships. Carriers and LHAs are not random. ships: List[PointWithHeading] = field(default_factory=list) @@ -131,6 +135,8 @@ class PresetLocations: return self._random_from(self.coastal_defenses) if location_type == LocationType.Ewr: return self._random_from(self.ewrs) + if location_type == LocationType.BaseEwr: + return self._random_from(self.base_ewrs) if location_type == LocationType.Garrison: return self._random_from(self.base_garrisons) if location_type == LocationType.MissileSite: @@ -392,7 +398,7 @@ class ControlPoint(MissionTarget, ABC): for base_defense in self.base_defenses: p = PointWithHeading.from_point(base_defense.position, base_defense.heading) if isinstance(base_defense, EwrGroundObject): - self.preset_locations.ewrs.append(p) + self.preset_locations.base_ewrs.append(p) elif isinstance(base_defense, SamGroundObject): self.preset_locations.base_air_defense.append(p) elif isinstance(base_defense, VehicleGroupGroundObject): diff --git a/game/theater/start_generator.py b/game/theater/start_generator.py index 5316b9c8..9ac71a56 100644 --- a/game/theater/start_generator.py +++ b/game/theater/start_generator.py @@ -455,7 +455,7 @@ class BaseDefenseGenerator: self.generate_base_defenses() def generate_ewr(self) -> None: - position = self.location_finder.location_for(LocationType.Ewr) + position = self.location_finder.location_for(LocationType.BaseEwr) if position is None: return diff --git a/qt_ui/windows/newgame/QNewGameWizard.py b/qt_ui/windows/newgame/QNewGameWizard.py index 0ff28d59..6eaa93d4 100644 --- a/qt_ui/windows/newgame/QNewGameWizard.py +++ b/qt_ui/windows/newgame/QNewGameWizard.py @@ -223,7 +223,7 @@ class FactionSelection(QtWidgets.QWizardPage): self.redFactionSelect.activated.connect(self.updateUnitRecap) def setDefaultFactions(self, campaign: Campaign): - """ Set default faction for selected campaign """ + """Set default faction for selected campaign""" self.blueFactionSelect.clear() self.redFactionSelect.clear() diff --git a/resources/campaigns/full_caucasus.miz b/resources/campaigns/full_caucasus.miz index cbdc9dc7..3f27702c 100644 Binary files a/resources/campaigns/full_caucasus.miz and b/resources/campaigns/full_caucasus.miz differ