diff --git a/README.md b/README.md index 4d51bd19..82e950b4 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ First, a big thanks to shdwp, for starting the original DCS Liberation project. Then, DCS Liberation uses [pydcs](http://github.com/pydcs/dcs) for mission generation, and nothing would be possible without this. It also uses the popular [Mist](https://github.com/mrSkortch/MissionScriptingTools) lua framework for mission scripting. -And for the JTAC feature, DCS Liberation embed Ciribob's JTAC Autolase [script](https://github.com/ciribob/DCS-JTACAutoLaze). + +Excellent lua scripts DCS Liberation uses as plugins: + +* For the JTAC feature, DCS Liberation embeds Ciribob's JTAC Autolase [script](https://github.com/ciribob/DCS-JTACAutoLaze). +* Walder's [Skynet-IADS](https://github.com/walder/Skynet-IADS) is used for Integrated Air Defense System. Please also show some support to these projects ! diff --git a/changelog.md b/changelog.md index eb6d4fe8..77d1c308 100644 --- a/changelog.md +++ b/changelog.md @@ -25,7 +25,6 @@ * **[Misc]** Spitfire variant with clipped wings was not seen as flyable by DCS Liberation (hence could not be setup as client/player slot) * **[Misc]** Updated Syria terrain parking slots database, the out-of-date database could end up generating aircraft in wrong slots (We are still experiencing issues with somes airbases, such as Khalkhalah though) - # 2.2.0 ## Features/Improvements : diff --git a/gen/aircraft.py b/gen/aircraft.py index f3690915..758bf0b8 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1197,12 +1197,13 @@ class AircraftConflictGenerator: viggen_target_points = [ (idx, point) for idx, point in enumerate(filtered_points) if point.waypoint_type in TARGET_WAYPOINTS ] - keep_target = viggen_target_points[random.randint(0, len(viggen_target_points) - 1)] - filtered_points = [ - point for idx, point in enumerate(filtered_points) if ( - point.waypoint_type not in TARGET_WAYPOINTS or idx == keep_target[0] - ) - ] + if viggen_target_points: + keep_target = viggen_target_points[random.randint(0, len(viggen_target_points) - 1)] + filtered_points = [ + point for idx, point in enumerate(filtered_points) if ( + point.waypoint_type not in TARGET_WAYPOINTS or idx == keep_target[0] + ) + ] for idx, point in enumerate(filtered_points): PydcsWaypointBuilder.for_waypoint( diff --git a/pydcs b/pydcs index 6dbfa2db..2883be31 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit 6dbfa2db64c02494ef3e990c1325f121fefa6b5b +Subproject commit 2883be31c2eb80834b93efd8d20ca17913986e9b diff --git a/pydcs_extensions/highdigitsams/highdigitsams.py b/pydcs_extensions/highdigitsams/highdigitsams.py new file mode 100644 index 00000000..3ff206d0 --- /dev/null +++ b/pydcs_extensions/highdigitsams/highdigitsams.py @@ -0,0 +1,169 @@ +from dcs import unittype + + +class SAM_SA_20_S_300PMU1_TR_30N6E(unittype.VehicleType): + id = "S-300PMU1 40B6M tr" + name = "SAM SA-20 S-300PMU1 TR 30N6E" + detection_range = 160000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_20_S_300PMU1_TR_30N6E_truck(unittype.VehicleType): + id = "S-300PMU1 30N6E tr" + name = "SAM SA-20 S-300PMU1 TR 30N6E(truck)" + detection_range = 160000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_20_S_300PMU1_SR_5N66E(unittype.VehicleType): + id = "S-300PMU1 40B6MD sr" + name = "SAM SA-20 S-300PMU1 SR 5N66E" + detection_range = 120000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_20_S_300PMU1_SR_64N6E(unittype.VehicleType): + id = "S-300PMU1 64N6E sr" + name = "SAM SA-20 S-300PMU1 SR 64N6E" + detection_range = 300000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_23_S_300VM_9S15M2_SR(unittype.VehicleType): + id = "S-300VM 9S15M2 sr" + name = "SAM SA-23 S-300VM 9S15M2 SR" + detection_range = 320000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_23_S_300VM_9S19M2_SR(unittype.VehicleType): + id = "S-300VM 9S19M2 sr" + name = "SAM SA-23 S-300VM 9S19M2 SR" + detection_range = 310000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_23_S_300VM_9S32ME_TR(unittype.VehicleType): + id = "S-300VM 9S32ME tr" + name = "SAM SA-23 S-300VM 9S32ME TR" + detection_range = 230000 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_20_S_300PMU1_LN_5P85CE(unittype.VehicleType): + id = "S-300PMU1 5P85CE ln" + name = "SAM SA-20 S-300PMU1 LN 5P85CE" + detection_range = 0 + threat_range = 150000 + air_weapon_dist = 150000 + + +class SAM_SA_20_S_300PMU1_LN_5P85DE(unittype.VehicleType): + id = "S-300PMU1 5P85DE ln" + name = "SAM SA-20 S-300PMU1 LN 5P85DE" + detection_range = 0 + threat_range = 150000 + air_weapon_dist = 150000 + + +class SAM_SA_10__5V55RUD__S_300PS_LN_5P85CE(unittype.VehicleType): + id = "S-300PS 5P85CE ln" + name = "SAM SA-10 (5V55RUD) S-300PS LN 5P85CE" + detection_range = 0 + threat_range = 90000 + air_weapon_dist = 90000 + + +class SAM_SA_10__5V55RUD__S_300PS_LN_5P85DE(unittype.VehicleType): + id = "S-300PS 5P85DE ln" + name = "SAM SA-10 (5V55RUD) S-300PS LN 5P85DE" + detection_range = 0 + threat_range = 90000 + air_weapon_dist = 90000 + + +class SAM_SA_23_S_300VM_9A83ME_LN(unittype.VehicleType): + id = "S-300VM 9A83ME ln" + name = "SAM SA-23 S-300VM 9A83ME LN" + detection_range = 0 + threat_range = 90000 + air_weapon_dist = 90000 + + +class SAM_SA_23_S_300VM_9A82ME_LN(unittype.VehicleType): + id = "S-300VM 9A82ME ln" + name = "SAM SA-23 S-300VM 9A82ME LN" + detection_range = 0 + threat_range = 200000 + air_weapon_dist = 200000 + + +class SAM_SA_17_Buk_M1_2_LN_9A310M1_2(unittype.VehicleType): + id = "SA-17 Buk M1-2 LN 9A310M1-2" + name = "SAM SA-17 Buk M1-2 LN 9A310M1-2" + detection_range = 120000 + threat_range = 50000 + air_weapon_dist = 50000 + + +class SAM_SA_2__V759__LN_SM_90(unittype.VehicleType): + id = "S_75M_Volhov_V759" + name = "SAM SA-2 (V759) LN SM-90" + detection_range = 0 + threat_range = 50000 + air_weapon_dist = 50000 + + +class SAM_HQ_2_LN_SM_90(unittype.VehicleType): + id = "HQ_2_Guideline_LN" + name = "SAM HQ-2 LN SM-90" + detection_range = 0 + threat_range = 50000 + air_weapon_dist = 50000 + + +class SAM_SA_3__V_601P__LN_5P73(unittype.VehicleType): + id = "5p73 V-601P ln" + name = "SAM SA-3 (V-601P) LN 5P73" + detection_range = 0 + threat_range = 18000 + air_weapon_dist = 18000 + + +class SAM_SA_20_S_300PMU1_CP_54K6(unittype.VehicleType): + id = "S-300PMU1 54K6 cp" + name = "SAM SA-20 S-300PMU1 CP 54K6" + detection_range = 0 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_23_S_300VM_9S457ME_CP(unittype.VehicleType): + id = "S-300VM 9S457ME cp" + name = "SAM SA-23 S-300VM 9S457ME CP" + detection_range = 0 + threat_range = 0 + air_weapon_dist = 0 + + +class SAM_SA_24_Igla_S_manpad(unittype.VehicleType): + id = "SA-24 Igla-S manpad" + name = "SAM SA-24 Igla-S manpad" + detection_range = 5000 + threat_range = 6000 + air_weapon_dist = 6000 + + +class SAM_SA_14_Strela_3_manpad(unittype.VehicleType): + id = "SA-14 Strela-3 manpad" + name = "SAM SA-14 Strela-3 manpad" + detection_range = 5000 + threat_range = 4500 + air_weapon_dist = 4500 diff --git a/pydcs_extensions/mod_units.py b/pydcs_extensions/mod_units.py index 132a7b2f..cfa1b321 100644 --- a/pydcs_extensions/mod_units.py +++ b/pydcs_extensions/mod_units.py @@ -1,4 +1,5 @@ from pydcs_extensions.a4ec.a4ec import A_4E_C +from pydcs_extensions.highdigitsams import highdigitsams from pydcs_extensions.mb339.mb339 import MB_339PAN from pydcs_extensions.rafale.rafale import Rafale_M, Rafale_A_S from pydcs_extensions.su57.su57 import Su_57 @@ -39,5 +40,26 @@ MODDED_VEHICLES = [ frenchpack.DIM__TOYOTA_BLUE, frenchpack.DIM__TOYOTA_GREEN, frenchpack.DIM__TOYOTA_DESERT, - frenchpack.DIM__KAMIKAZE + frenchpack.DIM__KAMIKAZE, + highdigitsams.SAM_SA_20_S_300PMU1_TR_30N6E, + highdigitsams.SAM_SA_20_S_300PMU1_TR_30N6E_truck, + highdigitsams.SAM_SA_20_S_300PMU1_SR_5N66E, + highdigitsams.SAM_SA_20_S_300PMU1_SR_64N6E, + highdigitsams.SAM_SA_23_S_300VM_9S15M2_SR, + highdigitsams.SAM_SA_23_S_300VM_9S19M2_SR, + highdigitsams.SAM_SA_23_S_300VM_9S32ME_TR, + highdigitsams.SAM_SA_20_S_300PMU1_LN_5P85CE, + highdigitsams.SAM_SA_20_S_300PMU1_LN_5P85DE, + highdigitsams.SAM_SA_10__5V55RUD__S_300PS_LN_5P85CE, + highdigitsams.SAM_SA_10__5V55RUD__S_300PS_LN_5P85DE, + highdigitsams.SAM_SA_23_S_300VM_9A83ME_LN, + highdigitsams.SAM_SA_23_S_300VM_9A82ME_LN, + highdigitsams.SAM_SA_17_Buk_M1_2_LN_9A310M1_2, + highdigitsams.SAM_SA_2__V759__LN_SM_90, + highdigitsams.SAM_HQ_2_LN_SM_90, + highdigitsams.SAM_SA_3__V_601P__LN_5P73, + highdigitsams.SAM_SA_20_S_300PMU1_CP_54K6, + highdigitsams.SAM_SA_23_S_300VM_9S457ME_CP, + highdigitsams.SAM_SA_24_Igla_S_manpad, + highdigitsams.SAM_SA_14_Strela_3_manpad ] \ No newline at end of file diff --git a/qt_ui/widgets/QTopPanel.py b/qt_ui/widgets/QTopPanel.py index 4f7e74bc..32ba24a8 100644 --- a/qt_ui/widgets/QTopPanel.py +++ b/qt_ui/widgets/QTopPanel.py @@ -48,12 +48,14 @@ class QTopPanel(QFrame): self.passTurnButton.setIcon(CONST.ICONS["PassTurn"]) self.passTurnButton.setProperty("style", "btn-primary") self.passTurnButton.clicked.connect(self.passTurn) + if not self.game: + self.passTurnButton.setEnabled(False) self.proceedButton = QPushButton("Take off") self.proceedButton.setIcon(CONST.ICONS["Proceed"]) self.proceedButton.setProperty("style", "start-button") self.proceedButton.clicked.connect(self.launch_mission) - if self.game and self.game.turn == 0: + if not self.game or self.game.turn == 0: self.proceedButton.setEnabled(False) self.factionsInfos = QFactionsInfos(self.game) @@ -101,6 +103,8 @@ class QTopPanel(QFrame): self.budgetBox.setGame(game) self.factionsInfos.setGame(game) + self.passTurnButton.setEnabled(True) + if game and game.turn == 0: self.proceedButton.setEnabled(False) else: diff --git a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py index 791c7d5b..eeb0eaca 100644 --- a/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py +++ b/qt_ui/windows/mission/flight/waypoints/QFlightWaypointTab.py @@ -161,5 +161,3 @@ class QFlightWaypointTab(QFrame): def on_change(self): self.flight_waypoint_list.update_list() self.on_flight_changed.emit() - -