Generate random TACAN frequency for ships at start.

TACAN infos are displayed in briefing.
This commit is contained in:
Khopa
2020-05-29 03:28:09 +02:00
parent 8afdf5ef65
commit 59986d74f4
4 changed files with 30 additions and 19 deletions

View File

@@ -93,8 +93,13 @@ class GroundObjectsGenerator:
ship.heading = u.heading
sg.add_unit(ship)
# TODO : make sure the point is not on Land
sg.add_waypoint(sg.points[0].position.point_from_heading(g.units[0].heading, 100000))
# SET UP TACAN
modeChannel = "X" if not cp.tacanY else "Y"
sg.points[0].tasks.append(ActivateBeaconCommand(channel=cp.tacanN, modechannel=modeChannel, callsign=cp.tacanI, unit_id=sg.units[0].id))
else:
if ground_object.dcs_identifier in warehouse_map:
static_type = warehouse_map[ground_object.dcs_identifier]