mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Custom kneeboard injection
Drop custom kneeboards in SavedGames/DCS/Retribution/Kneeboards as you would normally do, i.e. using the necessary folders if kneeboards are aircraft-specific
This commit is contained in:
parent
71965e7183
commit
4043e2452f
@ -9,6 +9,7 @@
|
|||||||
* **[Modding]** Updated support for F/A-18E/F/G mod version 2.2.5
|
* **[Modding]** Updated support for F/A-18E/F/G mod version 2.2.5
|
||||||
* **[Campaign Setup]** Allow adjustments to naval TGOs (except carriers) on turn 0
|
* **[Campaign Setup]** Allow adjustments to naval TGOs (except carriers) on turn 0
|
||||||
* **[Campaign Design]** Ability to configure specific carrier names & types in campaign's yaml file
|
* **[Campaign Design]** Ability to configure specific carrier names & types in campaign's yaml file
|
||||||
|
* **[Mission Generation]** Ability to inject custom kneeboards
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
* **[UI/UX]** A-10A flights can be edited again.
|
* **[UI/UX]** A-10A flights can be edited again.
|
||||||
|
|||||||
@ -50,6 +50,7 @@ from game.weather.weather import Weather
|
|||||||
from .aircraft.flightdata import FlightData
|
from .aircraft.flightdata import FlightData
|
||||||
from .briefinggenerator import CommInfo, JtacInfo, MissionInfoGenerator
|
from .briefinggenerator import CommInfo, JtacInfo, MissionInfoGenerator
|
||||||
from .missiondata import AwacsInfo, TankerInfo
|
from .missiondata import AwacsInfo, TankerInfo
|
||||||
|
from ..persistency import kneeboards_dir
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from game import Game
|
from game import Game
|
||||||
@ -821,6 +822,12 @@ class KneeboardGenerator(MissionInfoGenerator):
|
|||||||
page_path = aircraft_dir / f"page{idx:02}.png"
|
page_path = aircraft_dir / f"page{idx:02}.png"
|
||||||
page.write(page_path)
|
page.write(page_path)
|
||||||
self.mission.add_aircraft_kneeboard(aircraft.dcs_unit_type, page_path)
|
self.mission.add_aircraft_kneeboard(aircraft.dcs_unit_type, page_path)
|
||||||
|
for type in Path(kneeboards_dir()).iterdir():
|
||||||
|
if type.is_dir():
|
||||||
|
for kneeboard in type.iterdir():
|
||||||
|
self.mission.custom_kneeboards[type.name].append(kneeboard)
|
||||||
|
else:
|
||||||
|
self.mission.custom_kneeboards[""].append(type)
|
||||||
|
|
||||||
def pages_by_airframe(self) -> Dict[AircraftType, List[KneeboardPage]]:
|
def pages_by_airframe(self) -> Dict[AircraftType, List[KneeboardPage]]:
|
||||||
"""Returns a list of kneeboard pages per airframe in the mission.
|
"""Returns a list of kneeboard pages per airframe in the mission.
|
||||||
|
|||||||
@ -111,6 +111,10 @@ def airwing_dir() -> Path:
|
|||||||
return base_path() / "Retribution" / "AirWing"
|
return base_path() / "Retribution" / "AirWing"
|
||||||
|
|
||||||
|
|
||||||
|
def kneeboards_dir() -> Path:
|
||||||
|
return base_path() / "Retribution" / "Kneeboards"
|
||||||
|
|
||||||
|
|
||||||
def payloads_dir(backup: bool = False) -> Path:
|
def payloads_dir(backup: bool = False) -> Path:
|
||||||
payloads = base_path() / "MissionEditor" / "UnitPayloads"
|
payloads = base_path() / "MissionEditor" / "UnitPayloads"
|
||||||
if backup:
|
if backup:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user