1567 Commits

Author SHA1 Message Date
Dan Albert
b01895e2dd
Use ATC radio info from pydcs. 2022-09-17 14:35:07 +02:00
Dan Albert
cc9174cba4
Add a data linter with Markdown output.
Wildly incomplete, but it's a start.
2022-09-17 14:35:06 +02:00
Dan Albert
46a3aa9540
Load airfield data when called for airport.
The for_theater method is always called before for_airport is during
normal gameplay, but I'm writing a linter to show missing airfield data
that calls for_airport first.
2022-09-17 14:35:06 +02:00
Dan Albert
a3d58daa3c
Be tolerant of theaters with no airfield data.
This shouldn't be the case for anything shipped, but is typical when new
theaters are still being developed.

We could potentially add an `in_progress` flag to the theater definition
to make this only optionally tolerant, but since that code path would
rarely be exercised it's just likely to bitrot. This data isn't critical
to mission generation anyway, so this is fine. What we should do is add
some linters that document all the data that is missing though (and
ideally publish that to our docs).
2022-09-17 14:35:05 +02:00
Dan Albert
87375eb4b1
Clean up ConflictTheater constructor.
Now that all theaters are defined in YAML, we can lose some of the mess
in this class.
2022-09-17 14:35:05 +02:00
Dan Albert
c43d84bdae
Migrate Falklands to YAML.
All theaters are now moddable.
2022-09-17 14:35:04 +02:00
Dan Albert
ac0f24f94f
Migrate The Channel to YAML. 2022-09-17 14:35:04 +02:00
Dan Albert
1c66f18e3f
Migrate Normandy to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
ede1a8c567
Migrate Nevada to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
f08955ae53
Migrate Marianas to YAML. 2022-09-17 14:35:03 +02:00
Dan Albert
06652cd063
Migrate Syria to yaml. 2022-09-17 14:35:02 +02:00
Dan Albert
f3f067830f
Port Persian Gulf to yaml. 2022-09-17 14:35:02 +02:00
Dan Albert
401a0ae557
Make theater properties moddable.
Only the Caucasus has been migrated so far. Will follow up with the
others, and also will be adding beacon/airport data to this.
2022-09-17 14:35:01 +02:00
Dan Albert
c4fe3a31a7
Add a Falklands theater.
Not at all done yet, but loads.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-17 14:35:01 +02:00
Dan Albert
2dba0f07ad
Support polygons with holes in the API.
We don't have any of these yet because our landmaps suck, but we'll need
holes in the sea zones to mask islands correctly.
2022-09-17 14:35:00 +02:00
Raffson
15ed0e733a
Don't generate CP triggers for carriers 2022-09-17 14:33:02 +02:00
MetalStormGhost
da04abf53a
Fix zombie carrier
Fixed (zombie) carrier killed in state.json but always respawning in-game, issue #2405. GenericCarrierGenerator.generate() will now generate the ship group with an array that only contains alive ship units, just like GroundObjectGenerator.generate() has previously done.

Carrier groups will now also show up as destroyed/damaged on the map when the carrier is sunk.
2022-09-17 14:33:01 +02:00
MetalStormGhost
d08adc2842
Add new performance option: Maximum frontline unit supply per CP 2022-09-04 14:06:07 +02:00
Raffson
87c75aa61e
Import DaytimeMap locally
Causes an exception otherwise, and at the same time a perfect example why a strongly typed language would be better in this case, because this would've been caught by a compiler!
2022-09-04 12:26:09 +02:00
Dan Albert
1d5a410bc5
Move logging_config to game.
This isn't unique to the UI, the UI is just the current caller.
2022-09-04 12:07:06 +02:00
MetalStormGhost
e1bf0ed47a
Added a new setting: "Maximum frontline length (km)"
It replaces the FRONTLINE_LENGTH constant, which was used previously. The default setting for the frontline length has been set to match the FRONTLINE_LENGTH value (80 km), but I feel the default should be a bit shorter. Discussion on the topic would be welcome.
2022-09-03 22:14:56 +02:00
Dan Albert
96a5a8e2ef
Move FlightPlan ownership from Flight to IBuilder.
The next step in splitting up the layout and scheduling phases. This
facilitates splitting flights into two classes where one has a full
flight plan, but one used in the earlier phases of planning has only a
layout. Layout-only flights won't need TOTs, which will make them much
easier to work with once we've migrated TOTs from timedeltas to
datetimes.

Layout-only flights of course aren't actually usable, but it lets us
avoid dealing with the current sim time until we're certain the Flight
will even survive planning.

I'm not actually sure if we'll be able to split the two phases any more,
but this ends up being a nice cleanup anyway.
2022-09-03 19:13:23 +02:00
Dan Albert
71f9c6c28c
Un-dataclass Package.
This hasn't been very dataclass-like for a long time.
2022-09-03 19:13:22 +02:00
Dan Albert
4eadce7563
Simplify flight startup time calls.
We can always estimate a startup time now. Remove the nullability from
the result, cleanup the callsites, and eliminate
TotEstimator.mission_start_time since it no longer does anything useful.
2022-09-03 19:13:22 +02:00
Dan Albert
1ea6260054
Remove unused property from Flight. 2022-09-03 19:13:22 +02:00
Dan Albert
07632e2705
Make TOT waypoints non-optional for flight plans.
Flights without a meaningful TOT make the code around startup time (and
other scheduling behaviors) unnecessarily complicated because they have
to handle unpredictable flight plans. We can simplify this by requiring
that all flight plans have a waypoint associated with their TOT. For
custom flight plans, we can just fall back to the takeoff waypoint. For
RTB flight plans (which are only synthetic flight plans injected for
aborted flights), we can use the abort point.

