Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 2917 #2980

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Saves from 7.x are not compatible with 8.0.
## Features/Improvements

* **[Engine]** Support for DCS 2.8.6.41066, including the new Sinai map.
* **[Mission Planning]** CAS now plannable against airfields and FOBs.
* **[UI]** Limited size of overfull airbase display and added scrollbar.
* **[UI]** Moved air wing and transfer menus to the toolbar to improve UI fit on low resolution displays.

Expand Down
8 changes: 6 additions & 2 deletions game/theater/controlpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ def mission_types(self, for_player: bool) -> Iterator[FlightType]:
FlightType.OCA_AIRCRAFT,
FlightType.OCA_RUNWAY,
FlightType.AIR_ASSAULT,
FlightType.CAS,
]

yield from super().mission_types(for_player)
Expand Down Expand Up @@ -1442,8 +1443,11 @@ def mission_types(self, for_player: bool) -> Iterator[FlightType]:
from game.ato import FlightType

if not self.is_friendly(for_player):
yield FlightType.STRIKE
yield FlightType.AIR_ASSAULT
yield from [
FlightType.STRIKE,
FlightType.AIR_ASSAULT,
FlightType.CAS,
]
else:
yield FlightType.AEWC

Expand Down
6 changes: 4 additions & 2 deletions tests/theater/test_controlpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_mission_types_enemy(mocker: Any) -> None:
airport.name = "test" # required for Airfield.__init__
airfield = Airfield(airport, theater=None, starts_blue=True) # type: ignore
mission_types = list(airfield.mission_types(for_player=True))
assert len(mission_types) == 8
assert len(mission_types) == 9
assert FlightType.OCA_AIRCRAFT in mission_types
assert FlightType.OCA_RUNWAY in mission_types
assert FlightType.AIR_ASSAULT in mission_types
Expand All @@ -73,6 +73,7 @@ def test_mission_types_enemy(mocker: Any) -> None:
assert FlightType.SEAD_ESCORT in mission_types
assert FlightType.SWEEP in mission_types
assert FlightType.REFUELING in mission_types
assert FlightType.CAS in mission_types

# Carrier
mocker.patch("game.theater.controlpoint.Carrier.is_friendly", return_value=False)
Expand Down Expand Up @@ -100,13 +101,14 @@ def test_mission_types_enemy(mocker: Any) -> None:
mocker.patch("game.theater.controlpoint.Fob.is_friendly", return_value=False)
fob = Fob(name="test", at=None, theater=None, starts_blue=True) # type: ignore
mission_types = list(fob.mission_types(for_player=True))
assert len(mission_types) == 6
assert len(mission_types) == 7
assert FlightType.AIR_ASSAULT in mission_types
assert FlightType.ESCORT in mission_types
assert FlightType.TARCAP in mission_types
assert FlightType.SEAD_ESCORT in mission_types
assert FlightType.SWEEP in mission_types
assert FlightType.STRIKE in mission_types
assert FlightType.CAS in mission_types

# Off map spawn
mocker.patch(
Expand Down