mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Default start type for player flights (#303)
* Implemented a new option in settings: Default start type for Player flights. * Updated changelog. * Removed unnecessary country parameter. * Restore missing parameter * on_pilot_changed should emit pilots_changed in its finally block, otherwise the start-type isn't updated if you have a single client pilot which you switch to a non-client pilot. Also implemented other changes suggested by @Raffson, such as a more streamlined start_type QComboBox handling and moving the pilots_changed Signal to FlightRosterEditor. * Decouple Signal from QFlighStartType --------- Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
@@ -76,6 +76,12 @@ class PackageBuilder:
|
||||
member.assign_tgp_laser_code(
|
||||
self.laser_code_registry.alloc_laser_code()
|
||||
)
|
||||
# If this is a client flight, set the start_type again to match the configured default
|
||||
# https://github.com/dcs-liberation/dcs_liberation/issues/1567
|
||||
if flight.roster is not None and flight.roster.player_count > 0:
|
||||
flight.start_type = (
|
||||
squadron.coalition.game.settings.default_start_type_client
|
||||
)
|
||||
self.package.add_flight(flight)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user