mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Added NASAMS support
This commit is contained in:
parent
741ae36d4c
commit
4aac2d2b7b
@ -28,6 +28,7 @@ from gen.sam.sam_gepard import GepardGenerator
|
|||||||
from gen.sam.sam_hawk import HawkGenerator
|
from gen.sam.sam_hawk import HawkGenerator
|
||||||
from gen.sam.sam_hq7 import HQ7Generator
|
from gen.sam.sam_hq7 import HQ7Generator
|
||||||
from gen.sam.sam_linebacker import LinebackerGenerator
|
from gen.sam.sam_linebacker import LinebackerGenerator
|
||||||
|
from gen.sam.sam_nasams import NasamBGenerator, NasamCGenerator
|
||||||
from gen.sam.sam_patriot import PatriotGenerator
|
from gen.sam.sam_patriot import PatriotGenerator
|
||||||
from gen.sam.sam_rapier import RapierGenerator
|
from gen.sam.sam_rapier import RapierGenerator
|
||||||
from gen.sam.sam_roland import RolandGenerator
|
from gen.sam.sam_roland import RolandGenerator
|
||||||
@ -100,6 +101,8 @@ SAM_MAP: Dict[str, Type[AirDefenseGroupGenerator]] = {
|
|||||||
"SA20Generator": SA20Generator,
|
"SA20Generator": SA20Generator,
|
||||||
"SA20BGenerator": SA20BGenerator,
|
"SA20BGenerator": SA20BGenerator,
|
||||||
"SA23Generator": SA23Generator,
|
"SA23Generator": SA23Generator,
|
||||||
|
"NasamBGenerator": NasamBGenerator,
|
||||||
|
"NasamCGenerator": NasamCGenerator,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
68
gen/sam/sam_nasams.py
Normal file
68
gen/sam/sam_nasams.py
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
from typing import Type
|
||||||
|
|
||||||
|
from dcs.mapping import Point
|
||||||
|
from dcs.unittype import VehicleType
|
||||||
|
from dcs.vehicles import AirDefence
|
||||||
|
|
||||||
|
from game import Game
|
||||||
|
from game.theater import SamGroundObject
|
||||||
|
from gen.sam.airdefensegroupgenerator import (
|
||||||
|
AirDefenseRange,
|
||||||
|
AirDefenseGroupGenerator,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class NasamCGenerator(AirDefenseGroupGenerator):
|
||||||
|
"""
|
||||||
|
This generate a Nasams group with AIM-120C missiles
|
||||||
|
"""
|
||||||
|
|
||||||
|
name = "NASAMS AIM-120C"
|
||||||
|
|
||||||
|
def __init__(self, game: Game, ground_object: SamGroundObject):
|
||||||
|
super().__init__(game, ground_object)
|
||||||
|
self.launcherType: Type[VehicleType] = AirDefence.NASAMS_LN_C
|
||||||
|
|
||||||
|
def generate(self) -> None:
|
||||||
|
# Command Post
|
||||||
|
self.add_unit(
|
||||||
|
AirDefence.NASAMS_Command_Post,
|
||||||
|
"CP",
|
||||||
|
self.position.x + 30,
|
||||||
|
self.position.y + 30,
|
||||||
|
self.heading,
|
||||||
|
)
|
||||||
|
# Radar
|
||||||
|
self.add_unit(
|
||||||
|
AirDefence.NASAMS_Radar_MPQ64F1,
|
||||||
|
"RADAR",
|
||||||
|
self.position.x - 30,
|
||||||
|
self.position.y - 30,
|
||||||
|
self.heading,
|
||||||
|
)
|
||||||
|
|
||||||
|
positions = self.get_circular_position(4, launcher_distance=120, coverage=360)
|
||||||
|
for i, position in enumerate(positions):
|
||||||
|
self.add_unit(
|
||||||
|
self.launcherType,
|
||||||
|
"LN#" + str(i),
|
||||||
|
position[0],
|
||||||
|
position[1],
|
||||||
|
position[2],
|
||||||
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def range(cls) -> AirDefenseRange:
|
||||||
|
return AirDefenseRange.Medium
|
||||||
|
|
||||||
|
|
||||||
|
class NasamBGenerator(NasamCGenerator):
|
||||||
|
"""
|
||||||
|
This generate a Nasams group with AIM-120B missiles
|
||||||
|
"""
|
||||||
|
|
||||||
|
name = "NASAMS AIM-120B"
|
||||||
|
|
||||||
|
def __init__(self, game: Game, ground_object: SamGroundObject):
|
||||||
|
super().__init__(game, ground_object)
|
||||||
|
self.launcherType: Type[VehicleType] = AirDefence.NASAMS_LN_B
|
||||||
@ -68,7 +68,8 @@
|
|||||||
"air_defenses": [
|
"air_defenses": [
|
||||||
"AvengerGenerator",
|
"AvengerGenerator",
|
||||||
"LinebackerGenerator",
|
"LinebackerGenerator",
|
||||||
"PatriotGenerator"
|
"PatriotGenerator",
|
||||||
|
"NasamCGenerator"
|
||||||
],
|
],
|
||||||
"ewrs": [
|
"ewrs": [
|
||||||
"PatriotEwrGenerator"
|
"PatriotEwrGenerator"
|
||||||
@ -126,4 +127,4 @@
|
|||||||
"VMFA-323"
|
"VMFA-323"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
resources/units/ground_units/NASAMS_Command_Post.yaml
Normal file
8
resources/units/ground_units/NASAMS_Command_Post.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
price: 18
|
||||||
|
description: "NASAMS (National/Norwegian Advanced Surface to Air Missile System) is a distributed and networked medium to long range air-defence system.
|
||||||
|
NASAMS was the first surface-based application for the AIM-120 AMRAAM (Advanced Medium Range Air-to-Air Missile)."
|
||||||
|
introduced: 1995
|
||||||
|
manufacturer: Kongsberg Defence & Aerospace, Raytheon
|
||||||
|
origin: Norway, USA
|
||||||
|
variants:
|
||||||
|
SAM NASAMS C2: null
|
||||||
8
resources/units/ground_units/NASAMS_LN_B.yaml
Normal file
8
resources/units/ground_units/NASAMS_LN_B.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
price: 15
|
||||||
|
description: "NASAMS (National/Norwegian Advanced Surface to Air Missile System) is a distributed and networked medium to long range air-defence system.
|
||||||
|
NASAMS was the first surface-based application for the AIM-120 AMRAAM (Advanced Medium Range Air-to-Air Missile)."
|
||||||
|
introduced: 1995
|
||||||
|
manufacturer: Kongsberg Defence & Aerospace, Raytheon
|
||||||
|
origin: Norway, USA
|
||||||
|
variants:
|
||||||
|
SAM NASAMS LN AIM-120B: null
|
||||||
8
resources/units/ground_units/NASAMS_LN_C.yaml
Normal file
8
resources/units/ground_units/NASAMS_LN_C.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
price: 20
|
||||||
|
description: "NASAMS (National/Norwegian Advanced Surface to Air Missile System) is a distributed and networked medium to long range air-defence system.
|
||||||
|
NASAMS was the first surface-based application for the AIM-120 AMRAAM (Advanced Medium Range Air-to-Air Missile)."
|
||||||
|
introduced: 1996
|
||||||
|
manufacturer: Kongsberg Defence & Aerospace, Raytheon
|
||||||
|
origin: Norway, USA
|
||||||
|
variants:
|
||||||
|
SAM NASAMS LN AIM-120C: null
|
||||||
8
resources/units/ground_units/NASAMS_Radar_MPQ64F1.yaml
Normal file
8
resources/units/ground_units/NASAMS_Radar_MPQ64F1.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
price: 26
|
||||||
|
description: "NASAMS (National/Norwegian Advanced Surface to Air Missile System) is a distributed and networked medium to long range air-defence system.
|
||||||
|
NASAMS was the first surface-based application for the AIM-120 AMRAAM (Advanced Medium Range Air-to-Air Missile)."
|
||||||
|
introduced: 1995
|
||||||
|
manufacturer: Kongsberg Defence & Aerospace, Raytheon
|
||||||
|
origin: Norway, USA
|
||||||
|
variants:
|
||||||
|
SAM NASAMS SR MPQ64F1: null
|
||||||
Loading…
x
Reference in New Issue
Block a user