Skip to content

Commit

Permalink
Merge branch 'dev' into cold-war-assets-mod-v1.0-support
Browse files Browse the repository at this point in the history
  • Loading branch information
MetalStormGhost authored Jul 1, 2024
2 parents 2880d47 + d84a0eb commit e2cbe6e
Show file tree
Hide file tree
Showing 68 changed files with 2,059 additions and 328 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,6 @@ Excellent lua scripts DCS Liberation/Retribution uses as plugins:

* For the JTAC feature, DCS Retribution 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.
* Carstens Arty Spotter https://www.digitalcombatsimulator.com/en/files/3339128/ is an amazing force multiplyer to drop the hammer on enemies.

Please also show some support to these projects !
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@
* **[Campaign Design]** Support for Kola map by Orbx
* **[UI]** Zoom level retained when switching campaigns
* **[UX]** Allow changing squadrons in flight's edit dialog
* **[Cheats]** Sink/Resurrect carriers instead of showing an error during cheat-capture (use AWCD-cheat to add squadrons upon resurrection)
* **[UI/UX]** Allow changing conditions such as Time, Date & Weather
* **[Modding]** Added support for Su-15 Flagon mod (v1.0)
* **[Plugins]** Support for Carsten's Arty Spotter script

## Fixes
* **[UI/UX]** A-10A flights can be edited again
* **[Mission Generation]** IADS bug sometimes triggering "no skynet usable units" error during mission generation
* **[New Game Wizard]** Campaign errors show a dialog again and avoid CTDs
* **[UI]** Landmap wasn't updating when switching to a different theater
* **[Mission Results Processor]** Squadrons of a sunken carrier are now disbanded

# Retribution v1.3.1
#### Note: Re-save your missions in DCS' Mission Editor to avoid possible crashes due to datalink (usually the case when F-16C blk50s are used) when hosting missions on a dedicated server.
Expand Down
40 changes: 20 additions & 20 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion game/ato/flightplans/waypointbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@ def ingress(
objective: MissionTarget,
) -> FlightWaypoint:
alt = self.get_combat_altitude
if ingress_type in [
FlightWaypointType.INGRESS_CAS,
FlightWaypointType.INGRESS_OCA_AIRCRAFT,
]:
weather = self.flight.coalition.game.conditions.weather
max_alt = feet(30000)
if weather.clouds and (
weather.clouds.preset
and "overcast" in weather.clouds.preset.description.lower()
or weather.clouds.density > 5
):
max_alt = meters(
max(feet(500).meters, weather.clouds.base - feet(500).meters)
)
alt = min(alt, max_alt)

