mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add option to avoid delaying player flights.
Fixes https://github.com/Khopa/dcs_liberation/issues/227
This commit is contained in:
parent
dde74af6b5
commit
cdde75b517
@ -44,10 +44,11 @@ class Settings:
|
|||||||
for plugin in LuaPluginManager().getPlugins():
|
for plugin in LuaPluginManager().getPlugins():
|
||||||
plugin.setSettings(self)
|
plugin.setSettings(self)
|
||||||
|
|
||||||
|
|
||||||
# Cheating
|
# Cheating
|
||||||
self.show_red_ato = False
|
self.show_red_ato = False
|
||||||
|
|
||||||
|
self.never_delay_player_flights = False
|
||||||
|
|
||||||
def __setstate__(self, state) -> None:
|
def __setstate__(self, state) -> None:
|
||||||
# __setstate__ is called with the dict of the object being unpickled. We
|
# __setstate__ is called with the dict of the object being unpickled. We
|
||||||
# can provide save compatibility for new settings options (which
|
# can provide save compatibility for new settings options (which
|
||||||
|
|||||||
@ -1066,15 +1066,16 @@ class AircraftConflictGenerator:
|
|||||||
estimator = TotEstimator(package)
|
estimator = TotEstimator(package)
|
||||||
start_time = estimator.mission_start_time(flight)
|
start_time = estimator.mission_start_time(flight)
|
||||||
|
|
||||||
if start_time.total_seconds() > 0:
|
if flight.client_count and not self.settings.never_delay_player_flights:
|
||||||
if self.should_activate_late(flight):
|
if start_time.total_seconds() > 0:
|
||||||
# Late activation causes the aircraft to not be spawned until
|
if self.should_activate_late(flight):
|
||||||
# triggered.
|
# Late activation causes the aircraft to not be spawned
|
||||||
self.set_activation_time(flight, group, start_time)
|
# until triggered.
|
||||||
elif flight.start_type == "Cold":
|
self.set_activation_time(flight, group, start_time)
|
||||||
# Setting the start time causes the AI to wait until the
|
elif flight.start_type == "Cold":
|
||||||
# specified time to begin their startup sequence.
|
# Setting the start time causes the AI to wait until the
|
||||||
self.set_startup_time(flight, group, start_time)
|
# specified time to begin their startup sequence.
|
||||||
|
self.set_startup_time(flight, group, start_time)
|
||||||
|
|
||||||
# And setting *our* waypoint TOT causes the takeoff time to show up in
|
# And setting *our* waypoint TOT causes the takeoff time to show up in
|
||||||
# the player's kneeboard.
|
# the player's kneeboard.
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class QSettingsWindow(QDialog):
|
|||||||
self.generatorPage.setLayout(self.generatorLayout)
|
self.generatorPage.setLayout(self.generatorLayout)
|
||||||
|
|
||||||
self.gameplay = QGroupBox("Gameplay")
|
self.gameplay = QGroupBox("Gameplay")
|
||||||
self.gameplayLayout = QGridLayout();
|
self.gameplayLayout = QGridLayout()
|
||||||
self.gameplayLayout.setAlignment(Qt.AlignTop)
|
self.gameplayLayout.setAlignment(Qt.AlignTop)
|
||||||
self.gameplay.setLayout(self.gameplayLayout)
|
self.gameplay.setLayout(self.gameplayLayout)
|
||||||
|
|
||||||
@ -217,10 +217,23 @@ class QSettingsWindow(QDialog):
|
|||||||
self.generate_marks.setChecked(self.game.settings.generate_marks)
|
self.generate_marks.setChecked(self.game.settings.generate_marks)
|
||||||
self.generate_marks.toggled.connect(self.applySettings)
|
self.generate_marks.toggled.connect(self.applySettings)
|
||||||
|
|
||||||
|
self.never_delay_players = QCheckBox()
|
||||||
|
self.never_delay_players.setChecked(
|
||||||
|
self.game.settings.never_delay_player_flights)
|
||||||
|
self.never_delay_players.toggled.connect(self.applySettings)
|
||||||
|
self.never_delay_players.setToolTip(
|
||||||
|
"When checked, player flights with a delayed start time will be "
|
||||||
|
"spawned immediately. AI wingmen may begin startup immediately."
|
||||||
|
)
|
||||||
|
|
||||||
self.gameplayLayout.addWidget(QLabel("Use Supercarrier Module"), 0, 0)
|
self.gameplayLayout.addWidget(QLabel("Use Supercarrier Module"), 0, 0)
|
||||||
self.gameplayLayout.addWidget(self.supercarrier, 0, 1, Qt.AlignRight)
|
self.gameplayLayout.addWidget(self.supercarrier, 0, 1, Qt.AlignRight)
|
||||||
self.gameplayLayout.addWidget(QLabel("Put Objective Markers on Map"), 1, 0)
|
self.gameplayLayout.addWidget(QLabel("Put Objective Markers on Map"), 1, 0)
|
||||||
self.gameplayLayout.addWidget(self.generate_marks, 1, 1, Qt.AlignRight)
|
self.gameplayLayout.addWidget(self.generate_marks, 1, 1, Qt.AlignRight)
|
||||||
|
self.gameplayLayout.addWidget(
|
||||||
|
QLabel("Never delay player flights"), 2, 0)
|
||||||
|
self.gameplayLayout.addWidget(self.never_delay_players, 2, 1,
|
||||||
|
Qt.AlignRight)
|
||||||
|
|
||||||
self.performance = QGroupBox("Performance")
|
self.performance = QGroupBox("Performance")
|
||||||
self.performanceLayout = QGridLayout()
|
self.performanceLayout = QGridLayout()
|
||||||
@ -366,6 +379,7 @@ class QSettingsWindow(QDialog):
|
|||||||
self.game.settings.map_coalition_visibility = self.mapVisibiitySelection.currentData()
|
self.game.settings.map_coalition_visibility = self.mapVisibiitySelection.currentData()
|
||||||
self.game.settings.external_views_allowed = self.ext_views.isChecked()
|
self.game.settings.external_views_allowed = self.ext_views.isChecked()
|
||||||
self.game.settings.generate_marks = self.generate_marks.isChecked()
|
self.game.settings.generate_marks = self.generate_marks.isChecked()
|
||||||
|
self.game.settings.never_delay_player_flights = self.never_delay_players.isChecked()
|
||||||
|
|
||||||
self.game.settings.supercarrier = self.supercarrier.isChecked()
|
self.game.settings.supercarrier = self.supercarrier.isChecked()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user