Use stored alignment for the F-14A.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1689

(cherry picked from commit 2699a38f7b7c4a16b8d0a97bc83a5b5aeb65be76)
This commit is contained in:
Dan Albert 2021-10-30 13:00:36 -07:00
parent f44654f66e
commit 80c8563d67
2 changed files with 8 additions and 4 deletions

View File

@ -39,6 +39,7 @@ Saves from 4.x are not compatible with 5.0.
* **[Mission Generation]** AI carrier aircraft with a start time of T+0 will now start at T+1s to avoid traffic jams. * **[Mission Generation]** AI carrier aircraft with a start time of T+0 will now start at T+1s to avoid traffic jams.
* **[Mission Generation]** Fixed cases of unused aircraft not being spawned at airfields as soon as any airport filled up. * **[Mission Generation]** Fixed cases of unused aircraft not being spawned at airfields as soon as any airport filled up.
* **[Mission Generation]** Fixed cases with multiple client flights of the same airframe all received the same preset channels. * **[Mission Generation]** Fixed cases with multiple client flights of the same airframe all received the same preset channels.
* **[Mission Generation]** F-14A is now generated with stored alignment.
* **[UI]** Selling of Units is now visible again in the UI dialog and shows the correct amount of sold units * **[UI]** Selling of Units is now visible again in the UI dialog and shows the correct amount of sold units
* **[UI]** Fixed bug where an incompatible campaign could be generated if no action is taken on the campaign selection screen. * **[UI]** Fixed bug where an incompatible campaign could be generated if no action is taken on the campaign selection screen.

View File

@ -6,7 +6,7 @@ import random
from dataclasses import dataclass, field from dataclasses import dataclass, field
from datetime import timedelta from datetime import timedelta
from functools import cached_property from functools import cached_property
from typing import Dict, List, Optional, TYPE_CHECKING, Type, Union, Iterable, Any from typing import Any, Dict, Iterable, List, Optional, TYPE_CHECKING, Type, Union
from dcs import helicopters from dcs import helicopters
from dcs.action import AITaskPush, ActivateGroup from dcs.action import AITaskPush, ActivateGroup
@ -21,6 +21,7 @@ from dcs.planes import (
B_52H, B_52H,
C_101CC, C_101CC,
C_101EB, C_101EB,
F_14A_135_GR,
F_14B, F_14B,
JF_17, JF_17,
Su_33, Su_33,
@ -44,6 +45,7 @@ from dcs.task import (
EngageTargetsInZone, EngageTargetsInZone,
FighterSweep, FighterSweep,
GroundAttack, GroundAttack,
Nothing,
OptROE, OptROE,
OptRTBOnBingoFuel, OptRTBOnBingoFuel,
OptRTBOnOutOfAmmo, OptRTBOnOutOfAmmo,
@ -54,15 +56,14 @@ from dcs.task import (
RunwayAttack, RunwayAttack,
StartCommand, StartCommand,
Tanker, Tanker,
TargetType,
Targets, Targets,
Transport, Transport,
WeaponType, WeaponType,
TargetType,
Nothing,
) )
from dcs.terrain.terrain import Airport, NoParkingSlotError from dcs.terrain.terrain import Airport, NoParkingSlotError
from dcs.triggers import Event, TriggerOnce, TriggerRule from dcs.triggers import Event, TriggerOnce, TriggerRule
from dcs.unit import Unit, Skill from dcs.unit import Skill, Unit
from dcs.unitgroup import FlyingGroup, ShipGroup, StaticGroup from dcs.unitgroup import FlyingGroup, ShipGroup, StaticGroup
from dcs.unittype import FlyingType from dcs.unittype import FlyingType
@ -379,6 +380,8 @@ class AircraftConflictGenerator:
# Set up F-14 Client to have pre-stored alignment # Set up F-14 Client to have pre-stored alignment
if unit_type is F_14B: if unit_type is F_14B:
unit.set_property(F_14B.Properties.INSAlignmentStored.id, True) unit.set_property(F_14B.Properties.INSAlignmentStored.id, True)
elif unit_type is F_14A_135_GR:
unit.set_property(F_14A_135_GR.Properties.INSAlignmentStored.id, True)
group.points[0].tasks.append( group.points[0].tasks.append(
OptReactOnThreat(OptReactOnThreat.Values.EvadeFire) OptReactOnThreat(OptReactOnThreat.Values.EvadeFire)