diff --git a/gen/sam/ewr_group_generator.py b/gen/sam/ewr_group_generator.py index 81ede492..32404be4 100644 --- a/gen/sam/ewr_group_generator.py +++ b/gen/sam/ewr_group_generator.py @@ -18,6 +18,7 @@ from gen.sam.ewrs import ( StraightFlushGenerator, TallRackGenerator, EwrGenerator, + TinShieldGenerator, ) EWR_MAP = { @@ -31,6 +32,7 @@ EWR_MAP = { "SnowDriftGenerator": SnowDriftGenerator, "StraightFlushGenerator": StraightFlushGenerator, "HawkEwrGenerator": HawkEwrGenerator, + "TinShieldGenerator": TinShieldGenerator, } diff --git a/gen/sam/ewrs.py b/gen/sam/ewrs.py index fdcdf061..2ffc93da 100644 --- a/gen/sam/ewrs.py +++ b/gen/sam/ewrs.py @@ -102,3 +102,9 @@ class HawkEwrGenerator(EwrGenerator): """ unit_type = AirDefence.Hawk_sr + + +class TinShieldGenerator(EwrGenerator): + """19ZH6 "Tin Shield" EWR.""" + + unit_type = AirDefence.RLS_19J6 diff --git a/gen/sam/sam_group_generator.py b/gen/sam/sam_group_generator.py index 3db1b70a..4bebcd27 100644 --- a/gen/sam/sam_group_generator.py +++ b/gen/sam/sam_group_generator.py @@ -28,6 +28,7 @@ from gen.sam.sam_gepard import GepardGenerator from gen.sam.sam_hawk import HawkGenerator from gen.sam.sam_hq7 import HQ7Generator 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_rapier import RapierGenerator from gen.sam.sam_roland import RolandGenerator @@ -100,6 +101,8 @@ SAM_MAP: Dict[str, Type[AirDefenseGroupGenerator]] = { "SA20Generator": SA20Generator, "SA20BGenerator": SA20BGenerator, "SA23Generator": SA23Generator, + "NasamBGenerator": NasamBGenerator, + "NasamCGenerator": NasamCGenerator, } diff --git a/gen/sam/sam_nasams.py b/gen/sam/sam_nasams.py new file mode 100644 index 00000000..62bbf60c --- /dev/null +++ b/gen/sam/sam_nasams.py @@ -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 diff --git a/resources/factions/gdr_1985.json b/resources/factions/gdr_1985.json index 45eacc60..638bb8e1 100644 --- a/resources/factions/gdr_1985.json +++ b/resources/factions/gdr_1985.json @@ -52,7 +52,8 @@ "ZU23Generator" ], "ewrs": [ - "FlatFaceGenerator" + "FlatFaceGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -66,4 +67,4 @@ "navy_generators": [], "has_jtac": true, "jtac_unit": "Mi-8MTV2 Hip" -} \ No newline at end of file +} diff --git a/resources/factions/india_2010.json b/resources/factions/india_2010.json index 5deef839..accf47bc 100644 --- a/resources/factions/india_2010.json +++ b/resources/factions/india_2010.json @@ -57,7 +57,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [ "KUZNECOW" @@ -78,4 +79,4 @@ ], "has_jtac": true, "jtac_unit": "MQ-9 Reaper" -} \ No newline at end of file +} diff --git a/resources/factions/iran_1988.json b/resources/factions/iran_1988.json index 67edce5b..b6d729c8 100644 --- a/resources/factions/iran_1988.json +++ b/resources/factions/iran_1988.json @@ -53,7 +53,8 @@ "ColdWarFlakGenerator" ], "ewrs": [ - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -81,4 +82,4 @@ "has_jtac": true, "jtac_unit": "MQ-9 Reaper", "doctrine": "coldwar" -} \ No newline at end of file +} diff --git a/resources/factions/iran_2015.json b/resources/factions/iran_2015.json index 76f1d23a..6b426d29 100644 --- a/resources/factions/iran_2015.json +++ b/resources/factions/iran_2015.json @@ -65,7 +65,8 @@ "ZU23UralGenerator" ], "ewrs": [ - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -93,4 +94,4 @@ ], "has_jtac": true, "jtac_unit": "MQ-9 Reaper" -} \ No newline at end of file +} diff --git a/resources/factions/libya_2011.json b/resources/factions/libya_2011.json index 58454e54..6c77d0e6 100644 --- a/resources/factions/libya_2011.json +++ b/resources/factions/libya_2011.json @@ -53,7 +53,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -75,4 +76,4 @@ "MolniyaGroupGenerator", "LaCombattanteIIGroupGenerator" ] -} \ No newline at end of file +} diff --git a/resources/factions/north_korea_2000.json b/resources/factions/north_korea_2000.json index 3c5033bc..fe8411d0 100644 --- a/resources/factions/north_korea_2000.json +++ b/resources/factions/north_korea_2000.json @@ -57,7 +57,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -75,4 +76,4 @@ "MolniyaGroupGenerator" ], "has_jtac": false -} \ No newline at end of file +} diff --git a/resources/factions/russia_1970_limited_air.json b/resources/factions/russia_1970_limited_air.json index 9bab53dc..45f8c938 100644 --- a/resources/factions/russia_1970_limited_air.json +++ b/resources/factions/russia_1970_limited_air.json @@ -48,7 +48,8 @@ "ZU23UralGenerator" ], "ewrs": [ - "FlatFaceGenerator" + "FlatFaceGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], @@ -66,4 +67,4 @@ ], "has_jtac": false, "doctrine": "coldwar" -} \ No newline at end of file +} diff --git a/resources/factions/russia_1975 (Mi-24P).json b/resources/factions/russia_1975 (Mi-24P).json index 5294604c..5272b589 100644 --- a/resources/factions/russia_1975 (Mi-24P).json +++ b/resources/factions/russia_1975 (Mi-24P).json @@ -63,7 +63,8 @@ "ZU23UralGenerator" ], "ewrs": [ - "FlatFaceGenerator" + "FlatFaceGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], diff --git a/resources/factions/russia_1975.json b/resources/factions/russia_1975.json index 9c4dbd3a..5c672293 100644 --- a/resources/factions/russia_1975.json +++ b/resources/factions/russia_1975.json @@ -63,7 +63,8 @@ "ZU23UralGenerator" ], "ewrs": [ - "FlatFaceGenerator" + "FlatFaceGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [], "helicopter_carrier": [], diff --git a/resources/factions/russia_1990.json b/resources/factions/russia_1990.json index a833f71b..0f3ead54 100644 --- a/resources/factions/russia_1990.json +++ b/resources/factions/russia_1990.json @@ -73,7 +73,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "aircraft_carrier": [ "KUZNECOW" @@ -96,4 +97,4 @@ ], "has_jtac": true, "jtac_unit": "MQ-9 Reaper" -} \ No newline at end of file +} diff --git a/resources/factions/syria_1982.json b/resources/factions/syria_1982.json index 04267623..0c782bc2 100644 --- a/resources/factions/syria_1982.json +++ b/resources/factions/syria_1982.json @@ -54,7 +54,8 @@ "ZSU57Generator" ], "ewrs": [ - "BoxSpringGenerator" + "BoxSpringGenerator", + "TinShieldGenerator" ], "missiles": [ "ScudGenerator" @@ -70,4 +71,4 @@ "navy_generators": [ "GrishaGroupGenerator" ] -} \ No newline at end of file +} diff --git a/resources/factions/syria_2011.json b/resources/factions/syria_2011.json index 31c8e78b..a089d47e 100644 --- a/resources/factions/syria_2011.json +++ b/resources/factions/syria_2011.json @@ -71,7 +71,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "missiles": [ "ScudGenerator" @@ -88,4 +89,4 @@ "GrishaGroupGenerator", "MolniyaGroupGenerator" ] -} \ No newline at end of file +} diff --git a/resources/factions/syria_2012.json b/resources/factions/syria_2012.json index 1b8c4719..ec4190d9 100644 --- a/resources/factions/syria_2012.json +++ b/resources/factions/syria_2012.json @@ -73,7 +73,8 @@ ], "ewrs": [ "BoxSpringGenerator", - "TallRackGenerator" + "TallRackGenerator", + "TinShieldGenerator" ], "missiles": [ "ScudGenerator" @@ -90,4 +91,4 @@ "GrishaGroupGenerator", "MolniyaGroupGenerator" ] -} \ No newline at end of file +} diff --git a/resources/factions/usa_2005.json b/resources/factions/usa_2005.json index a05ede7a..4206d357 100644 --- a/resources/factions/usa_2005.json +++ b/resources/factions/usa_2005.json @@ -68,7 +68,8 @@ "air_defenses": [ "AvengerGenerator", "LinebackerGenerator", - "PatriotGenerator" + "PatriotGenerator", + "NasamCGenerator" ], "ewrs": [ "PatriotEwrGenerator" @@ -126,4 +127,4 @@ "VMFA-323" ] } -} \ No newline at end of file +} diff --git a/resources/units/ground_units/NASAMS_Command_Post.yaml b/resources/units/ground_units/NASAMS_Command_Post.yaml new file mode 100644 index 00000000..1113a8d8 --- /dev/null +++ b/resources/units/ground_units/NASAMS_Command_Post.yaml @@ -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 diff --git a/resources/units/ground_units/NASAMS_LN_B.yaml b/resources/units/ground_units/NASAMS_LN_B.yaml new file mode 100644 index 00000000..4bfca908 --- /dev/null +++ b/resources/units/ground_units/NASAMS_LN_B.yaml @@ -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 diff --git a/resources/units/ground_units/NASAMS_LN_C.yaml b/resources/units/ground_units/NASAMS_LN_C.yaml new file mode 100644 index 00000000..2e1ba9d9 --- /dev/null +++ b/resources/units/ground_units/NASAMS_LN_C.yaml @@ -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 diff --git a/resources/units/ground_units/NASAMS_Radar_MPQ64F1.yaml b/resources/units/ground_units/NASAMS_Radar_MPQ64F1.yaml new file mode 100644 index 00000000..d10f63ca --- /dev/null +++ b/resources/units/ground_units/NASAMS_Radar_MPQ64F1.yaml @@ -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 diff --git a/resources/units/ground_units/RLS_19J6.yaml b/resources/units/ground_units/RLS_19J6.yaml new file mode 100644 index 00000000..3f129bcf --- /dev/null +++ b/resources/units/ground_units/RLS_19J6.yaml @@ -0,0 +1,3 @@ +price: 16 +variants: + SAM SA-5 S-200 ST-68U "Tin Shield" SR: null