1549 Commits

Author SHA1 Message Date
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
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
Raffson
746eda70ee
In-Flight spawn: Minimum AGL altitude (#2302)
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2212
2022-07-06 18:56:39 +00:00
Raffson
ec425501cd Replace exceptions with 'if' statement 2022-07-06 11:32:22 -07:00
Raffson
2f97d948b8
Hotfix IADS (#2296)
fix for #2292
2022-07-04 16:02:22 +02:00
Raffson
13546d77e7
Return self from end_combat.
No behavioral change, just consistency with the other APIs.
2022-06-29 21:05:53 -07:00
Raffson
27dff95df5
Handle IADS updates properly.
This adds the missing events in the backend, and handles them properly in the front end.
2022-06-29 18:58:49 -07:00
Raffson
5f071a6138
Add missing mission types for IADS targets. 2022-06-29 18:54:34 -07:00
Raffson
8c2c353071
Clean up IADS exception handling. 2022-06-28 20:30:17 -07:00
Raffson
61488627a4
Push full control point information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:17:08 -07:00
Raffson
da90a40bc4
Push full front line information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:13:10 -07:00
Raffson
d578e763c0
Push full flight information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 14:09:51 -07:00
Raffson
289545e777
Push full unculled zone information in the event stream.
https://github.com/dcs-liberation/dcs_liberation/issues/2263
2022-06-25 21:09:07 +00:00
Raffson
7f05f6bc7d
Don't send updates for CP TGOs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2139
2022-06-16 18:08:13 -07:00
Raffson
ad7032064d
Add culling exclusion zones display to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2158
2022-06-14 18:57:04 -07:00
RndName
aa77cfe4b9 Add AirAssault and Airlift mission types with CTLD support
- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
2022-06-09 22:45:29 +02:00
RndName
de148dbb61 Add CTLD script and update JTACAutoLase config
- Added the CTLD script
- Removed the previous jtacautolase script
- Updated the configuration to allow the JTACAutoLase function to work
- Added the JTac name, freq and mod to the lua
2022-06-09 22:45:29 +02:00
Dan Albert
22c3d4ebc5 Add a CLI tool for viewing default loadouts. 2022-05-29 15:23:21 -07:00