1137 Commits

Author SHA1 Message Date
SnappyComebacks
3987f26689
Add performance option to not cull threatening IADS (#1953)
- Don't cull EWRs in detection range.
- Don't cull SAMs within threat range + small buffer.
2022-02-05 18:38:25 -07:00
RndName
3afc6ba24b
Add NASAM Radar and Launcher to radar_db
This will allow correct calculation of the threat range and prevent creating a threat zone when the SR is dead. #1978
2022-01-28 09:41:17 +01:00
MetalStormGhost
3231d008cc
Tolerate empty TGOs in max_threat_range. 2022-01-27 00:43:31 -08:00
Dan Albert
8128b2ed17 Log mission generation time. 2022-01-24 18:20:34 -08:00
Dan Albert
32dd0f543a Log the time it takes to save the game. 2022-01-24 17:58:35 -08:00
Dan Albert
e80851b0a1 Impose minimum altitude for mid-mission spawns.
We had this for the old style in-flight spawns, but not for mid-mission
spawns. Aircraft that were spawning soon after takeoff could potentially
be close to (or under) the ground, causing them to "crash" at game
start. The altitude is different here than for the old style in-flight
spawns to try to get closer to the intended spawn location.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1941
2022-01-24 17:43:41 -08:00
Dan Albert
2499276b2a Fix helicopters at airfields breaking generation.
Helipads at airfields don't work well right now because they are not
counted as additional parking, but we should still allow them to take
off from the airfield parking.

Follow up work would be to fix the parking problem and allow adding
helipads to airfields, or maybe to just "ground" start helicopters at
airfields so they take off from parking rather than the runway.

May fix https://github.com/dcs-liberation/dcs_liberation/issues/1890
2022-01-24 17:17:00 -08:00
Dan Albert
f95795d547 Revert "Remove front line minimum distance."
This bug still isn't well understood and this made things worse.
Reverting until we understand the cause.

This reverts commit c844c364fa8a544b8f542a63c90da7162539640f.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1912
2022-01-24 17:00:00 -08:00
leemarov
5d291846d5
Fix unculled zones not updating when needed.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1034.
2022-01-16 13:54:09 -08:00
MetalStormGhost
7387c2ed8f
Add support for the AI-only F-14A.
The AI for the flyable one is having issues firing AIM-54s. This allows
working around that.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1927.
2022-01-16 13:53:05 -08:00
SnappyComebacks
bf034e18eb
Add preset formations to different flights and waypoints. (#1948)
* Update pydcs version.
* Add formation presets for various flight types.
2022-01-16 14:49:17 -07:00
bbirchnz
4b99ae957e
Improve unit system support in kneeboards.
* Factor out unit systems.
* Add support for more unit systems (nautical and imperial).
* Fuel units support.
* Data for many more aircraft.
2022-01-12 17:21:06 -08:00
bbirchnz
cefc36a6a9
Add aircraft property for Zulu time preference. 2022-01-08 21:37:57 -08:00
bbirchnz
39152eab3c
Add windsocks to FARPs, kneeboard improvements.
Kneeboard improvements:

* Optional (aircraft specific) metric speeds/distances/altitudes.
* Heading to waypoint.

Fuel still needs to be converted to metric, but good enough for now.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/915
2022-01-07 16:58:53 -08:00
RndName
808db05d23
Fix threat range calculation
tThreat range calculation had a hidden bug which could possibly lead to wrong threat range calculation
2022-01-07 15:36:59 +01:00
RndName
795df1a93f
Update Distance comparison operators
remove order=True and implement the comparison operators manually to fix typing error
2022-01-07 15:34:49 +01:00
RndName
54745e786e
Fix incorrect threat range of SA-5
The SA-5 was not part of the radar_db.py and therefore the threat_range calculation was wrong / ever LN counted as threat even when the TR was dead. Also fixed a wrong unit for the SA-11 TELAR.
#1816
2022-01-07 14:41:01 +01:00
RndName
8df9f6989a
Update for the nevada map update
Conflicttheater and Airfields needed an update as nearly all Nevada Airports were renamed with the last map update
2022-01-06 19:50:45 +01:00
MetalStormGhost
c844c364fa
Remove front line minimum distance.
This isn't what it says. It doesn't enforce a minimum distance between
points, but a minimum path length, which isn't useful and isn't a
documented requirement.
2022-01-02 13:34:01 -08:00
RndName
4139258508
Cleanup the killed map objects recognition
removed the extra array to track killed_map_objects and reuse the existing killed_ground_units routine to remove duplicate code and possible confusion
2022-01-02 12:55:10 +01:00
RndName
8dbd2e2561
Revert "Bump Campaign version to 10.0"
This reverts commit 209afd3adf07388b994d52d5a223e1dac9f76ae2.
2022-01-02 01:19:24 +01:00
RndName
abe76ea003
Rework killed map_objects recognition
- removed the map_object_id from the TGO
- add a new TriggerRule with the MapObjectIsDead Condition which adds the map object to the killed_map_objects array in the state.json
- Use the trigger_zone_name as the unique identifier used for the unit_map to recognize the kill
2022-01-02 01:19:23 +01:00
SnappyComebacks
a013d27d17
Add ECM behavior to not Air to Air flights (#1879)
* If a plane has a jammer, and it is not an air to air flight it will jam between join and split.
2022-01-01 16:49:04 -07:00
RndName
209afd3adf
Bump Campaign version to 10.0
with the latest dcs update the Object IDs were changed.
updated the campaign version for these campaigns i was able to check.

#1868
2021-12-31 16:30:52 +01:00
RndName
deb7227ce9
Fix Viggen FR22 group channel id and mention in changelog 2021-12-30 18:47:50 +01:00
RndName
abeebe9c8b
Update Viggen radio presets for 2.7.9
the radio presets of the Viggen were changed with the recent dcs update, they will no longer be automatically generated so we have to add them manually
fixes #1883
2021-12-30 18:16:38 +01:00
Dan Albert
4528233830 Add UI for setting flight properties like HMD.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/706
2021-12-25 15:04:49 -08:00
Dan Albert
656a98675e Rework sim status update to not need a thread.
Rather than polling at 60Hz (which may be faster than the tick rate,
wasting cycles; and also makes synchronization annoying), collect events
during the tick and emit them after (rate limited, pooling events until
it is time for another event to send).

This can be improved by paying attention to the aircraft update list,
which would allow us to avoid updating aircraft that don't have a status
change. To do that we need to be able to quickly lookup a FlightJs
matching a Flight through, and Flight isn't hashable.

We should also be removing dead events and de-duplicating. Currently
each flight has an update for every tick, but only the latest one
matters. Combat update events also don't matter if the same combat is
new in the update.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-23 17:46:24 -08:00
RndName
d2f7785f9f
Finish implementation of add/remove squadrons from AirWingConfigurationDialog
Users can now add and remove squadrons with specific buttons. this also allows new aircraft types to be added as well.

- rebased existing PR to develop
- reverted observable and changed to signals
- changed the general concept so that changes only affect the ui data model and not the game directly. Game will only be updated on apply
- removed unused code
- adopt to review comments
- allow user to choose a predefined squadron preset (also alow none value to use the random generator)
- Reuse the squadron defs from the default assigner in the AirWing class
- allow user to re-roll the squadron nickname (also added new ui icons for the button)
2021-12-23 13:20:59 +01:00
Richard Pump
e4ba9a8b72
Added squadron configuration gui
- added add/remove buttons to Air Wing Menu, implemented remove
2021-12-23 13:20:41 +01:00
Starfire13
4803ae5f78 Fixed typo in squadrondefgenerator.py 2021-12-23 11:20:31 +00:00
MetalStormGhost
88bc4fd852
F-104 mod support. 2021-12-22 13:01:51 -08:00
Dan Albert
515efd0598 Draw frozen combat on the map.
Very basic display. Draws the engagement footprint for air-to-air
combat, a line from the flight to the target for IP, and lines from SAMs
to their target for air defense.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:56:25 -08:00
Dan Albert
fb10a8d28e Add frozen combat modelling.
This doesn't do anything yet, but sets up the data model handling for
frozen combat. The next step is to show combat in the map view, since
that will be helpful when debugging the step after that one: resolving
frozen combat.

This would benefit from caching the Shapely data for SAM threat zones.
Right now it's generating them once per tick and the stuttering is
visible at max speed.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:28 -08:00
Dan Albert
ce4628b64f Separate combat as a distinct flight state.
Will be used later to simulate combat.

https://github.com/dcs-liberation/dcs_liberation/issues/1680
2021-12-21 14:52:27 -08:00
RndName
c643adf57b
Fix empty convoy when transfer is not completable
fixes #1553
2021-12-13 20:45:15 +01:00
RndName
2c21644a2c
Add Easy Communication Setting
allow to enforce the mission setting for easy communication
implements #1425
2021-12-12 01:20:17 +01:00
MetalStormGhost
d11d3b58f7
Add option to limit convoy travel distances.
CPU load seems to scale with route length, so add an option to limit
the length of the convoy route. The tradeoff is that the performance
sensitive route won't necessarily be a correct route.
2021-11-27 01:40:06 -08:00
RndName
676a25631b
Generate unit_id for helipads
fixes mission scripting error (1748)
2021-11-22 15:05:12 +01:00
Dan Albert
8c2e25339f More Python 3.10 compat. 2021-11-21 11:30:39 -08:00
Dan Albert
ef73f712ec More Python 3.10 compat. 2021-11-21 11:28:51 -08:00
Dan Albert
12f420f50e Pre-emptive Python 3.10 compat.
Iterator is no longer exposed directly in collections, but is in
collections.abc.
2021-11-20 18:49:14 -08:00
Dan Albert
66c8b96c9a Update dependencies. 2021-11-20 18:45:27 -08:00
Dan Albert
1dfc625f79 Clarify display of start times. 2021-11-18 23:25:59 -08:00
Dan Albert
0c731e4856 Fix start time used for the kneeboard.
The times we're given are an offset from the turn start, not the mission
start.
2021-11-18 23:13:48 -08:00
Dan Albert
9c0f72921f Randomly offset mid-mission spawns.
This is what we do for the old in-air starts too. It's not perfect but
it's not a regression either.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1754
2021-11-18 17:07:24 -08:00
Dan Albert
45b7b4b2cb Fix incorrect radio range for AN/ARC-222.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1740
2021-11-14 13:34:32 -08:00
Khopa
59d178f99e Fixed mypy errors 2021-11-14 22:05:23 +01:00
Khopa
c59c87c3e8 Now displaying Liberation control points, paths, and frontlines in the mission editor / F10 map. (WIP) 2021-11-14 21:58:56 +01:00
SnappyComebacks
532ac261ff
Ability to plan tanker recovery for strike like flights (#1729)
* Initial refueling definitions.

* Adding refuel definitions.

* Initial functionality changes

* Regenerate package when adding refueling flight.

* Recursively change package waypoint.

* Fix mypy errors.

* Regenerate flight plans when tanker is added to package.

* Give tanker better starting position on package recovery.

* Add TOT calculation for refueling waypoint.

* Timing changes to Strike split point and Refueling start time.

* Add correct waypoint builder for refuel in tarcap and sweep.  Remove restrict afterburner on refuel point.

* Always generate a refuel point for a package.

* Less arbitrary altitude in Refuel track start time calculation.

* Refueling waypoint no longer optional.

* Fix mypy gen error.

* Better discrimination of which tanker flight plan to make.

* Remove refuel tot calculations.

* Remove package regeneration on tanker flight addition.
2021-11-12 21:37:34 -07:00