319 Commits

Author SHA1 Message Date
Dan Albert
e09f53da8f Fix exceptions when no aircraft are selected.
This commonly happens during reset of the UI, but also happens when the
player is out of aircraft.
2021-06-19 20:26:33 -07:00
Dan Albert
9940dc8451 Fix type annotations for some UI code. 2021-06-19 15:03:39 -07:00
RndName
ad6ed21b6b Add EWR objects to predefined waypoints 2021-06-19 11:01:35 -07:00
Dan Albert
d3be732566 Fix tooltips for scuds/silkworms.
Same problem as the ground object menu, same cleanup required at some
point.
2021-06-18 18:14:20 -07:00
Dan Albert
09704b6f37 Add a wrapper type for ground unit info. 2021-06-17 22:09:17 -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
Dan Albert
40aa7734e1 Fix CAS commit range display.
CAS commits around the target, not its flight plan.
2021-06-09 21:51:26 -07:00
Dan Albert
a9dacf4a29 Fix engagement distance display. 2021-06-09 21:01:14 -07:00
Brock Greman
3ad51cafa8 Fixing display of "sunny" during clear conditions at night. 2021-06-09 02:16:05 -07:00
Dan Albert
d9c38a716c Move settings and stats to the toolbar.
https://github.com/dcs-liberation/dcs_liberation/issues/1146
2021-06-01 22:59:15 -07:00
Dan Albert
389f60786a Fix moving carriers. 2021-05-31 15:13:56 -07:00
Dan Albert
284f2bc323 Show runway status on the new map.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1105
2021-05-31 14:18:27 -07:00
Dan Albert
30f6220c3e Remove the old map. 2021-05-30 19:57:14 -07:00
Dan Albert
8c8814d07e Add culling display option to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-30 19:32:08 -07:00
Dan Albert
417fc3af5b Allow objects near missile launchers to be culled.
We want the scud to not be culled, but we should still cull things
nearby. Rather than making the scud the center of a 2.5km unculled zone,
just exclude missile objectives from culling.
2021-05-30 19:29:59 -07:00
Dan Albert
2218733da4 Add exclusion zone display to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-30 18:50:53 -07:00
Dan Albert
bc7faee880 Add navmesh map mode to the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-28 17:00:33 -07:00
Dan Albert
e9b5784d30 Update player slot advice for update UI.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-27 17:35:54 -07:00
Dan Albert
e2034b19e7 Update missing clients advice.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 20:41:22 -07:00
Dan Albert
49102e510d Disallow creating missions with missing pilots.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
9c2bad85d5 Show number of missing pilots in the UI.
https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
4147d2f684 Initial squadrons implementation.
Doesn't actually do anything yet, but squadrons are created for each
aircraft type and pilots will be created as needed to fill flights.

https://github.com/dcs-liberation/dcs_liberation/issues/276
2021-05-26 17:49:53 -07:00
Dan Albert
81ce7fbb62 Fix handling of empty polys in the new UI.
This was copied from the Qt map and tweaked, but the use cases are
slightly different so this needs to return an empty list for an empty
polygon instead of None.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1121
2021-05-25 19:19:45 -07:00
Dan Albert
de9651533f Load map.js explicitly from canvas.html.
Without this it's hard to get to map.js in the debug tools since Chrome
doesn't know about the anonymous js. Probably improves logging too.
2021-05-25 18:46:41 -07:00
Dan Albert
b7b3b35816 Make some waypoint types undraggable.
None of these (takeoff, landing, divert, bullseye, precise target
locations) can be usefully moved, so prevent it.
2021-05-24 16:45:21 -07:00
Dan Albert
d788b286aa Remove unused UI classes. 2021-05-23 13:03:18 -07:00
Dan Albert
ddd6e7d18f Improve detection of functional radar SAMs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1109
2021-05-23 13:01:44 -07:00
Dan Albert
eae0d6be94 Add threat zone drawing for the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/1097
2021-05-23 12:25:15 -07:00
Dan Albert
98e0be6be9 Revert "Correct radar detection."
We need this after all, but we do need to audit the list. Will follow
up with that fix.

