83 Commits

Author SHA1 Message Date
Dan Albert
e795e96bfb Don't show red support units on blue kneeboards.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1080
2021-05-20 17:24:39 -07:00
Dan Albert
b0c24f6e51 Refactor front line code to make sides explicit.
A was intended to be the blue point and B was intended to be the red
point. Make this a part of the name so that's clear, and clean up
related code to keep that reliable.
2021-05-07 21:10:22 -07:00
Dan Albert
a47bef1f13 Blacken. 2021-02-12 20:10:45 -08:00
Simon Clark
83f1a95966 Tweak the offset heading to 2 degrees, one degree doesn't always seem to be enough. 2021-01-31 10:54:29 +00:00
Simon Clark
1c86585f03 Make certain stances use slightly offset headings.
There's a DCS bug where vehicles sometimes don't move if they don't have to change heading. This is a bit of a hacky workaround for that.

Should fix #797.
2021-01-30 13:35:22 +00:00
Khopa
cf583bcd55 Merge branch 'master' into develop
# Conflicts:
#	changelog.md
#	game/db.py
#	game/game.py
#	game/income.py
#	game/theater/theatergroundobject.py
#	game/version.py
#	qt_ui/windows/finances/QFinancesMenu.py
2021-01-05 19:50:29 +01:00
walterroach
d7e48662e0 Add custom flight names
Mildly breaks save compat with 2.3; All existing flight dialogs will be
broken, passing the turn or recreating all the flights in the UI will
allow you to continue
2020-12-28 10:52:25 -06:00
Khopa
86394d8f19 Artillery groups would retreat in the wrong direction - fixed (parameters of the retreat point function are a bit confusing 😕 ) 2020-12-24 02:02:17 +01:00
Khopa
282a5109ba Infantry group are always made of 5 units instead of a random amount. 2020-12-23 01:33:49 +01:00
Khopa
7c29ea836c Infantry is only generated for IFV and APC groups 2020-12-22 23:24:27 +01:00
Khopa
e134143f16 Fixed possible crash in mission generation when generating a mission with a faction that doesn't have mandpad and with the disabled infantry option checked.
(cherry picked from commit 31fdd24c3e21aade0abce94dbec7e0df4b61026b)
2020-12-15 10:20:41 -08:00
walterroach
d9ea33cbb9 Fix diversified frontline distance 2020-12-13 12:21:09 -06:00
walterroach
f608cd5aef fix mypy issues 2020-12-12 15:45:55 -06:00
walterroach
c8e71d269b Improve Ground Unit Behavior
* Prevent spinning units
* Prevent units spawning in exclusion zone
* Prevent units from moving into exclusion zone
2020-12-12 15:33:26 -06:00
walterroach
56591b8655 broken waypoint finder 2020-12-11 18:17:44 -06:00
walterroach
473cda971a Fix typing mistake 2020-12-08 17:16:09 -06:00
walterroach
cf570adabe Refactor armor
Break `plan_action_for_groups` into smaller methods

Add type hinting and cleanup formatting
2020-12-08 16:55:04 -06:00
walterroach
02196f2883 Change ground unit waypoints to offroad Ground Unit Waypoint
"On-Road" #495
2020-12-08 15:11:47 -06:00
Khopa
cdf28700cf Possible to spawn manpads on frontline even if infantry squads are disabled. 2020-12-01 23:14:07 +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
29b894f8b0 Fix odd frontline unit spawns
* Modfied frontline vector to ensure start point stays outside of
  exclusion zone.  (Previously it could be up to 100m inside)

* Change randomization in offset distance from frontline to be based
  on a percentage of the unit type's fixed offset instead of the
  width of frontline.
  (Prevents units from being far from their expected distance from
  frontline)

* Change visualgen to use the same frontline vector calculation as the
  unit spawns
2020-11-28 18:43:32 -06:00
Khopa
2ed1c36c54 Fixed infantry for red player being the same units as blue faction. Fixed skill for enemy vehicles being the same as player's one. 2020-11-28 21:34:21 +01:00
walterroach
45361b57a7 fixed bad import 2020-11-27 16:42:11 -06:00
walterroach
a9f1de13b1 Fix armor groups spawning bugs
* Prevent common cases where ground units do not spawn due to
  frontline position being in exclusion zone

* Fix case where ground units will spawn inside exclusion zone due to
  random offset from frontline center being fixed

