mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Update SA-5 Generator for factions without the TinShield
- added an EarlySA5Generator with the P-19 FlatFace SR which is supported by all factions - allows factions without access to the TinShield to have a working SA-5
This commit is contained in:
parent
77edeac990
commit
f526681f3d
@ -23,6 +23,7 @@ Saves from 5.x are not compatible with 6.0.
|
|||||||
* **[Mission Generation]** Fixed an issue where empty convoys lead to an index error when a point capture made a pending transfer of units not completable anymore.
|
* **[Mission Generation]** Fixed an issue where empty convoys lead to an index error when a point capture made a pending transfer of units not completable anymore.
|
||||||
* **[Mission Generation]** Corrected Viggen FR22 & FR24 preset channels for the DCS 2.7.9 update
|
* **[Mission Generation]** Corrected Viggen FR22 & FR24 preset channels for the DCS 2.7.9 update
|
||||||
* **[Mission Generation]** Fixed an issue which prevented the mission generation if two controlpoints are really close to each other (e.g. Marianas campaigns)
|
* **[Mission Generation]** Fixed an issue which prevented the mission generation if two controlpoints are really close to each other (e.g. Marianas campaigns)
|
||||||
|
* **[Mission Generation]** Fixed the SA-5 Generator to use the P-19 FlatFace SR as a Fallback radar if the faction does not have access to the TinShield SR.
|
||||||
* **[UI]** Enable / Disable the settings, save and stats actions if no game is loaded to prevent an error as these functions can only be used on a valid game.
|
* **[UI]** Enable / Disable the settings, save and stats actions if no game is loaded to prevent an error as these functions can only be used on a valid game.
|
||||||
|
|
||||||
# 5.0.0
|
# 5.0.0
|
||||||
|
|||||||
@ -49,7 +49,7 @@ from gen.sam.sam_sa17 import SA17Generator
|
|||||||
from gen.sam.sam_sa19 import SA19Generator
|
from gen.sam.sam_sa19 import SA19Generator
|
||||||
from gen.sam.sam_sa2 import SA2Generator
|
from gen.sam.sam_sa2 import SA2Generator
|
||||||
from gen.sam.sam_sa3 import SA3Generator
|
from gen.sam.sam_sa3 import SA3Generator
|
||||||
from gen.sam.sam_sa5 import SA5Generator
|
from gen.sam.sam_sa5 import SA5Generator, SA5FlatFaceGenerator
|
||||||
from gen.sam.sam_sa6 import SA6Generator
|
from gen.sam.sam_sa6 import SA6Generator
|
||||||
from gen.sam.sam_sa8 import SA8Generator
|
from gen.sam.sam_sa8 import SA8Generator
|
||||||
from gen.sam.sam_sa9 import SA9Generator
|
from gen.sam.sam_sa9 import SA9Generator
|
||||||
@ -79,6 +79,7 @@ SAM_MAP: Dict[str, Type[AirDefenseGroupGenerator]] = {
|
|||||||
"SA2Generator": SA2Generator,
|
"SA2Generator": SA2Generator,
|
||||||
"SA3Generator": SA3Generator,
|
"SA3Generator": SA3Generator,
|
||||||
"SA5Generator": SA5Generator,
|
"SA5Generator": SA5Generator,
|
||||||
|
"SA5FlatFaceGenerator": SA5FlatFaceGenerator,
|
||||||
"SA6Generator": SA6Generator,
|
"SA6Generator": SA6Generator,
|
||||||
"SA8Generator": SA8Generator,
|
"SA8Generator": SA8Generator,
|
||||||
"SA9Generator": SA9Generator,
|
"SA9Generator": SA9Generator,
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
|
from typing import Type
|
||||||
|
|
||||||
|
from dcs.unittype import VehicleType
|
||||||
from dcs.vehicles import AirDefence, Unarmed
|
from dcs.vehicles import AirDefence, Unarmed
|
||||||
|
|
||||||
|
from game import Game
|
||||||
|
from game.theater import SamGroundObject
|
||||||
from gen.sam.airdefensegroupgenerator import (
|
from gen.sam.airdefensegroupgenerator import (
|
||||||
AirDefenseRange,
|
AirDefenseRange,
|
||||||
AirDefenseGroupGenerator,
|
AirDefenseGroupGenerator,
|
||||||
@ -8,15 +13,18 @@ from gen.sam.airdefensegroupgenerator import (
|
|||||||
|
|
||||||
class SA5Generator(AirDefenseGroupGenerator):
|
class SA5Generator(AirDefenseGroupGenerator):
|
||||||
"""
|
"""
|
||||||
This generate a SA-5 group
|
This generate a SA-5 group using the TinShield SR
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name = "SA-5/S-200 Site"
|
name = "SA-5/S-200 Site"
|
||||||
|
|
||||||
def generate(self) -> None:
|
def __init__(self, game: Game, ground_object: SamGroundObject):
|
||||||
|
super().__init__(game, ground_object)
|
||||||
|
self.sr: Type[VehicleType] = AirDefence.RLS_19J6
|
||||||
|
|
||||||
|
def generate(self) -> None:
|
||||||
self.add_unit(
|
self.add_unit(
|
||||||
AirDefence.RLS_19J6,
|
self.sr,
|
||||||
"SR",
|
"SR",
|
||||||
self.position.x,
|
self.position.x,
|
||||||
self.position.y,
|
self.position.y,
|
||||||
@ -54,3 +62,14 @@ class SA5Generator(AirDefenseGroupGenerator):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def range(cls) -> AirDefenseRange:
|
def range(cls) -> AirDefenseRange:
|
||||||
return AirDefenseRange.Long
|
return AirDefenseRange.Long
|
||||||
|
|
||||||
|
|
||||||
|
# TODO Replace this legacy handling once the Generators can be faction sensitive #1903
|
||||||
|
class SA5FlatFaceGenerator(SA5Generator):
|
||||||
|
"""
|
||||||
|
This generate a SA-5 group using the P-19 FlatFace SR
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, game: Game, ground_object: SamGroundObject):
|
||||||
|
super().__init__(game, ground_object)
|
||||||
|
self.sr: Type[VehicleType] = AirDefence.P_19_s_125_sr
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
"HawkGenerator",
|
"HawkGenerator",
|
||||||
"RapierGenerator",
|
"RapierGenerator",
|
||||||
"SA2Generator",
|
"SA2Generator",
|
||||||
"SA5Generator",
|
"SA5FlatFaceGenerator",
|
||||||
"SA6Generator",
|
"SA6Generator",
|
||||||
"SA11Generator",
|
"SA11Generator",
|
||||||
"SA15Generator",
|
"SA15Generator",
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
"RapierGenerator",
|
"RapierGenerator",
|
||||||
"SA2Generator",
|
"SA2Generator",
|
||||||
"SA3Generator",
|
"SA3Generator",
|
||||||
"SA5Generator",
|
"SA5FlatFaceGenerator",
|
||||||
"SA6Generator",
|
"SA6Generator",
|
||||||
"SA8Generator",
|
"SA8Generator",
|
||||||
"SA9Generator",
|
"SA9Generator",
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
"Paratrooper AKS"
|
"Paratrooper AKS"
|
||||||
],
|
],
|
||||||
"air_defenses": [
|
"air_defenses": [
|
||||||
"SA5Generator",
|
"SA5FlatFaceGenerator",
|
||||||
"SA6Generator",
|
"SA6Generator",
|
||||||
"SA8Generator",
|
"SA8Generator",
|
||||||
"ZSU23Generator",
|
"ZSU23Generator",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user