813 Commits

Author SHA1 Message Date
Dan Albert
db36cf248e Return pilots when canceling flight creation. 2021-06-22 23:36:39 -07:00
Dan Albert
84a0a3caeb Fix unit type mismatch.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1314
2021-06-22 22:54:40 -07:00
Chris Seagraves
814519248c
Fix bug with file name in title with invalid save games. 2021-06-22 14:19:53 -07:00
Simon Clark
91763b233e Add clarity for mod selection page. 2021-06-21 20:04:58 +01:00
Dan Albert
47e038c9fa Fix command line campaign generator. 2021-06-20 23:46:06 -07:00
Simon Clark
963ab38b2e Refactor the mod select changes, re-add accidentally deleted factions. 2021-06-21 01:16:48 +01:00
Simon Clark
11069cc219 Make mod selection nicer and deprecate MB-339.
Mod selection is now done via checkbox in the new game wizard.

The MB-339 is being turned into a paid module, and the free mod no longer works, so it's been removed.
2021-06-21 01:16:41 +01:00
Chris Seagraves
7e17533cc6
Air/ground intel prettification. (#1285)
* Sort rows.
* Add totals to group headers.
* Indent content.
* Add space between sections.
2021-06-20 13:43:54 -07:00
Chris Seagraves
7808da118a
Include the save name in the window title. 2021-06-20 13:33:27 -07:00
SnappyComebacks
5b31026e1c
Fix UI to obey max group sizes.
This also adds max group sizes for aircraft that need it but don't
according to DCS. Only the first tanker or AEW&C unit in a group can be
contacted by radio.
2021-06-20 13:32:00 -07:00
Simon Clark
6c3987ec86 Updates the intel box text for turn 0.
It was a bit misleading beforehand, as there were no forces on either side.
2021-06-20 15:56:53 +01:00
Dan Albert
e09f53da8f Fix exceptions when no aircraft are selected.
This commonly happens during reset of the UI, but also happens when the
player is out of aircraft.
2021-06-19 20:26:33 -07:00
Dan Albert
9940dc8451 Fix type annotations for some UI code. 2021-06-19 15:03:39 -07:00
RndName
ad6ed21b6b Add EWR objects to predefined waypoints 2021-06-19 11:01:35 -07:00
RndName
1763f59320 Allow deletion of multiple waypoints by selection
#1221
2021-06-19 10:40:40 -07:00
RndName
08d32ffc77
Allow shift/ctrl click to buy/sell multiple units.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1221
2021-06-19 10:36:33 -07:00
RndName
7e3cebb96d
Fix purchase groups.
The new class PurchaseGroup coming in with commit 9bb986c was not
initiallized correctly.

This causes the bug that the update function is not working when you
for example open the AircraftRecruitmentMenu press "+" or "-", close
the dialog and then open ArmorRecruitmentMenu. If you then want to buy
or sell the update function will raise an error "Internal C++ Object
Already Deleted".
2021-06-19 10:33:35 -07:00
jsjlewis96
6cd711a1e2 Added option to disable AI pilot levelling 2021-06-19 03:03:50 -07:00
Dan Albert
9bb986cff9 Update *all* buy/sell buttons, not just the row.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1207
2021-06-18 20:14:44 -07:00
Dan Albert
95d3ff4cbe Don't show ground unit menu at carriers.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1220
2021-06-18 19:39:42 -07:00
Dan Albert
4ea66477fe Add options for changing pilot limits and rates. 2021-06-18 18:33:15 -07:00
Dan Albert
d3be732566 Fix tooltips for scuds/silkworms.
Same problem as the ground object menu, same cleanup required at some
point.
2021-06-18 18:14:20 -07:00
Dan Albert
933517055e Fix ground object menus for scuds and silkworms.
These really need to be added to the unit data, but this will do as a
stop gap since the group generators need an overhaul anyway.
2021-06-18 18:06:05 -07:00
jsjlewis96
fe227e02b8 Shows total at top for economic intel 2021-06-18 17:35:18 -07:00
C. Perreau
cea970f065
Merge pull request #1248 from jsjlewis96/dot-neutral
#987 Neutral dot labels in options
2021-06-18 18:13:09 +02:00
Dan Albert
09704b6f37 Add a wrapper type for ground unit info. 2021-06-17 22:09:17 -07:00
jsjlewis96
62f6b57948 Added neutral dot option 2021-06-17 23:12:30 +01:00
Dan Albert
ace42019fb Cap squadron size, limit replenishment rate.
This caps squadrons to 12 pilots and limits their replenishment rate to
1 pilot per turn. Should probably make those values configurable, but
they aren't currently.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1136
2021-06-13 14:40:15 -07:00
Dan Albert
25c289deaa Make squadron nicknames optional. 2021-06-12 21:43:26 -07:00
Dan Albert
3c802e7d55 Fix unit info window. 2021-06-12 21:35:01 -07:00
Dan Albert
4a3ef42e67 Wrap the pydcs FlyingType in our own AircraftType.
This is an attempt to remove a lot of our supposedly unnecessary error
handling. Every aircraft should have a price, a description, a name,
etc; and none of those should require carrying around the faction's
country as context.

This moves all the data for aircraft into yaml files (only one converted
here as an example). Most of the "extended unit info" isn't actually
being read yet.

To replace the renaming of units based on the county, we instead
generate multiple types of each unit when necessary. The CF-18 is just
as much a first-class type as the F/A-18 is.

This doesn't work in its current state because it does break all the
existing names for aircraft that are used in the faction and squadron
files, and we no longer let those errors go as a warning. It will be an
annoying one time switch, but it allows us to define the names that get
used in these files instead of being sensitive to changes as they happen
in pydcs, and allows faction designers to specifically choose, for
example, the Su-22 instead of the Su-17.

One thing not handled by this is aircraft task capability. This is
because the lists in ai_flight_planner_db.py are a priority list, and to
move it out to a yaml file we'd need to assign a weight to it that would
be used to stack rank each aircraft. That's doable, but it makes it much
more difficult to see the ordering of aircraft at a glance, and much
more annoying to move aircraft around in the priority list. I don't
think this is worth doing, and the priority lists will remain in their
own separate lists.

This includes the converted I used to convert all the old unit info and
factions to the new format. This doesn't need to live long, but we may
want to reuse it in the future so we want it in the version history.
2021-06-12 20:13:45 -07:00
Dan Albert
40aa7734e1 Fix CAS commit range display.
CAS commits around the target, not its flight plan.
2021-06-09 21:51:26 -07:00
SnappyComebacks
a53a648a63 Add plannable tankers.
This Pull Request lets users plan Tanker flights.

Features:

- Introduction of `Refueling` flight type.
- Tankers can be purchased at airbases and carriers.
- Tankers get planned by AI.
- Tankers are planned from airbases and at aircraft carriers.
- Tankers aim to be at high, fast, and 70 miles from the nearest threat.
  (A10s won't be able to tank)
- Tankers racetrack orbit for one hour.
- Optional Tickbox to enable legacy tankers.
- S-3B Tanker added to factions.
- KC-130 MPRS added to factions.
- Kneeboard shows planned tankers, their tacans, and radios.

Limitations:

- AI doesn't know whether to plan probe and drogue or boom refueling
  tankers.
- User can't choose tanker speed.  Heavily loaded aircraft may have
  trouble.
- User can't choose tanker altitude.  A-10s will not make it to high
  altitude.

Problems:

- Tanker callsigns do not increment, see attached image.  (Investigated:
  Need to use `FlyingType.callsign_dict`, instead of just
  `FlyingType.callsign`.  This seems like it might be significant work
  to do.).
- Having a flight of two or more tankers only spawns one tanker.
- Let me know if you have a solution, or feel free to commit one.

https://user-images.githubusercontent.com/74509817/120909602-d7bc3680-c633-11eb-80d7-eccd4e095770.png
2021-06-09 21:14:10 -07:00
Dan Albert
a9dacf4a29 Fix engagement distance display. 2021-06-09 21:01:14 -07:00
Dan Albert
f8d885fc9a Fix broken import. 2021-06-09 19:06:02 -07:00
Brock Greman
3ad51cafa8 Fixing display of "sunny" during clear conditions at night. 2021-06-09 02:16:05 -07:00
Dan Albert
b8c14d69c3 Make enable_and_reset not half lie.
https://github.com/dcs-liberation/dcs_liberation/issues/1185
2021-06-08 21:19:48 -07:00
Dan Albert
622a171ac4 Move armor TGO purchase off find_unittype. 2021-06-07 19:01:16 -07:00
Dan Albert
ae2a818d8c Move the base intel menu off find_unittype. 2021-06-07 18:54:51 -07:00
Dan Albert
27b5f24a0f Move unit purchase off find_unittype. 2021-06-07 18:54:21 -07:00
Dan Albert
d8881e2734 Fix hangar status display. 2021-06-06 17:12:44 -07:00
Dan Albert
45869c428e Label the player checkbox in the roster editor. 2021-06-06 13:43:34 -07:00
Dan Albert
d316e13fa6 Suppress events fired while rebuilding model. 2021-06-05 15:21:23 -07:00
Dan Albert
1ea98a6ed1 Hide incompatible campaigns by default.
https://github.com/dcs-liberation/dcs_liberation/issues/1178
2021-06-05 15:15:30 -07:00
Dan Albert
3e43414d9c Make the new package dialog modal.
In the *new* package dialog, a package has been created and may have
aircraft assigned to it, but it is not a part of the ATO until the user
saves it.

Other actions (modifying settings, closing some other dialogs like the
base menu) can cause a Game update which will forcibly close this window
without either accepting or rejecting it, so we neither save the package
nor release any allocated units.

While it would be preferable to be able to update this dialog as needed
in the event of game updates, the quick fix is to just not allow
interaction with other UI elements until the new package has either been
finalized or canceled.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1027
2021-06-05 14:21:31 -07:00
Florian
3a592aee8b Split purchase budget based on investment ratio.
The AI purchaser will aim to have a 50/50 ground/air investment mix.
This allows it to overspend on one category if significant losses were
taken the previous turn.

The total purchase amount is still limited, so if the bases are full
when only 10% of the investment is in ground units, the full budget for
the turn will still go to air.
2021-06-05 14:07:18 -07:00
Dan Albert
34f3a50234 Fix UI quirks when reopening custom loadout.
* Disable the selector.
* Select the default loadout rather than the first one so unchecking the
  custom box goes back to the default loadout.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1152
2021-06-05 13:40:11 -07:00
Dan Albert
6094179a40 Show pending ground unit count in the base menu.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1161
2021-06-05 13:24:12 -07:00
Dan Albert
96cdea2a94 Load two units per cargo plane.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1029
2021-06-05 12:21:34 -07:00
Dan Albert
a0833e8943 Allow selection of auto-assigned mission types.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1176
2021-06-04 17:50:21 -07:00