Add reversed_heading property to ground units

This allows to define if a unit should be placed backwards in the generated mission. This is required for example for the SA-11/SA-17 or Silkworm Launchers.
This commit is contained in:
RndName
2022-05-12 15:36:42 +02:00
parent f20d0effe9
commit 88a8caa023
7 changed files with 21 additions and 6 deletions

View File

@@ -55,6 +55,10 @@ class GroundUnitType(UnitType[Type[VehicleType]]):
spawn_weight: int
skynet_properties: SkynetProperties
# Defines if we should place the ground unit with an inverted heading.
# Some units like few Launchers have to be placed backwards to be able to fire.
reversed_heading: bool
@classmethod
def named(cls, name: str) -> GroundUnitType:
if not cls._loaded:
@@ -117,4 +121,5 @@ class GroundUnitType(UnitType[Type[VehicleType]]):
skynet_properties=SkynetProperties.from_data(
data.get("skynet_properties", {})
),
reversed_heading=data.get("reversed_heading", False),
)