alt_type: AltitudeReference = "BARO"
if self.is_helo or self.flight.is_hercules:
alt_type = "RADIO"
Expand Down Expand Up @@ -381,13 +397,23 @@ def _target_area(
return waypoint

def cas(self, position: Point) -> FlightWaypoint:
weather = self.flight.coalition.game.conditions.weather
max_alt = feet(30000)
if weather.clouds and (
weather.clouds.preset
and "overcast" in weather.clouds.preset.description.lower()
or weather.clouds.density > 5
):
max_alt = meters(
max(feet(500).meters, weather.clouds.base - feet(500).meters)
)
return FlightWaypoint(
"CAS",
FlightWaypointType.CAS,
position,
feet(self.flight.coalition.game.settings.heli_combat_alt_agl)
if self.is_helo
else meters(1000),
else min(meters(1000), max_alt),
"RADIO",
description="Provide CAS",
pretty_name="CAS",
Expand Down
3 changes: 3 additions & 0 deletions game/factions/faction.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ def apply_mod_settings(self, mod_settings: Optional[ModSettings] = None) -> None
self.remove_aircraft("JAS39Gripen_AG")
if not mod_settings.super_etendard:
self.remove_aircraft("VSN_SEM")
if not mod_settings.su15_flagon:
self.remove_aircraft("Su_15")
self.remove_aircraft("Su_15TM")
if not mod_settings.su30_flanker_h:
self.remove_aircraft("Su-30MKA")
self.remove_aircraft("Su-30MKI")
Expand Down
1 change: 1 addition & 0 deletions game/theater/start_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class ModSettings:
uh_60l: bool = False
jas39_gripen: bool = False
super_etendard: bool = False
su15_flagon: bool = False
su30_flanker_h: bool = False
su57_felon: bool = False
frenchpack: bool = False
Expand Down
8 changes: 8 additions & 0 deletions game/theater/theatergroundobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def is_iads(self) -> bool:
def coalition(self) -> Coalition:
return self.control_point.coalition

@property
def is_naval_control_point(self) -> bool:
return False


class BuildingGroundObject(TheaterGroundObject):
def __init__(
Expand Down Expand Up @@ -384,6 +388,10 @@ class GenericCarrierGroundObject(NavalGroundObject, ABC):
def is_control_point(self) -> bool:
return True

@property
def is_naval_control_point(self) -> bool:
return True


# TODO: Why is this both a CP and a TGO?
class CarrierGroundObject(GenericCarrierGroundObject):
Expand Down
12 changes: 12 additions & 0 deletions game/theater/theatergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ def kill(self, events: GameUpdateEvents) -> None:
if self.ground_object.is_iads:
iads = self.ground_object.control_point.coalition.game.theater.iads_network
iads.update_tgo(self.ground_object, events)
if self.ground_object.is_naval_control_point:
cp = self.ground_object.control_point
for squadron in cp.squadrons:
cp.coalition.air_wing.squadrons[squadron.aircraft].remove(squadron)

def revive(self, events: GameUpdateEvents) -> None:
self.alive = True
self.ground_object.threat_poly()
events.update_tgo(self.ground_object)
if self.ground_object.is_iads:
iads = self.ground_object.control_point.coalition.game.theater.iads_network
iads.update_tgo(self.ground_object, events)

@property
def unit_name(self) -> str:
Expand Down
1 change: 1 addition & 0 deletions pydcs_extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from .ov10a import *
from .spanishnavypack import *
from .super_etendard import *
from .su15 import *
from .su30 import *
from .su57 import *
from .swedishmilitaryassetspack import *
Expand Down
14 changes: 2 additions & 12 deletions pydcs_extensions/f106/f106.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ class WeaponsF106:
"name": "AIR-2A Genie Nuclear air-to-air unguided rocket.",
"weight": 66,
}
L005_Sorbtsiya_ECM_pod__left_ = {
"clsid": "{44EE8698-89F9-48EE-AF36-5FD31896A82F}",
"name": "L005 Sorbtsiya ECM pod (left)",
"weight": 150,
}
L005_Sorbtsiya_ECM_pod__right_ = {
"clsid": "{44EE8698-89F9-48EE-AF36-5FD31896A82A}",
"name": "L005 Sorbtsiya ECM pod (right)",
"weight": 150,
}


inject_weapons(WeaponsF106)
Expand Down Expand Up @@ -150,7 +140,7 @@ class Pylon7:
# ERRR <CLEAN>

class Pylon8:
WeaponsF106.L005_Sorbtsiya_ECM_pod__left_ = (
L005_Sorbtsiya_ECM_pod__left_ = (
8,
Weapons.L005_Sorbtsiya_ECM_pod__left_,
)
Expand Down Expand Up @@ -279,7 +269,7 @@ class Pylon7:
# ERRR <CLEAN>

class Pylon8:
Weapons.L005_Sorbtsiya_ECM_pod__left_ = (
L005_Sorbtsiya_ECM_pod__left_ = (
8,
Weapons.L005_Sorbtsiya_ECM_pod__left_,
)
Expand Down
1 change: 1 addition & 0 deletions pydcs_extensions/su15/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .su15 import *
Loading

0 comments on commit e2cbe6e

Please sign in to comment.