File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ Saves from 7.x are not compatible with 8.0.
1414
1515* ** [ Campaign] ** Fix bug introduced in 7.0 where map strike target deaths are no longer tracked.
1616* ** [ Mission Generation] ** Fix crash during mission generation caused by out of date DCS data for the Gazelle.
17+ * ** [ Mission Generation] ** Fix crash during mission generation when DCS beacon data is inconsistent.
1718
1819# 7.1.0
1920
Original file line number Diff line number Diff line change 11"""Runway information and selection."""
22from __future__ import annotations
33
4+ import logging
45from dataclasses import dataclass
56from typing import Iterator , Optional , TYPE_CHECKING
67
@@ -51,7 +52,20 @@ def for_pydcs_runway_runway(
5152 atc = atc_radio .uhf
5253
5354 for beacon_data in airport .beacons :
54- beacon = Beacons .with_id (beacon_data .id , theater )
55+ try :
56+ beacon = Beacons .with_id (beacon_data .id , theater )
57+ except KeyError :
58+ # DCS data is not always correct. At time of writing, Hatzor in Sinai
59+ # claims to have a beacon named airfield20_0, but the Sinai beacons.lua
60+ # has no such beacon.
61+ # See https://github.com/dcs-liberation/dcs_liberation/issues/3021.
62+ logging .exception (
63+ "Airport %s claims to have beacon %s but the map has no beacon "
64+ "with that ID" ,
65+ airport .name ,
66+ beacon_data .id ,
67+ )
68+ continue
5569 if beacon .is_tacan :
5670 tacan = beacon .tacan_channel
5771 tacan_callsign = beacon .callsign
You can’t perform that action at this time.
0 commit comments