This is needed fairly often, and we have a lot of Game being passed
around to ControlPoint methods specifically to support this. Just store
the owning Coalition directly in the ControlPoint to clean up. I haven't
cleaned up *every* API here, but did that aircraft allocations as an
example.
Since the theater commander runs once per campaign action, missions that
do not have aircraft available may be checked more than once a turn.
Without deduping requests this can lead to cases where the AI buys
dozens of tankers on turn 0.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1470
After completing the new game wizard but before initializing turn 0,
open a dialog to allow the player to customize their air wing. With this
they can remove squadrons from the game, rename them, add players, or
change allowed mission types. *Adding* squadrons is not currently
supported, nor is changing the squadron's livery (the data in pydcs is
an arbitrary class hierarchy that can't be safely indexed by country).
This only applies to the blue air wing for now.
Future improvements:
* Add squadron button.
* Collapse disable squadrons to declutter?
* Tabs on the side like the settings dialog to group by aircraft type.
* Top tab bar to switch between red and blue air wings.
Much of the UI was using the old budget which wasn't removed from Game
like it should have been when Coaltion was introduced. The UI displayed
(and in some cases pulled from) the starting budget rather than the real
budget.
This improves the AI behavior by choosing the stances non-randomly:
* Breakthrough will be used if the base is expected to be capturable and
the coalition outnumbers the enemy by 20%.
* Elimination will be used if the coalition has at least as many units
as the enemy.
* Defensive will be used if the coalition has at least half as many
units as the enemy.
* Retreat will be used if the coalition is significantly outnumbers.
This also exposes the option to the player.
- added information about the role of the aa site
- moved handling of ground name from tgo to the sam generator to make the tgo cleaner
- adjusted the skynet-config lua to the changes
Mod selection is now done via checkbox in the new game wizard.
The MB-339 is being turned into a paid module, and the free mod no longer works, so it's been removed.
This is a bit of an ugly hack but it's effectively what we would need
anyway. We could clean up the global replacement by making the name
generator _only_ a property of Game and plumbing it through to a large
number of places. Could maybe also use `__getstate__` and `__setstate__`
tricks to save `naming.namegen` to the file even without making it truly
a part of Game.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1247
The AI purchaser will aim to have a 50/50 ground/air investment mix.
This allows it to overspend on one category if significant losses were
taken the previous turn.
The total purchase amount is still limited, so if the bases are full
when only 10% of the investment is in ground units, the full budget for
the turn will still go to air.
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.
Without this, *this turn's* urgent requests are lower priority than last
turn's stretch goals. The requests are remade every turn so we lose
nothing by removing this.
Bug was introduced by f69450e2ae24df81d42b1ebc63d8375731154612, so this
doesn't affect 2.5.
The priority list was guiding the purchase decision which largely meant
that this was working correctly, but there were suboptimal cases where
the list was being taken in FIFO order by purchased type. This fixes the
search to be locally optimal, although this does still mean that a worse
but closer aircraft will be chosen over a better but slightly farther
away aircraft. We'd need to have a quality vs distance rating to do
better.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/755
A was intended to be the blue point and B was intended to be the red
point. Make this a part of the name so that's clear, and clean up
related code to keep that reliable.