214 Commits

Author SHA1 Message Date
MetalStormGhost
a27663e4b6
Default start type for player flights (#303)
* Implemented a new option in settings: Default start type for Player flights.

* Updated changelog.

* Removed unnecessary country parameter.

* Restore missing parameter

* on_pilot_changed should emit pilots_changed in its finally block, otherwise the start-type isn't updated if you have a single client pilot which you switch to a non-client pilot.

Also implemented other changes suggested by @Raffson, such as a more streamlined start_type QComboBox handling and moving the pilots_changed Signal to FlightRosterEditor.

* Decouple Signal from QFlighStartType

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2024-05-09 10:19:30 +00:00
Raffson
ab32c44b9d
Ability to configure liveries on flight/flight-member level 2024-03-22 20:41:28 +01:00
Raffson
9303e1cb9e
Configurable cruise & combat altitude + randomized offsets (phase 1) 2024-03-04 00:01:29 +01:00
Raffson
7158a5e60d
Don't degrade flight-plan when adding waypoints 2024-03-03 13:43:33 +01:00
Raffson
dad5e7c146
Fix TOT-offset issues 2024-01-28 17:39:46 +01:00
Raffson
ade81f4548
Ability to set callsigns 2023-11-18 23:06:56 +01:00
Raffson
84c9098dba
Add missing colon in departure time 2023-10-15 12:27:42 +02:00
Raffson
3c921198af
PySide6 steamlining 2023-10-14 18:42:48 +02:00
Raffson
7adbe71475
Fix payload saver 2023-10-14 15:40:29 +02:00
Raffson
c4be00d11b
Migrate to PySide6 2023-10-08 00:53:51 +02:00
Dan Albert
59673e7911
Convert TOTs to datetime.
https://github.com/dcs-liberation/dcs_liberation/issues/1680
2023-10-07 21:09:25 +02:00
Dan Albert
97ee6ba19f
Force dumping debug info on recreate.
We need a way to debug successful solvers that's still targeting to a
specific flight. This will do for now.
2023-10-07 17:07:57 +02:00
Raffson
60172d0e52
Streamlining 2023-10-07 15:23:29 +02:00
Dan Albert
47add7848f
Always re-enable loadout UI for member 0. 2023-10-07 14:42:51 +02:00
Dan Albert
0b7acbc94e
Fix synchronization of loadouts on change.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3111.
2023-10-07 14:42:51 +02:00
Dan Albert
c11b4149a0
Fix negative starts when changing TOT offsets. 2023-10-07 14:31:08 +02:00
Dan Albert
091d523516
Fix altering negative TOT offsets.
https://github.com/dcs-liberation/dcs_liberation/issues/3107
2023-10-07 14:31:04 +02:00
Dan Albert
62e43f1169
Clarify that the assigned code is for the TGP. 2023-10-07 14:13:52 +02:00
Dan Albert
dc22e0a577
Hide properties that have better controls.
The weapon laser codes can be set more easily from the weapon laser code
combo box. Setting the properties explicitly here will just cause
conflicts and annoying UI bugs. Hide those properties from the UI.
2023-10-07 14:13:52 +02:00
Dan Albert
51f578b9e3
Add UI for selecting weapon laser codes.
This makes it possible to have the right laser code set for hot start
aircraft that (typically) do not allow changing laser codes when the
engine is on.
2023-10-07 14:13:51 +02:00
Dan Albert
2a8f34ea25
Do not draw empty property rows. 2023-10-07 14:13:51 +02:00
Dan Albert
17e539e524
Add UI for acquiring/releasing TGP laser codes. 2023-10-07 14:06:13 +02:00
Dan Albert
177f357492
Pre-allocate laser codes for FLOTs and flights. 2023-10-07 14:06:12 +02:00
MetalStormGhost
54777a9045
Helicopter waypoint altitude configurable (#207)
* Helicopter waypoint altitude configurable

Added a new option in Settings: Helicopter waypoint altitude (feet AGL).
It sets the waypoint altitude for helicopters in feet AGL. In campaigns in more mountainous areas, you might want to increase this setting to avoid the AI flying into the terrain.

* black?

* Distinguish cruise/combat altitudes for helicopters

Also includes a refactor for WaypointBuilder so it doesn't need a coalition. It can already reference the coalition from the flight.

* Update changelog.md

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
2023-10-02 18:54:21 +02:00
Raffson
226a171550
Fix missing argument exception 2023-10-02 17:50:55 +02:00
Raffson
d4eefd0b55
Streamlining 2023-10-01 21:56:30 +02:00
Dan Albert
485229b92f
Allow per pilot loadouts and properties.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3092.
2023-10-01 20:10:16 +02:00
Dan Albert
bce6a170b8
Improve UI for flight properties.
Use the new data from pydcs to improve the properties UI:

* Use human readable names
* Use appropriate control types
* Limit min and max values as appropriate for each property
* Show labels

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3090.
2023-10-01 19:28:52 +02:00
Dan Albert
f89ac52bf3
Clean up remaining Flight.from_cp users.
The preferred API for this has been `Flight.departure` for a while.
2023-10-01 19:26:20 +02:00
Raffson
0cb3702eb9
Fix exception after new payload file was saved
When a new payload file would be saved, the subsequent flight would always throw an exception (until Retribution would be restarted) because the payload_cache wasn't updated until now.
2023-09-09 12:03:47 +02:00
Raffson
66d741d0b3
Allow user to add navigation waypoints where possible 2023-08-27 21:11:10 +02:00
M Chimiste
16b7ff2bb4
Create payloads folder in ME folder if needed (#200)
Added a check for the existence of a payloads folder.  Also made the _save_payloads lookup and path generation the same as _backup_payloads method to have consistency.
2023-08-27 19:10:00 +02:00
Raffson
f5cb293e44
Allow editing pretty_name for waypoints 2023-08-26 19:19:54 +02:00
Raffson
da75f41b01
Refactor payloads folder logic 2023-07-22 23:26:32 +02:00
Raffson
63e65744f1
Formatting -_- 2023-07-22 21:34:52 +02:00
Raffson
b8cce988f8
Fix wrong serialization when saving payload in new file 2023-07-22 21:33:45 +02:00
Raffson
85bbda4234
Notify user when save/backup was successful 2023-07-22 20:35:26 +02:00
Raffson
0e5df2fd21
Get rid of all pydcs' PayloadDirectories usages 2023-07-22 20:01:00 +02:00
Raffson
0027c64e57
Add & Select newly saved payload to selector 2023-07-22 00:03:22 +02:00
Raffson
493e69eb40
Use base_path instead 2023-07-21 22:51:13 +02:00
Raffson
15be9e3ce1
Fine-tune "save payload" logic 2023-07-21 22:21:45 +02:00
Raffson
2cfd56c8da
Add ability to save/backup payloads
Resolve #164
2023-07-21 21:47:25 +02:00
MetalStormGhost
fb2598a671 Github URL update
Updated the URLs to point correctly to Retribution code, Retribution wiki or Liberation code, as appropriate.
2023-06-21 10:28:26 +02:00
zhexu14
322b8245f7
Make waypoint altitudes editable. 2023-06-16 22:42:59 +02:00
Raffson
c559d6e2be
Follow-up on flight TOT offset 2023-06-04 01:50:46 +02:00
Dan Albert
0acf970443
Add UI for TOT offset adjustment.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2912.
2023-06-04 00:36:51 +02:00
Raffson
198ff7d8a3
Allow deletion of certain types of waypoints
Resolves #60
NAV/REFUEL/DIVERT waypoints should have no effect on the timings.
2023-05-29 00:11:27 +02:00
Dan Albert
0608089eb0
Use the actual Country type instead of the name.
We want other pieces of country information (in particular the short
names). This cleans up a lot of code anyway.

As an added bonus, this now catches squadrons that used invalid names
which would previously be passed through to pydcs and... then I don't
know what would happen.
2023-05-14 21:04:09 +02:00
Dan Albert
03c48376c4
Disallow squadrons from disabling mission types.
After this change, players will always have the final say in what
missions a squadron can be assigned to. Squadrons are not able to
influence the default auto-assignable missions either because that
property is always overridden by the campaign's air wing configuration
(the primary and secondary task properties). The `mission-types` field
of the squadron definition has been removed since it is no longer
capable of influencing anything. I haven't bothered cleaning up the now
useless data in all the existing squadrons though.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2785.
2023-05-14 17:18:55 +02:00
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