Remove fallback for old non-convoy behavior.

This commit is contained in:
Dan Albert
2021-05-18 19:21:07 -07:00
parent ae57e4da83
commit f4b64370bb
6 changed files with 3 additions and 75 deletions

View File

@@ -199,7 +199,6 @@ def create_game(
automate_runway_repair=auto_procurement,
automate_front_line_reinforcements=auto_procurement,
automate_aircraft_reinforcements=auto_procurement,
enable_new_ground_unit_recruitment=True,
enable_frontline_cheats=cheats,
enable_base_capture_cheat=cheats,
),

View File

@@ -1,13 +1,13 @@
from __future__ import unicode_literals
import logging
from typing import List, Optional
from datetime import timedelta
from typing import List
from PySide2 import QtGui, QtWidgets
from PySide2.QtCore import QItemSelectionModel, QPoint, Qt, QDate
from PySide2.QtWidgets import QVBoxLayout, QTextEdit, QLabel
from jinja2 import Environment, FileSystemLoader, select_autoescape
from datetime import timedelta
from game import db
from game.settings import Settings
@@ -19,9 +19,6 @@ from qt_ui.windows.newgame.QCampaignList import (
QCampaignList,
load_campaigns,
)
from qt_ui.windows.settings.QSettingsWindow import (
NEW_GROUND_UNIT_RECRUITMENT_BEHAVIOR_LABEL,
)
jinja_env = Environment(
loader=FileSystemLoader("resources/ui/templates"),
@@ -91,9 +88,6 @@ class NewGameWizard(QtWidgets.QWizard):
),
automate_aircraft_reinforcements=self.field("automate_aircraft_purchases"),
supercarrier=self.field("supercarrier"),
enable_new_ground_unit_recruitment=self.field(
"new_ground_unit_recruitment"
),
)
generator_settings = GeneratorSettings(
start_date=start_date,
@@ -509,21 +503,6 @@ class DifficultyAndAutomationOptions(QtWidgets.QWizardPage):
self.registerField("automate_aircraft_purchases", aircraft)
assist_layout.addWidget(aircraft, 2, 1, Qt.AlignRight)
flags_group = QtWidgets.QGroupBox("Feature flags")
layout.addWidget(flags_group)
flags_layout = QtWidgets.QGridLayout()
flags_group.setLayout(flags_layout)
new_ground_unit_recruitment_label = QtWidgets.QLabel(
NEW_GROUND_UNIT_RECRUITMENT_BEHAVIOR_LABEL
)
new_ground_unit_recruitment_label.setOpenExternalLinks(True)
flags_layout.addWidget(new_ground_unit_recruitment_label, 0, 0)
new_ground_unit_recruitment = QtWidgets.QCheckBox()
new_ground_unit_recruitment.setChecked(True)
self.registerField("new_ground_unit_recruitment", new_ground_unit_recruitment)
flags_layout.addWidget(new_ground_unit_recruitment, 0, 1, Qt.AlignRight)
self.setLayout(layout)

View File

@@ -17,7 +17,6 @@ from PySide2.QtWidgets import (
QStackedLayout,
QVBoxLayout,
QWidget,
QSlider,
)
from dcs.forcedoptions import ForcedOptions
@@ -78,17 +77,6 @@ class CheatSettingsBox(QGroupBox):
START_TYPE_TOOLTIP = "Selects the start type used for AI aircraft."
NEW_GROUND_UNIT_RECRUITMENT_TOOLTIP = (
"If checked, the new ground unit recruitment behavior will be used. Ground "
"units may only be purchased at factories or off-map spawns and must "
"travel to the front line."
)
NEW_GROUND_UNIT_RECRUITMENT_BEHAVIOR_LABEL = (
"Enable new ground unit recruitment behavior<br />"
'<a href="https://github.com/dcs-liberation/dcs_liberation/issues/986">'
'<span style="color:#FFFFFF;">More information.</span></a>'
)
class StartTypeComboBox(QComboBox):
def __init__(self, settings: Settings) -> None:
@@ -379,27 +367,6 @@ class QSettingsWindow(QDialog):
general_layout.addWidget(old_awac_label, 1, 0)
general_layout.addWidget(old_awac, 1, 1, Qt.AlignRight)
def set_new_ground_unit_recruitment(value: bool) -> None:
self.game.settings.enable_new_ground_unit_recruitment = value
new_ground_unit_recruitment_behavior_label = QLabel(
NEW_GROUND_UNIT_RECRUITMENT_BEHAVIOR_LABEL
)
new_ground_unit_recruitment_behavior_label.setToolTip(
NEW_GROUND_UNIT_RECRUITMENT_TOOLTIP
)
new_ground_unit_recruitment_behavior_label.setOpenExternalLinks(True)
new_ground_unit_recruitment = QCheckBox()
new_ground_unit_recruitment.setToolTip(NEW_GROUND_UNIT_RECRUITMENT_TOOLTIP)
new_ground_unit_recruitment.setChecked(
self.game.settings.enable_new_ground_unit_recruitment
)
new_ground_unit_recruitment.toggled.connect(set_new_ground_unit_recruitment)
general_layout.addWidget(new_ground_unit_recruitment_behavior_label, 2, 0)
general_layout.addWidget(new_ground_unit_recruitment, 2, 1, Qt.AlignRight)
automation = QGroupBox("HQ Automation")
campaign_layout.addWidget(automation)