zhexu14 065f90ea98
Reset flight's flight plan builder when changing task type.
The mechanism for how this bug arises is that the *WaypointGenerator*
uses the *FlightWaypoint.waypoint_type* to decide whether to generate
the waypoint in the .miz file using a *DeadIngressBuilder* or a
*SeadIngressBuilder*. This *waypoint_type* is set by
*ato.flightplans.<sead|dead>.Builder*, which is set when *ato.flight* is
initialised in the *Flight._flight_plan_builder* member variable based
on *Flight.flight_type*. When *Flight.flight_type* is updated when the
flight is changed from SEAD->DEAD, *Flight._flight_plan_builder* is not
updated in the development build, resulting in it continuing to generate
SEAD waypoints.

This PR adds *set_flight_type()* which sets the *flight_type* property
and updates *Flight._flight_plan_builder* and uses this function when
converting flight types. Ideally, *flight_type* should be made private
and only accessed through getter/setter functions that encapsulate this
behavior, but that would mess up any existing liberation save files.

This PR was tested by:
1. Opening the save file from Issue 2779 in the development build
2. Clicking "Take Off" and confirming that the Weapon Release Type is
"Guided" at the Ingress Waypoint as described in the issue.
3. Opening the save file from Issue 2779 in this PR
4. Converting the SEAD2DEAD flight from DEAD back to SEAD, and then from
SEAD to DEAD
5. Clicking "Take Off" and confirming in the mission editor that the
SEAD2DEAD flight has Weapon Release Type set to "Auto" at the Ingress
Waypoint.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2779.
2023-05-07 21:19:53 +02:00
2023-03-18 23:02:11 +01:00
2022-05-12 16:21:12 +02:00
2022-08-24 19:25:30 +02:00
2023-02-02 21:41:01 +01:00
2023-05-07 19:31:20 +02:00
2020-12-19 11:56:13 -08:00
2022-09-18 15:52:21 +02:00
2022-10-31 14:58:33 +01:00
2023-05-06 17:03:12 +02:00

Logo

(Github Readme Banner and Splash screen Artwork by Andriy Dankovych, CC BY-SA 4.0)

Patreon

Download

Discord

GitHub pull requests GitHub issues GitHub stars

About DCS Retribution

DCS Retribution was forked from DCS Liberation, which is a DCS World turn based single-player or co-op dynamic campaign. It is an external program that generates full and complex DCS missions and manage a persistent combat environment.

Screenshot

DCS Retribution will rely heavily on Liberation in the near future, and possibly in a more distant future as well since Retribution will attempt to stay backwards compatible for as long as possible. Therefore, the patreon link will keep pointing to Khopa's account until further notice.

Currently, Retribution supports the following new features:

  • A livery selector in the air wing configuration dialog
  • Support for campaigns with quad-point triggers
  • Support for the F-15D 'Baz' mod
  • Support for the Su-30 mod
  • Elementary end-game mechanics
  • Variation in flight-size for BAI/ANTISHIP/DEAD/STRIKE main flight (randomize 2/3/4-ships)
  • More performance options
  • Various bug-fixes (including a fix for the zombie carrier)
  • And more... (See changelog)

Downloads

Latest release is available here : https://github.com/dcs-retribution/dcs-retribution/releases

To download preview builds of the next version of DCS Retribution, see https://github.com/dcs-retribution/dcs-retribution/wiki/Betas.

DCS bugs

These DCS bugs prevent us from improving AI behavior. Please upvote them! (But please don't spam them with comments):

Bugs and feature requests

If you need to report a bug or want to suggest a new feature, you can do this on our bug tracker. In either case, please use the search bar at the top of the page to see if it has already been reported. Note that you may need to remove the filter for open bugs if it's something we've recently fixed.

Roadmap

Our plans for future releases can be found on our Projects page. Each planned release has a Project, and the page for that project has columns for to do, in progress, and done. Items in the Done column are in the preview build for that release. Items in the To do column are planned to be added to that release.

Resources

Tutorials, contributors and developer's guides are available in the project's Wiki

(These need to be written again, meanwhile you can refer to Liberation's Wiki)

Special Thanks

First, a big thanks to shdwp, for starting the original DCS Liberation project.

Then, DCS Liberation/Retribution uses pydcs for mission generation, and nothing would be possible without this. It also uses the popular Mist lua framework for mission scripting.

Excellent lua scripts DCS Liberation/Retribution uses as plugins:

  • For the JTAC feature, DCS Retribution embeds Ciribob's JTAC Autolase script.
  • Walder's Skynet-IADS is used for Integrated Air Defense System.

Please also show some support to these projects !

Description
Dynamic campaign mission generator for DCS World
Readme 386 MiB
Languages
Lua 60.2%
Python 38.3%
TypeScript 1.1%
Jinja 0.2%
CSS 0.2%