25 Commits

Author SHA1 Message Date
Dan Albert
74291271e3 Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static
class.
2021-10-22 13:48:43 -07:00
C. Perreau
707d13a65c
Merge branch 'develop' into helipads 2021-08-16 12:20:43 +02:00
Dan Albert
90ad1f4a61 Change squadrons to operate out of a single base.
https://github.com/dcs-liberation/dcs_liberation/issues/1145

Currently this is fixed at the start of the campaign. The squadron
locations are defined by the campaign file.

Follow up work:

* Track aircraft ownership per-squadron rather than per-airbase.
* UI for relocating squadrons.
* Ferry missions for squadrons that are relocating.
* Auto-relocation (probably only for retreat handling).

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1138
2021-08-14 21:46:27 -07:00
RndName
b5b0d82a1a
Open all files with utf-8 encoding
- will not be used for binary read/writes (rb,wb)!
- prevents a bug where units with special characters in the unit name can not be tracked anymore as there will be a name mismatch due to wrong encoding
2021-08-14 13:10:43 +02:00
Magnus Wolffelt
30801dff9f
Use more sensible patrol speeds for CAP, and fix is_helo (#1492)
* Use more sensible patrol speeds for CAP, and fix is_helo
2021-08-03 12:22:55 +02:00
Khopa
71143536bf Merge branch 'develop' into helipads
# Conflicts:
#	game/game.py
#	game/operation/operation.py
#	game/theater/conflicttheater.py
#	game/theater/controlpoint.py
#	gen/groundobjectsgen.py
#	resources/campaigns/golan_heights_lite.miz
2021-08-02 19:34:05 +02:00
Magnus Wolffelt
6621421a6f Tweak max-speed-based patrol altitudes 2021-08-01 15:21:32 -07:00
Magnus Wolffelt
a3e3e9046f Estimate preferred patrol altitude based on max speed 2021-08-01 12:15:15 -07:00
RndName
04cdb6fbfc fix for wrong patrol speed 2021-08-01 12:05:28 -07:00
Dan Albert
c11c6f40d5 Add minimum fuel per waypoint on the kneeboard. 2021-07-17 19:51:55 -07:00
Dan Albert
4c0a97e62f Log a warning for unknown max ranges. 2021-07-17 17:27:40 -07:00
Dan Albert
c65ac5a7cf Move mission range data into the aircraft type.
The doctrine/task limits were capturing a reasonable average for the
era, but it did a bad job for cases like the Harrier vs the Hornet,
which perform similar missions but have drastically different max
ranges. It also forced us into limiting CAS missions (even those flown
by long range aircraft like the A-10) to 50nm since helicopters could
commonly be fragged to them.

This should allow us to design campaigns without needing airfields to be
a max of ~50-100nm apart.
2021-07-17 16:34:13 -07:00
Dan Albert
96c7b87ac7 More adaptation for pydcs updates.
This is as much as we can do until pydcs actually adds the py.typed
file. Once that's added there are a few ugly monkey patching corners
that will just need `# type: ignore` for now, but we can't pre-add those
since we have mypy warning us about superfluous ignore comments.
2021-07-09 16:35:03 -07:00
Dan Albert
53f6a0b32b Fix some typing in preparation for pydcs types.
Not complete, but progress.
2021-07-08 23:23:05 -07:00
Chris Seagraves
5f5b5f69e3
asset reference links 😎 (#1363)
Adds urls to unit info pages that don't have data.
2021-06-30 15:04:06 -04:00
Khopa
7667a4f8c0 Merge branch 'develop' into helipads
# Conflicts:
#	game/game.py
#	resources/campaigns/golan_heights_lite.miz
2021-06-26 18:00:36 +02:00
Dan Albert
610a27c0e4 Copy initialization fix to AircraftType. 2021-06-23 12:50:07 -07:00
Mike Jones
08b7aff0d8 Add gunfighter flag to aircraft data files. 2021-06-22 14:35:28 -07:00
Mike Jones
a75688f89c Add patrol configuration to unit data files.
This allows altitude/speed of AEW&C and tankers to be configured.
2021-06-22 14:35:28 -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
Khopa
e56e765450 Helipad : fixed errors after merge of develop features. 2021-06-20 18:20:40 +02:00
Dan Albert
09704b6f37 Add a wrapper type for ground unit info. 2021-06-17 22:09:17 -07:00
Dan Albert
3c802e7d55 Fix unit info window. 2021-06-12 21:35:01 -07:00
Dan Albert
ba3cf4d2bd Put back all the radio data. 2021-06-12 20:56:24 -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