421 Commits

Author SHA1 Message Date
root0fall
b8922b39fd add type hinting to update_dialog_budget() 2020-12-11 09:24:21 +08:00
root0fall
8b49752401 refresh budget after purchase from subwindow
fixes https://github.com/Khopa/dcs_liberation/issues/221
2020-12-08 20:47:02 +08:00
Dan Albert
edfaaacd04 Determine player vs enemy early in debriefing.
This way the results of committing the debriefing can't alter the view
of the debriefing. It looks like it was probably that case that
debriefing information displays (but not the committed results) would be
incorrect after a base capture because the results might be shown after
the results were committed.

Maybe fixes https://github.com/Khopa/dcs_liberation/issues/513
2020-12-06 20:20:08 -08:00
Dan Albert
84b8613cf5 Cleanup debriefing signals.
We don't need most of this information.
2020-12-06 20:20:08 -08:00
Dan Albert
b0b9c1c8e6 Fix deletion of waypoints.
`FlightPlan.waypoints` returns a list created from the iterator now, so
removing items from that list does not actually alter the flight plan.

Fixes https://github.com/Khopa/dcs_liberation/issues/489
2020-12-06 15:32:28 -08:00
Dan Albert
e0223ded54 Fix display of AA ranges for most ship types.
Fixes https://github.com/Khopa/dcs_liberation/issues/390
2020-12-06 14:22:33 -08:00
Khopa
2012ad0aa3 Fixed cursor / single click behaviour on map. 2020-12-06 21:12:44 +01:00
Dan Albert
15d72a8dcb Fix turn number off by one.
Fixes https://github.com/Khopa/dcs_liberation/issues/482
2020-12-06 01:08:23 -08:00
Dan Albert
e525b11695 Remove scary label from automation options. 2020-12-06 01:06:12 -08:00
Dan Albert
ce977ac937 Remove the enemy forces multiplier option.
This didn't do what it claimed to (it actually just determines the
threshold for whether a control point shoudl be a *preferred* canidate
for purchasing ground units), and the income multipliers offer the
intended behavior.
2020-12-05 23:55:33 -08:00
Dan Albert
6a8ca810ff Add auto-procure option to the CLI generator. 2020-12-05 23:20:58 -08:00
Dan Albert
f2d2fd7014 Add automation options to the new game wizard.
To have an effect on turn zero these need to be enabled in the wizard.
Since the last page was getting quite full I've split it into two pages:
one for the objective generation options and a second for the difficulty
and player assist options.

I also added an option to set the inital budget for opfor.
2020-12-05 23:16:17 -08:00
Dan Albert
ddd06b3162 Move mid-game option to the map options page. 2020-12-05 22:47:26 -08:00
Dan Albert
f396ff7f12 Add procurement automation for players.
The allows the players to use the same auto-purchase mechanics that the
AI uses. The behavior is very bad, but it's no worse than what OPFOR
deals with.

There's a lot that needs to be improved before this is really a good
choice for the player:

* Option to adjust budget balance between front lines and airbases.
* Disallow negative budgets (which incidentally will cause more aircraft
  to be purchased, since the armor purchases currently accidentally
  spend the aircraft budget).