* Remove dead code from `conflictgen.py`

* Start cleanup of `GroundConflictGenerator`
2020-11-27 16:31:52 -06:00
Khopa
2adaee8671 Added Soviet Union 1943 2020-11-23 00:15:44 +01:00
walterroach
b57dd51f86 Merge branch 'develop' into frontline 2020-11-21 18:55:56 -06:00
walterroach
f6e0dbbb6a operation refactoring 2020-11-21 17:00:22 -06:00
walterroach
ecd073e31d typing and comment cleanup 2020-11-16 22:01:49 -06:00
walterroach
c1f88b4a5f frontline refactoring
`FrontLine` is tightly coupled with `ConflictTheater`.
  Moved into the same module to prevent circular imports.

Moved `ConflictTheater.frontline_data` from class var
to instance var to allow save games to have different
versions of frontlines.
2020-11-15 22:08:18 -06:00
walterroach
33885e2216 initial multi segment frontline implementation 2020-11-12 21:47:13 -06:00
Dan Albert
8827f7df34 Cleanup Lua plugin implementation.
* Move the UI code out of the plugin logic.
* Add types where needed.
* Move into game package.
* Improve error handling.
* Simplify settings behavior.
* Don't load disabled plugins.
* Remove knowledge of non-base plugins from game generation.

Fixes https://github.com/Khopa/dcs_liberation/issues/311
2020-11-08 17:53:52 -08:00
Khopa
aa1ac56ec3 Faction rework, working :) 2020-10-22 13:33:18 +02:00
David Pierron
ed92e9afb9 changed the system to make use of JSON files 2020-10-18 18:23:31 +02:00
David Pierron
ec6fc076de multiple changes
- load plugins when loading a game
- moved plugins scripts to resources/plugins (for pyinstaller)
- removed vanilla JTAC and JTAC_smoke options and settings GUI
- call JtacAutolasePlugin in armor.py
- made a dictionary of INSTALLED_PLUGINS
- removed NIOD from the VEAF plugin
2020-10-12 19:49:39 +02:00
David Pierron
c77bfe9da2 plugin base : inject mission configuration data 2020-10-09 21:25:21 +02:00
Dan Albert
db6b660270 Fix mypy issues in all modules except qt_ui. 2020-10-06 17:24:08 -07:00
Khopa
6317f376b7 EPLRS typo fixed 2020-10-04 14:11:28 +02:00
Khopa
5ecf9aeed8 EPLRS implemented for base defense unit. 2020-10-03 18:32:11 +02:00
Khopa
db36a76c2c Fixed eplrs for frontline ground units 2020-10-03 17:35:06 +02:00
Khopa
07d4b126f5 Enable EPLRS for ground units that can use it. 2020-10-03 16:18:12 +02:00
C. Perreau
7eea328706
Merge pull request #149 from Khopa/develop
2.1.1
2020-09-25 01:06:09 +02:00
Pedro Magueija
93b2e91c10
Fix usage of CombatStance typo 2020-09-15 15:03:41 +02:00
Dan Albert
722ec00076 Add radio information for more aircraft.
Adds the following:

* AJS37
* AV-8B
* JF-17

This does move the preset channel allocation logic into its own class,
since we need to customize that behavior for the AJS37 since it has a
rather unique preset channel layout (see the comments in
`ViggenRadioChannelAllocator` for details).
2020-09-11 18:45:19 -07:00
Dan Albert
993bf50012 Handle callsigns for flights.
We don't configure the callsigns that pydcs uses, so instead read
those from pydcs and use them where appropriate instead of just
guessing.

Fixes https://github.com/Khopa/dcs_liberation/issues/113.
2020-09-11 01:47:13 -07:00
Khopa
136cf143bd Added payloads for drones. Possibility to setup a different JTAC unit for some factions. China using Wingloong instead of Reaper as JTAC unit. 2020-08-20 16:08:52 +02:00
Khopa
421e2508d4 JTAC invisble and immortal commands update. 2020-08-16 15:01:34 +02:00
Khopa
f797bbb97f Fixed JTAC using code above than 1688 that cannot be used in game. 2020-08-16 13:11:28 +02:00
Khopa
2a50768db1 JTAC support 2020-08-12 03:13:51 +02:00
Khopa
23537211b0 Fallback point is further away 2020-08-10 17:55:32 +02:00