1594 Commits

Author SHA1 Message Date
Dan Albert
83c084e476 Rename some scenery group variables for clarity.
These were perfectly obvious to me when I reviewed them, but not so much
months later when I need to make changes :)
2022-10-29 03:30:45 -07:00
Dan Albert
b482dbb031 Stop using shapely's almost_equals.
The docs say it was deprecated in favor of equals_exact with an explicit
tolerance.
2022-10-15 17:26:27 -07:00
Dan Albert
db7cd17c10 Send the new turn event from turn initialization.
We'll have to get smarter about this some day (since turn initialization
won't always exist), but for now we can avoid stale UI data by doing
what we've always done and refreshing the world on turn init.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2397.
2022-10-15 14:47:55 -07:00
Dan Albert
b63ecc59fb Add a dialog with bug report information. 2022-10-15 13:15:40 -07:00
Dan Albert
575cbf659c Add the git SHA to the build ID.
The build number is actually a pain to use. The git SHA is much more
useful.
2022-10-15 13:15:40 -07:00
Dan Albert
daf11c01c9 Add a comment explaining a wtf in alt estimation. 2022-10-09 23:07:39 -07:00
Dan Albert
207d56c2e9 Fix offshore targets for WW2 factions.
This makes the oil platform a required building so that all factions can
use it. Alternatively, we could pick a different offshore target for WW2
factions, or gracefully degrade to not generating these targets for WW2
factions. This approach seems to best match the designer's intent.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2322.
2022-10-09 19:06:29 -07:00
Dan Albert
9bd0be20a6 Don't allow helicopters at non-FARP FOBs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2378.
2022-10-09 17:46:11 -07:00
Dan Albert
2338c26392 Fix errors in log with 204 response endpoints.
FastAPI uses JsonResponse by default, which will convert the empty
response None to null. We need to forcibly use Response instead to
prevent that for No Content responses.

This didn't cause any observable issues but was polluting the log.
2022-10-07 14:42:03 -07:00
Dan Albert
469d8b7b12 Ignore loadouts with invalid weapons.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2320.
2022-09-27 20:23:32 -07:00
Dan Albert
1e12f1cc80 Revert "Add support for the AI-only F-14A."
AI behavior with the Heatblur F-14 has been fixed, so not needed any
more.

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

This reverts commit 7387c2ed8f1662686b9df63ad9e6dc4808eee8b0.
2022-09-27 19:43:02 -07:00
Dan Albert
4b4738c58f Load map icons directly from DCS.
If the user's DCS directory is not configured correctly this will
degrade by not showing an icon. Otherwise (and typically) we get nicer
looking icons for each theater, and we don't have to make these for each
new map.
2022-09-27 19:26:05 -07:00
Dan Albert
037ff85396 Remove unused data.
We get TACAN, ILS, and ATC data from pydcs now. The rest of this
manually curated data is unused.
2022-09-27 18:34:23 -07:00
Dan Albert
e0160ac876 Get TACAN and ILS data from pydcs. 2022-09-27 18:34:23 -07:00
Dan Albert
08abe36443 Fix TACAN beacon type import.
The dataclass contructor will not automatically convert the int in the
JSON file to the enum type, so our enum equivalence check was not
actually working, and could result in us re-allocating a TACAN channel
that was used by the map.

Fixing this problem surfaces a latent bug, where we can't actually treat
duplicate map TACAN channels as a bug because some channels are used by
multiple airports in PG.
2022-09-27 18:24:49 -07:00
Dan Albert
2461a66ad8 Number beacon types explicitly.
auto() starts at 1 for IntEnum, so this has always been wrong.
2022-09-27 18:24:49 -07:00
Dan Albert
9ab3430cc4 Move beacons module.
This isn't related to the missiongenerator, and importing this file from
some places (such as runway data) will cause a circular reference when
importing the rest of the missiongenerator package.
2022-09-27 18:24:49 -07:00
Dan Albert
a9348154af Alter the beacon format to be keyed by ID.
ID based lookup will be used for finding ILS and TACAN beacons from the
pydcs data.
2022-09-27 18:24:49 -07:00
Dan Albert
028576f208 Update pydcs.
This update includes expanded runway data that lets us clean up some
code. It also include beacon IDs for runways and airfields that will let
us get ILS and TACAN info from pydcs, but that's a bigger change that
I'll land separately.
2022-09-27 17:57:31 -07:00
MetalStormGhost
746bada0d4
Add fidelity for SIDC status of TGOs.
The new behavior is as follows for SAMs:

No damaged units: fully capable (green)
Damaged but still operational: present (no bar)
Not fully destroyed but inoperable: damaged (yellow)
Fully destroyed: destroyed (red)

And for all other TGOs:

Fully destroyed: destroyed (red)
Any missing units: damaged (yellow)
No missing units: present (no bar)

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2438.
2022-09-20 22:34:48 -07:00
Dan Albert
c89327586d Speed up computation of front line positions.
Needs to be properly measured, but this has made a multi-second speedup
in turn times.
2022-09-18 02:31:57 -07:00
Dan Albert
bbfe1657d6 Remove error handling for impossible case. 2022-09-18 02:31:57 -07:00
Dan Albert
c39a094d88 Remove unused behavior from frontline positioning. 2022-09-18 02:31:57 -07:00
Dan Albert
13f0dd8b01 Make FrontLineBounds actually a bounds container. 2022-09-18 02:31:57 -07:00
Dan Albert
ba7b3aa473 Clean up one frontline bounds user. 2022-09-18 02:31:57 -07:00
Dan Albert
08d4fe92d1 Remove junk from FrontLineConflictDescription. 2022-09-11 14:45:12 -07:00
Dan Albert
09786c6d29 Split air and ground conflict descriptions. 2022-09-11 14:37:28 -07:00
Dan Albert
1150750c09 Re-disable sending landmap data for Falklands.
Still too slow.
2022-09-11 14:24:01 -07:00
Dan Albert
b9b1f51957 Rename frontline vector to bounds, add a class.
This isn't actually the data that callers usually want. Most of the
callers just want the bounds. The heading and length are trivially
computed from that. Add a class to contain the result so it's easier to
refactor.
2022-09-11 14:23:31 -07:00
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