This also means that all flight plans now have, at the very least, a
departure waypoint. Deleting this waypoint is invalid even for custom
flights, so that's no a problem.
2022-09-03 19:13:21 +02:00
Dan Albert
c5b50ceeae
Add campaign property for campaign start time.
This field is optional. Omitting the field (or using only a date instead
of a full timestamp) will use the old behavior of picking a random
daylight hour to start the campaign.

This doesn't include any UI in the new game wizard yet. This is only a
campaign yaml option.

https://github.com/dcs-liberation/dcs_liberation/issues/2400
2022-09-03 19:13:20 +02:00
Dan Albert
b6da2d8e62
Turn the daytime map in theater into a real type.
No (intended) user visible effects, but this is the groundwork that will
support https://github.com/dcs-liberation/dcs_liberation/issues/2400.
2022-09-03 19:12:33 +02:00
Dan Albert
a8debc3927
Don't advance the clock between turn 0 and turn 1.
Turn 0 isn't a real thing, it's just a game play affordance that allows
players to set up their initial conditions.
2022-09-03 19:12:33 +02:00
Raffson
48938fc529
Dan's massive refactor
Squashing 8 commits by DanAlbert:

- Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.

- Clean some cruft out of FlightPlanBuilder.
- Clean up silly some exception handling.
- Move FlightPlan instantiation into the builder.
I'm working on moving the builder to be owned by the Flight, which will simplify callers that need to create (or recreate) flight plans for a flight.

- Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.

- Move FlightPlan creation into Flight.
For now this is just a callsite cleanup. Later, this will make it easier
to separate unscheduled and scheduled flights into different classes without complicating the layout/scheduling.

- Remove superfluous constructors.
- Remove unused Package field.
2022-08-24 19:25:30 +02:00
Raffson
1f4cca329e
Vary number of aircraft for main task
The following tasks plan according to the number of targets left:
- BAI
- ANTISHIP
- DEAD
- STRIKE

Other tasks use a random value between 2 and 4.
2022-08-15 01:20:14 +02:00
Raffson
a14bf6d1ba
Make campaign's yaml suffix case-insensitive 2022-08-15 01:09:41 +02:00
Raffson
4722a558b8
Scrub unplannable missions
Prevents generating support flights like TARCAP when the a main
task is unplannable, e.g. an Air Assault.
2022-08-15 00:49:00 +02:00
Raffson
3966e03ea5
Don't skip QuadPoint trigger zones
Added code to deduce a radius given a QuadPoint trigger zone
2022-08-14 19:22:25 +02:00
Raffson
43e9a66afb
Advanced IADS: recalculate connections if needed 2022-08-14 15:29:11 +02:00
Raffson
244415b721
PBO: IADS
Finishes/Fixes part of advanced IADS in back-end
2022-08-14 15:26:40 +02:00
Raffson
6e555167e0
Fix #2011
I tracked down the problem to `dataclass.replace` because it generates a new object.
Turns out the check for "claimed" squadrons is somehow linked to the original object.
Simply overwriting the original object fixes the problem.
2022-08-14 14:45:27 +02:00
Raffson
647032ca48
Skip & Log incompatible loadouts
Solution exists in using the 'get' method
of the "Weapons dictionary", and
subsequentially guarding against
None. Aside from that I created
a method to validate a payload,
which uses this None value to
determine validity.
2022-08-14 14:45:26 +02:00
Raffson
a8d6f90f55
Add livery-selector in AirWingConfigurationDialog
Resolves #1861
2022-08-14 14:45:26 +02:00
Raffson
e9917ba00e
Front-end 'push' updates for SupplyRoutes 2022-08-14 14:45:25 +02:00
Raffson
74142536e9
#978 2022-08-14 14:45:25 +02:00
Raffson
8dab64f4c3
Support for Su-30 mod 2022-08-14 14:45:25 +02:00
Raffson
0913b506f4
Support for F-15D 'Baz' mod 2022-08-14 14:44:50 +02:00
Raffson
9fbc2d2c58
Update mods after pydcs update 2022-08-14 14:35:36 +02:00
Dan Albert
60f772081c Update pydcs. 2022-08-10 19:17:06 -07:00
SnappyComebacks
2bd39bd9f5
Changed garrison terminology to battle position. (#2352) 2022-07-26 22:41:45 -06:00
Tom Wabinski
35fc43cda0
Refactor unclear conditional. 2022-07-25 23:51:26 -07:00
Tom Wabinski
71311eb157
Fix inverted pilot leveling flag. 2022-07-25 22:54:20 -07:00
Raffson
02c52f0801
Support for Mirage F1.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2335.

Co-authored-by: Starfire13 <72491792+Starfire13@users.noreply.github.com>
Co-authored-by: Jake Lewis <jake@logdyn.com>
Co-authored-by: Dan Albert <dan@gingerhq.net>
2022-07-25 16:11:36 +00:00
SnappyComebacks
cbb81bbba7
Update most python dependencies (#2308)
* Change routes to return HTTP.OK instead of HTTP.NO_CONTENT.
2022-07-10 16:54:58 -06:00