Avoids choosing random squadrons during air wing configuration so that livery overrides takes precedence by default for a given aircraft type, unless the campaign file specifies a specific squadron. Users can still add a squadron manually which will automatically set the correct livery if they use a squadron preset.
Resolves#52
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.
Users can now add and remove squadrons with specific buttons. this also allows new aircraft types to be added as well.
- rebased existing PR to develop
- reverted observable and changed to signals
- changed the general concept so that changes only affect the ui data model and not the game directly. Game will only be updated on apply
- removed unused code
- adopt to review comments
- allow user to choose a predefined squadron preset (also alow none value to use the random generator)
- Reuse the squadron defs from the default assigner in the AirWing class
- allow user to re-roll the squadron nickname (also added new ui icons for the button)
This allows campaign designers to forcibly place specific squadrons at
bases that they would not normally be assigned to, such as assigning
CV-only squadrons to the shore. The airframe itself must be compatible
with the location type, so A-10s still may not be assigned to carriers.
This change only applies to squadrons that are named explicitly. There's
no need for squadrons defined by type because a squadron will always be
generated to fit the need if no pre-defined squadron is found.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1621