https://github.com/dcs-liberation/dcs_liberation/issues/1109

This reverts commit f68935735d436385a0821e1168a8726c7dba8ebb.
2021-05-23 01:10:29 -07:00
Dan Albert
2df17c32cd Clean up aircraft selector. 2021-05-22 17:11:10 -07:00
Dan Albert
f68935735d Correct radar detection.
This list includede units without radars and also missed units with
radars. Stop curating the list and just query the unit type.
2021-05-22 15:36:56 -07:00
Dan Albert
c0ead4a484 Add icons for CPs. 2021-05-21 23:26:15 -07:00
Dan Albert
a382e74a89 Set up bullseye early, create waypoints.
Setting this up as part of the game makes it possible for us to show in
the UI.

https://github.com/dcs-liberation/dcs_liberation/issues/136
2021-05-20 18:29:35 -07:00
Dan Albert
af3b8a9902 Set up icons for TGOs.
These are just the old icons, but it's better than nothing.
2021-05-18 23:35:25 -07:00
Dan Albert
4e37666037 Clean up the category property of TGOs.
This really needs to be a proper type, but this is a start: create new
categories for the types of TGOs that are missing. This removes some
icon special cases.
2021-05-18 23:35:25 -07:00
Dan Albert
7dd379c5c3 Show active supply routes in the new UI. 2021-05-16 12:58:03 -07:00
Dan Albert
51d557524d Fix unit list for non-building TGOs.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1082
2021-05-15 22:05:14 -07:00
Dan Albert
5d9563304f Update commit boundaries after moving waypoints.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1084
2021-05-15 21:57:37 -07:00
Dan Albert
53cb68f82c Make waypoints draggable. 2021-05-15 16:21:03 -07:00
Dan Albert
06dedf51aa Improve CV waypointing UX. 2021-05-15 14:12:43 -07:00
Dan Albert
31fa2d866f Allow setting CV routes in the new UI.
This is a pretty janky system until we get add context menu support. For
now the destination is set by dragging the CV marker and cleared by
right clicking the destination marker. Once we have a context menu a
context action will begin setting the destination the way it did in the
old UI, and the destination marker will be draggable.
2021-05-15 03:35:35 -07:00
Dan Albert
4a096cb728 Use load instead of setHtml so paths resolve.
Without this we can't resolve local paths to files.
2021-05-15 01:21:25 -07:00
Dan Albert
8ec133830f Don't tell the UI about CP TGOs.
These are an implementation quirk, and passing them to the UI just means
that we put TGO pins on top of the CP, which makes the base menu
unopenable.

In the old UI we avoided this by not drawing anything that was
`for_airbase`, but now that we can zoom in further we're drawing base
defenses.
2021-05-15 00:10:05 -07:00
Dan Albert
bdb959d986 Draw patrol commit ranges in the new map. 2021-05-14 23:41:55 -07:00
Dan Albert
5adcfbd7bd Work around PySide2 bug in Property.
https://bugreports.qt.io/browse/PYSIDE-1426

For whatever reason this only shows up in packaged builds for us, and
also the recommended workaround of using a member property rather than a
decorated method does not work for us.

Until PySide2 5.15.3 (or later) is released, we need to use a named
signal for every property we expose.
2021-05-13 20:24:22 -07:00
Dan Albert
d73ceb374c Add front lines to new map UI.
Only shows an approximate front line. Still need support for "actual".
2021-05-13 01:49:35 -07:00
Dan Albert
3e01953a3a Supply route styling, line weight rebalancing. 2021-05-13 01:23:15 -07:00
Dan Albert
1a65b1affb Connect CP/TGO package fragging dialogs. 2021-05-13 01:05:15 -07:00
Dan Albert
dd75078019 Connect TGO dialogs. 2021-05-13 00:56:35 -07:00
Dan Albert
1ab205cb46 Add tooltips for TGOs. 2021-05-13 00:44:47 -07:00