File tree 2 files changed +16
-1
lines changed
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.
14
14
15
15
* ** [ Campaign] ** Fix bug introduced in 7.0 where map strike target deaths are no longer tracked.
16
16
* ** [ 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.
17
18
18
19
# 7.1.0
19
20
Original file line number Diff line number Diff line change 1
1
"""Runway information and selection."""
2
2
from __future__ import annotations
3
3
4
+ import logging
4
5
from dataclasses import dataclass
5
6
from typing import Iterator , Optional , TYPE_CHECKING
6
7
@@ -51,7 +52,20 @@ def for_pydcs_runway_runway(
51
52
atc = atc_radio .uhf
52
53
53
54
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
55
69
if beacon .is_tacan :
56
70
tacan = beacon .tacan_channel
57
71
tacan_callsign = beacon .callsign
You can’t perform that action at this time.
0 commit comments