* Buy less randomly: https://github.com/Khopa/dcs_liberation/issues/361.
* Obey parking limits.
* Use the delivery events rather than instant delivery (also allows the
  player to cancel orders they don't want).

Fixes https://github.com/Khopa/dcs_liberation/issues/362
2020-12-05 21:18:23 -08:00
Dan Albert
bac47dad83 Add settings for scaling income.
This adds both player and enemy income multiplier options. Note that
previously the AI was only getting 75% of their income. I've changed
that to give them their full income by default since the player can now
influence it.
2020-12-05 18:06:57 -08:00
Dan Albert
f1a2602cfd Move generator only settings out of Settings. 2020-12-05 16:56:14 -08:00
Dan Albert
b8e64d4369 Revert "Revert "Migrate buildings and TGOs to unit map.""
With fixed tracking for TGO groups and fortification "buildings".

Fixes https://github.com/Khopa/dcs_liberation/issues/485

This reverts commit 72ac8ca8724573efa14e5d15880b697aaaa4eacd.
2020-12-05 14:26:16 -08:00
Dan Albert
72ac8ca872 Revert "Migrate buildings and TGOs to unit map."
Not registering kills correctly. It was in my limited testing, so need
to dig deeper.

https://github.com/Khopa/dcs_liberation/issues/494

This reverts commit 90697194a1a4ca67b53eb7b4056e4f7f5416ac58.
2020-12-04 23:57:58 -08:00
Dan Albert
90697194a1 Migrate buildings and TGOs to unit map.
Fixes https://github.com/Khopa/dcs_liberation/issues/485.
2020-12-04 01:10:18 -08:00
Khopa
76840ff5c2 Added display settings to the toolbar. 2020-12-03 22:48:28 +01:00
Khopa
72ac806cb8 Possible to plan ships movements on the map (UI only) 2020-12-03 01:01:15 +01:00
Khopa
7315d097c2 Regorganized difficulty page of settings window 2020-12-01 23:42:34 +01:00
Dan Albert
4f37610dfb Convert front line units to UnitMap.
https://github.com/Khopa/dcs_liberation/issues/485
2020-12-01 01:25:51 -08:00
Khopa
37e23f70d6 Put manpads in modern faction's infantry squads. And added a setting to disable it. 2020-11-29 13:11:49 +01:00
walterroach
046c7a662a DisplayOption string change 2020-11-27 16:33:31 -06:00
walterroach
edbe2d86f2 Merge branch 'develop' into frontline_vector 2020-11-27 13:47:10 -06:00
walterroach
4e12a1cdad Rework frontline vector
Ensures frontline stays outside of exclusion zones by adjusting its
position and width

Adds a DisplayOption for viewing the frontline vector on the map
2020-11-27 13:46:53 -06:00
Dan Albert
fd454dce74 Load campaign data lazily.
Error checking comes later, but the new game wizard opens much faster by
not spending time creating theaters it doesn't need.

Fixes https://github.com/Khopa/dcs_liberation/issues/469
2020-11-26 22:14:23 -08:00
Dan Albert
0e807d84c2 Differentiate required long and medium range SAMs.
To improve IADS design in campaigns, this differentiates required long
and medium range SAMs. SAMs that must be long range SAMs are defined by
SA-10 or Patriot launchers, while medium range SAMs are defined by SA-2,
SA-3, or Hawk launchers.

Long range SAMs positions will only be populated by long range SAMs
(Patriots and SA-10s), and not all factions have those available. Medium
range SAMs currently comprise all air defenses that are not long range
SAMs, so if the faction includes flak guns in their `sams` property then
flak guns may be spawned at medium range SAM locations.

Base defenses and random SAM locations continue to use either type of
SAM.
2020-11-26 19:48:14 -08:00
Ignacio Muñoz Fernandez
3ad57d995b feat: added timestamp to information widget log items 2020-11-26 15:48:16 -08:00
Ignacio Muñoz Fernandez
7fcf74a8ed added none check on budget setGame 2020-11-26 15:43:36 -08:00
Ignacio Muñoz Fernandez
a0d38f7465 fix: disable topbar buttons when game is None 2020-11-26 15:43:36 -08:00
Dan Albert
2bd673a531 Don't allow operating on broken runways.
Doesn't allow helos or harriers to do it either even though they should
be able to because we don't currently support ground spawns, which would
be needed to prevent those aircraft from using the runway. Even then, I
don't know if they can be forced to *land* vertically.

Fixes https://github.com/Khopa/dcs_liberation/issues/432
2020-11-25 18:50:00 -08:00
Ignacio Muñoz Fernandez
a1b64bc72d
Cleanup QWeatherInfoWindow and rjust wind bearings. (#456) 2020-11-25 18:10:46 -08:00
Dan Albert
80bc9d6b23 Support reparing damaged runways.
Repairing a damaged runway costs $100M and takes 4 turns (one day). The
AI will always repair runways if they can afford it. if a runway is
damaged again during the repair the process must begin again.

Runways are still operational despite what the UI says. Preventing the
player and AI from using damaged runways (except for with helicopters
and harriers) is next.
2020-11-25 18:07:51 -08:00
Dan Albert
ee768b9147 Display damaged runways. 2020-11-25 18:07:51 -08:00
Dan Albert
75ea5cc462 Fix None dereferences in weather UI.
Also normalizes line endings.
2020-11-25 14:39:33 -08:00
Dan Albert
611f04ab5a Resurrect force multiplier option.
Fixes https://github.com/Khopa/dcs_liberation/issues/440
2020-11-25 14:10:34 -08:00
Ignacio Muñoz Fernandez
02e7ab41b4 feat: MVP done for Weather Information Display 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
ca30af4238 wip: finished work on the TopPanel Widget, added weather icons, changed timeofday icons 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
718b3f2623 wip: fixed qt cosmetic issue, added forecast text generation, initial for weather window 2020-11-25 13:04:03 -08:00
Ignacio Muñoz Fernandez
6e153c6451 wip: initial work on issue #406 2020-11-25 13:04:03 -08:00
Dan Albert
b99462b628 Rename OCA strike tasks. 2020-11-24 17:28:48 -08:00
Khopa
d0804a6f9e Added missile icons for missiles sites 2020-11-24 13:08:59 +01:00
walterroach
17fe977b06
Merge pull request #437 from walterroach/operation_refactor
Operation refactor
2020-11-23 22:36:46 -06:00
Dan Albert
6e0af7c144 Fix names of tasks to not use the enum name. 2020-11-23 17:15:42 -08:00
Dan Albert
9394ed663a Add runway bombing missions.
This allows planning the missions and the missions are functional, but
they will have no effect on future turns yet.
2020-11-23 16:47:58 -08:00
walterroach
da17d1e5d1 Change Operation to a static class
Removed always True "event successful"

Add `AirWarEvent` as the primary game `Event` applied to every miz

Cleanup of `FrontLineAttackEvent`

Change `Operation.is_awacs_enabled` to two bools for each side red/blue
Currently controlled by whether an AWACs is available for the faction
(and only ever true for Blue)
2020-11-23 18:14:25 -06:00
Dan Albert
c67263662d Fix arrival box changing when changing aircraft. 2020-11-23 00:23:57 -08:00
Dan Albert
d7b328b887 Consider trasnfers when counting parking. 2020-11-22 18:44:16 -08:00