From e6a0a1d4a40f43d45f74f16911e95bd6b7a6b73a Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 20 Aug 2020 19:11:51 +0200 Subject: [PATCH] Added payloads for drones. Possibility to setup a different JTAC unit for some factions. China using Wingloong instead of Reaper as JTAC unit. --- changelog.md | 2 ++ game/factions/pakistan_2015.py | 4 +++- game/factions/uae_2005.py | 4 +++- gen/flights/ai_flight_planner.py | 14 ++++++++++---- .../ui/units/aircrafts/MQ-1A Predator_24.jpg | Bin 0 -> 1142 bytes resources/ui/units/aircrafts/MQ-9 Reaper_24.jpg | Bin 0 -> 1177 bytes .../aircrafts/{Mi-28_24.jpg => Mi-28N_24.jpg} | Bin resources/ui/units/aircrafts/WingLoong-I_24.jpg | Bin 0 -> 1024 bytes 8 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 resources/ui/units/aircrafts/MQ-1A Predator_24.jpg create mode 100644 resources/ui/units/aircrafts/MQ-9 Reaper_24.jpg rename resources/ui/units/aircrafts/{Mi-28_24.jpg => Mi-28N_24.jpg} (100%) create mode 100644 resources/ui/units/aircrafts/WingLoong-I_24.jpg diff --git a/changelog.md b/changelog.md index 96061c2e..b30bdd30 100644 --- a/changelog.md +++ b/changelog.md @@ -8,12 +8,14 @@ * **[Units/Factions]** Added factions for Syria map : Syria 2011, Arab Armies 1982, 1973, 1968, 1948, Israel 1982, 1973, 1948 * **[Base Menu]** Budget is visible in recruitment menu. (Thanks to Github contributor root0fall) * **[Misc]** Added error message in mission when state file can not be written. +* **[Units/Factions]** China, Pakistan, UAE will now use the new WingLoong drone instead of MQ-9 reaper ## Fixed issues : * **[Mission Generator]** Caucasus terrain improvement on exclusions zone (added forests between Vaziani and Beslan to exlusion zones) * **[Mission Generator]** The first unit of every base defenses group could not be controlled by Combined Arms. * **[Mission Generator]** Fixed list of flights not refreshing when changing the mission departure (T+). +* **[Mission Generator]** Reduced generated helicopter altitude for CAS missions # 2.0.11 diff --git a/game/factions/pakistan_2015.py b/game/factions/pakistan_2015.py index b5fa5f29..67bfa2aa 100644 --- a/game/factions/pakistan_2015.py +++ b/game/factions/pakistan_2015.py @@ -36,5 +36,7 @@ Pakistan_2015 = { AirDefence.AAA_ZU_23_Closed ], "boat": [ "Type54GroupGenerator", "OliverHazardPerryGroupGenerator" - ], "has_jtac": True + ], + "has_jtac": True, + "jtac_unit": WingLoong_I } diff --git a/game/factions/uae_2005.py b/game/factions/uae_2005.py index 90990493..cc412f06 100644 --- a/game/factions/uae_2005.py +++ b/game/factions/uae_2005.py @@ -32,5 +32,7 @@ UAE_2005 = { Armed_speedboat, ], "boat":[ "OliverHazardPerryGroupGenerator" - ], "has_jtac": True + ], + "has_jtac": True, + "jtac_unit": WingLoong_I } \ No newline at end of file diff --git a/gen/flights/ai_flight_planner.py b/gen/flights/ai_flight_planner.py index 06d0355b..1582276d 100644 --- a/gen/flights/ai_flight_planner.py +++ b/gen/flights/ai_flight_planner.py @@ -607,7 +607,8 @@ class FlightPlanner: :param flight: Flight to setup :param location: Location of the CAS targets """ - + is_helo = hasattr(flight.unit_type, "helicopter") and flight.unit_type.helicopter + cap_alt = 1000 flight.points = [] flight.flight_type = FlightType.CAS @@ -616,9 +617,12 @@ class FlightPlanner: egress = ingress.point_from_heading(heading, distance) ascend = self.generate_ascend_point(flight.from_cp) + if is_helo: + cap_alt = 500 + ascend.alt = 500 flight.points.append(ascend) - ingress_point = FlightWaypoint(ingress.x, ingress.y, 1000) + ingress_point = FlightWaypoint(ingress.x, ingress.y, cap_alt) ingress_point.alt_type = "RADIO" ingress_point.name = "INGRESS" ingress_point.pretty_name = "INGRESS" @@ -626,7 +630,7 @@ class FlightPlanner: ingress_point.waypoint_type = FlightWaypointType.INGRESS_CAS flight.points.append(ingress_point) - center_point = FlightWaypoint(center.x, center.y, 1000) + center_point = FlightWaypoint(center.x, center.y, cap_alt) center_point.alt_type = "RADIO" center_point.description = "Provide CAS" center_point.name = "CAS" @@ -634,7 +638,7 @@ class FlightPlanner: center_point.waypoint_type = FlightWaypointType.CAS flight.points.append(center_point) - egress_point = FlightWaypoint(egress.x, egress.y, 1000) + egress_point = FlightWaypoint(egress.x, egress.y, cap_alt) egress_point.alt_type = "RADIO" egress_point.description = "Egress from CAS area" egress_point.name = "EGRESS" @@ -643,6 +647,8 @@ class FlightPlanner: flight.points.append(egress_point) descend = self.generate_descend_point(flight.from_cp) + if is_helo: + descend.alt = 300 flight.points.append(descend) rtb = self.generate_rtb_waypoint(flight.from_cp) diff --git a/resources/ui/units/aircrafts/MQ-1A Predator_24.jpg b/resources/ui/units/aircrafts/MQ-1A Predator_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f953e2ac3952d2d6065a15a9f9f92bdebce91067 GIT binary patch literal 1142 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!uX^<5tlp{DalcKr_uSu`GO>BnzRH)4jTgSIYiHSRxmaDdKcw&5r4YX9 zf}7^G7%Z<{cKcto`+tU7uFtXJUcT;rZJ%`G92$#Bkp2CLnr4`=3?x&Pg) zb;$oc`y_LNw@ncH9eYd9*rsMq?W@(Lt8Pc_u}$rB(>gDBC;5v?>G8dV z;dSymw{6i+Um1JHXKC4yhYZR#pTB%xo2ys9*-WpbdwPJ?yWUN;|MI?An3!5@Uby4x zme;xaa!)Z7pLoK*PTT77(OW9av!~U65BSdz^vJ6|7P z{?D*Jf+@%0LGu4;T&Jy~LHVUxb(j)#!ZPxT)iq8A)4-f@#N z;xK(YtG&52*Y2A4!t#787jr?OZSM~x?cx=?e)Oa6#(x*vq|+E@Yc0J}mC(0ksrZG$ zDOK|(KCKR_biTAw^#DVD()+%c4-vmU9`*fpzG}8ddFP4Q*KQRYws>r}^<31;Uo&gB zho6}+=UsI9vEnObuU$oNJeYZG*~Qh%ZbfApnv`{%lI)f}yW`34tM9kUM`^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!<#>0rXG823++0sj@NR07WLBp*=6_X!T00J zFJrDZ)#U0e>P%g4Qh0ZFl5_*plEoJuH{6@se|^nA)$69xfdX4Mr)|I2`cCwq@;tYD z`+FKdEeI&=LNJiF4+!EfxRIAW$M*xxc)eS>GwlkA1`A$-!$+ zZ+cM{7xk;lX6skcQ#XIK`NkEPtS&ChtMWg0`Ny?a2g^m&vRAHM5K}TST7F(exl`cI z^3(BIAk{~*>~t?Y5qi0+IX3E!V4Hj6#l6njJbxY8HnsP!S+kY1`*f*F9>dS8w;6cy zWD)$jA^`jw!c*{`(Eo$twgX8m}_&WiI2$C(rUO?hFbdh@9HP2a6wemvcn zb#y=D^^XgeHEL|W@Mr5+kxHPBxtl+-SWVqOKR>se>A7^?qfaNlGg}^w5`Qf7*hJ&x zq^BZpiYDFVoUk~d`Mjxj)TBqB-FIx;UgP!3tmeiOfvStHWf4zf&s95K(tG=rf9osX zBQeKjA5PutXREz(Qbwxp8g`q)gMT#^P3mG-yL%!bG4Iu(XHQT4z3|zP`-^DqS5Ebu z6K@s2rk(%1sH@CF@5be-!_vD8Y*$KsF`Akqs>~wS)}`U$qqHj`DdN!~r5>#n2bgb! oq^>>tVvnKzEvL6apQPoc1iDUUs^308s{Ho(wIacr1pnUz0HXEjZ~y=R literal 0 HcmV?d00001 diff --git a/resources/ui/units/aircrafts/Mi-28_24.jpg b/resources/ui/units/aircrafts/Mi-28N_24.jpg similarity index 100% rename from resources/ui/units/aircrafts/Mi-28_24.jpg rename to resources/ui/units/aircrafts/Mi-28N_24.jpg diff --git a/resources/ui/units/aircrafts/WingLoong-I_24.jpg b/resources/ui/units/aircrafts/WingLoong-I_24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..32feeb3682de92e54ecc107d9348d60d21cbca25 GIT binary patch literal 1024 zcmex=^(PF6}rMnOeST|r4lSw=>~TvNxu(8R<c1}I=;VrF4wW9Q)H;sz?% zD!{d!pzFb!U9xX3zTPI5o8roG<0MW4oqZMDikqloVbuf*=gfJ(V&YTRE(2~ znmD<{#3dx9RMpfqG__1j&CD$#!|Sc9Uv4>_GE3v)!K5X2wHB+Y-1c1mt|s}& zMYU*m@%4|ZZ{6_R(%o|E9rs>Gi<2_fIWt!*U3T1Y*%jlQx7S(1^H@!D)x*y-j z$FMr=*3s5OZ!@JVt%Z!X>|OA8Vs@&u#%J*r3jKlZGi)=yb;PvUOcy-QytruHQvXNV zGrFC&Z7qCy*V5-no8#mk&$_ga_j>Bi+@01_a69?^j^lfkBX4`0;rYx^%~SX*&^3JP z`~v3(EjP5Ky^r;5lsD{+Y?tkn3F*qe+dq3v%!wY38%G#_Ty&MYm%Y-dn>&>G`3&Lf z{1gAIJnp@%@W^G&@0N?Y;;z*mSXUC7Jh6=bs{fCxo^MmP?AqRElp%L?#(#M;^JAjr;O2I<=H2duQC=bpXXnuR{#Gd08guwtpET3 literal 0 HcmV?d00001