1365 Commits

Author SHA1 Message Date
Dan Albert
e53a487948 Rename confusing front line methods/members. 2022-09-11 14:23:31 -07:00
Dan Albert
cd19f2ab21 Use simplified Falklands exclusion zones.
This is significantly faster on my machine. Checking it in (and
re-enabling the UI layer) to see how it affects slower machines.
2022-09-11 11:59:30 -07:00
Dan Albert
124e2d5e10 Avoid sending landmap data for Falklands.
This is too damn slow. A possible solution is explained in the comment,
but we shouldn't tackle that until we're sure the rest of the game runs
okay.
2022-09-10 16:31:47 -07:00
Dan Albert
bb2ceb9968 Log planning times per-task. 2022-09-10 16:31:47 -07:00
Dan Albert
ddd203a79f Add additional information to multi-event tracing.
Show the number of times the event was logged as well as an average run-
time.
2022-09-10 16:31:47 -07:00
Dan Albert
017a673211 Bump the campaign version for the Falklands.
Support isn't done yet, but the things that would affect campaign design
are done.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-09 15:41:20 -07:00
Dan Albert
db4672f4af Fix mistake in join point placement.
This looks like it was just a typo. We want to join as late as possible
to allow flights coming from other airfields to take the best route to
the target that is safe, rather than joining as early as possible, which
isn't useful since pre-join and post-split are supposed to be safe areas
anyway.
2022-09-09 15:12:19 -07:00
Dan Albert
7a230c90f0 Add a GIS shapefile to landmap importer. 2022-09-09 15:05:50 -07:00
Dan Albert
f15c2ada1b Fix DaytimeMap error with disabled night missions.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2429
2022-09-09 13:01:10 -07:00
Dan Albert
fa7dbc587a Use ATC radio info from pydcs. 2022-09-08 20:26:25 -07:00
Dan Albert
df85d2627d Add a data linter with Markdown output.
Wildly incomplete, but it's a start.
2022-09-08 15:47:56 -07:00
Dan Albert
229008577b 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-08 15:47:56 -07:00
Dan Albert
a679c19af1 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-08 13:21:26 -07:00
Dan Albert
1881fecc83 Clean up ConflictTheater constructor.
Now that all theaters are defined in YAML, we can lose some of the mess
in this class.
2022-09-07 16:52:48 -07:00
Dan Albert
49001bb558 Migrate Falklands to YAML.
All theaters are now moddable.
2022-09-07 16:52:48 -07:00
Dan Albert
18f1048dc4 Migrate The Channel to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
0afc4d2af6 Migrate Normandy to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
0e62e50b1c Migrate Nevada to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
07960bd65a Migrate Marianas to YAML. 2022-09-07 16:52:48 -07:00
Dan Albert
647529f35f Migrate Syria to yaml. 2022-09-07 16:52:48 -07:00
Dan Albert
90e9e3ecd6 Port Persian Gulf to yaml. 2022-09-07 16:52:48 -07:00
Dan Albert
87f88f4c50 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-07 16:06:20 -07:00
Dan Albert
7e4f81d541 Add a Falklands theater.
Not at all done yet, but loads.

https://github.com/dcs-liberation/dcs_liberation/issues/2242
2022-09-07 14:39:47 -07:00
Dan Albert
080782e011 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-07 14:22:26 -07:00
Dan Albert
1717bc98cb Move logging_config to game.
This isn't unique to the UI, the UI is just the current caller.
2022-09-03 14:12:21 -07:00
Dan Albert
0c5e548892 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 02:39:38 -07:00
Dan Albert
f4ecfe6da9 Un-dataclass Package.
This hasn't been very dataclass-like for a long time.
2022-09-02 23:13:58 -07:00
Dan Albert
71f68b3103 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-02 23:09:05 -07:00
Dan Albert
d8486568b7 Remove unused property from Flight. 2022-09-02 21:13:23 -07:00
Dan Albert
452848fd2a 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-02 21:13:23 -07:00
Dan Albert
c630226e2d 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-01 01:13:01 -07:00
Dan Albert
82939a446b 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-01 01:13:01 -07:00
Dan Albert
f49833646d 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-01 00:52:51 -07:00
Dan Albert
c803a49134 Remove unused Package field. 2022-08-21 22:19:37 -07:00
Dan Albert
236812cc81 Remove superfluous constructors. 2022-08-21 22:19:37 -07:00
Dan Albert
a101527906 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.
2022-08-21 19:37:20 -07:00
Dan Albert
7a45391c22 Simplify IBuilder constructor.
We have access to the theater via the flight's departure airbase now.
2022-08-21 19:37:20 -07:00
Dan Albert
4521053804 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.
2022-08-21 19:37:20 -07:00
Dan Albert
3dd0e4a66f Clean up silly some exception handling. 2022-08-21 19:37:20 -07:00
Dan Albert
9cd511da3d Clean some cruft out of FlightPlanBuilder. 2022-08-21 19:37:20 -07:00
Dan Albert
6bbe583e82 Track theater in ControlPoint.
Simplifies finding the owning theater of a control point. Not used yet.
2022-08-21 19:37:20 -07:00
Raffson
38ff691eac Fix squadron reuse.
This was never marking the original squadron as claimed. Just update the
object rather than cloning it.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2011

(cherry picked from commit 6e555167e068a727ed0e104be81615965437de45)
2022-08-14 18:07:56 -07: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
Raffson
9823f7b96f
Push full navmesh/threatzone info in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2253
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 13:27:06 -07:00
Raffson
a20b95bb26
Push full TGO information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-07-06 12:41:58 -07:00