mirror of
https://github.com/spencershepard/RotorOps.git
synced 2025-11-10 15:45:30 +00:00
Merge pull request #27 from spencershepard/feature/online
Apache update
This commit is contained in:
commit
e8dbd54475
Binary file not shown.
@ -2,18 +2,26 @@ import math
|
||||
import sys
|
||||
import os
|
||||
import dcs
|
||||
from PyQt5.QtCore import QCoreApplication
|
||||
from PyQt5.uic.properties import QtCore
|
||||
|
||||
import RotorOpsMission as ROps
|
||||
import RotorOpsUtils
|
||||
import RotorOpsUnits
|
||||
import logging
|
||||
import json
|
||||
import yaml
|
||||
import requests
|
||||
|
||||
from PyQt5.QtWidgets import (
|
||||
QApplication, QDialog, QMainWindow, QMessageBox
|
||||
)
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5 import Qt, QtCore
|
||||
from MissionGeneratorUI import Ui_MainWindow
|
||||
|
||||
import qtmodern.styles
|
||||
import qtmodern.windows
|
||||
|
||||
#Setup logfile and exception handler
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -21,6 +29,30 @@ logging.basicConfig(filename='generator.log', encoding='utf-8', level=logging.DE
|
||||
handler = logging.StreamHandler(stream=sys.stdout)
|
||||
logger.addHandler(handler)
|
||||
|
||||
user_files_url = 'https://dcs-helicopters.com/user-files/'
|
||||
|
||||
class directories:
|
||||
home_dir = scenarios = forces = scripts = sound = output = assets = imports = None
|
||||
|
||||
@classmethod
|
||||
def find(cls):
|
||||
current_dir = os.getcwd()
|
||||
if os.path.basename(os.getcwd()) == "Generator":
|
||||
os.chdir("..")
|
||||
cls.home_dir = os.getcwd()
|
||||
cls.scenarios = cls.home_dir + "\Generator\Scenarios"
|
||||
cls.forces = cls.home_dir + "\Generator\Forces"
|
||||
cls.scripts = cls.home_dir
|
||||
cls.sound = cls.home_dir + "\sound\embedded"
|
||||
cls.output = cls.home_dir + "\Generator\Output"
|
||||
cls.assets = cls.home_dir + "\Generator/assets"
|
||||
cls.imports = cls.home_dir + "\Generator\Imports"
|
||||
os.chdir(current_dir)
|
||||
|
||||
|
||||
directories.find()
|
||||
|
||||
|
||||
def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
if issubclass(exc_type, KeyboardInterrupt): #example of handling error subclasses
|
||||
sys.__excepthook__(exc_type, exc_value, exc_traceback)
|
||||
@ -36,8 +68,8 @@ def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
sys.excepthook = handle_exception
|
||||
|
||||
|
||||
maj_version = 0
|
||||
minor_version = 6
|
||||
maj_version = 1
|
||||
minor_version = 1
|
||||
version_string = str(maj_version) + "." + str(minor_version)
|
||||
scenarios = []
|
||||
red_forces_files = []
|
||||
@ -55,8 +87,8 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
|
||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||
logger.info('running in a PyInstaller bundle')
|
||||
home_dir = os.getcwd()
|
||||
os.chdir(home_dir + "/Generator")
|
||||
qtmodern.styles._STYLESHEET = directories.assets + '/style.qss'
|
||||
qtmodern.windows._FL_STYLESHEET = directories.assets + '/frameless.qss'
|
||||
else:
|
||||
logger.info('running in a normal Python process')
|
||||
|
||||
@ -69,9 +101,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.populateForces("blue", self.blueforces_comboBox, blue_forces_files)
|
||||
self.populateSlotSelection()
|
||||
|
||||
self.blue_forces_label.setText(attackers_text)
|
||||
self.red_forces_label.setText(defenders_text)
|
||||
self.background_label.setPixmap(QtGui.QPixmap(self.m.assets_dir + "/background.PNG"))
|
||||
# self.blue_forces_label.setText(attackers_text)
|
||||
# self.red_forces_label.setText(defenders_text)
|
||||
self.background_label.setPixmap(QtGui.QPixmap(directories.assets + "/rotorops-dkgray.png"))
|
||||
self.statusbar.setStyleSheet(
|
||||
"QStatusBar{padding-left:5px;color:black;font-weight:bold;}")
|
||||
|
||||
@ -82,9 +114,11 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.action_generateMission.triggered.connect(self.generateMissionAction)
|
||||
self.action_scenarioSelected.triggered.connect(self.scenarioChanged)
|
||||
self.action_defensiveModeChanged.triggered.connect(self.defensiveModeChanged)
|
||||
self.action_nextScenario.triggered.connect(self.nextScenario)
|
||||
self.action_prevScenario.triggered.connect(self.prevScenario)
|
||||
|
||||
def populateScenarios(self):
|
||||
os.chdir(self.m.scenarios_dir)
|
||||
os.chdir(directories.scenarios)
|
||||
path = os.getcwd()
|
||||
dir_list = os.listdir(path)
|
||||
logger.info("Looking for mission files in " + path)
|
||||
@ -95,8 +129,8 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.scenario_comboBox.addItem(filename.removesuffix('.miz'))
|
||||
|
||||
def populateForces(self, side, combobox, files_list):
|
||||
os.chdir(self.m.home_dir)
|
||||
os.chdir(self.m.forces_dir + "/" + side)
|
||||
os.chdir(directories.home_dir)
|
||||
os.chdir(directories.forces + "/" + side)
|
||||
path = os.getcwd()
|
||||
dir_list = os.listdir(path)
|
||||
logger.info("Looking for " + side + " Forces files in '" + path)
|
||||
@ -113,15 +147,16 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.slot_template_comboBox.addItem("None")
|
||||
|
||||
def defensiveModeChanged(self):
|
||||
if self.defense_checkBox.isChecked():
|
||||
self.red_forces_label.setText(attackers_text)
|
||||
self.blue_forces_label.setText(defenders_text)
|
||||
else:
|
||||
self.red_forces_label.setText(defenders_text)
|
||||
self.blue_forces_label.setText(attackers_text)
|
||||
# if self.defense_checkBox.isChecked():
|
||||
# self.red_forces_label.setText(attackers_text)
|
||||
# self.blue_forces_label.setText(defenders_text)
|
||||
# else:
|
||||
# self.red_forces_label.setText(defenders_text)
|
||||
# self.blue_forces_label.setText(attackers_text)
|
||||
|
||||
self.applyScenarioConfig()
|
||||
|
||||
|
||||
def loadScenarioConfig(self, filename):
|
||||
try:
|
||||
j = open(filename)
|
||||
@ -165,7 +200,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
|
||||
|
||||
def scenarioChanged(self):
|
||||
os.chdir(self.m.scenarios_dir)
|
||||
os.chdir(directories.scenarios)
|
||||
filename = scenarios[self.scenario_comboBox.currentIndex()]
|
||||
source_mission = dcs.mission.Mission()
|
||||
source_mission.load_file(filename)
|
||||
@ -228,12 +263,22 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
+ source_mission.description_text()
|
||||
)
|
||||
|
||||
path = directories.scenarios + "/" + filename.removesuffix(".miz") + ".jpg"
|
||||
if os.path.isfile(path):
|
||||
self.missionImage.setPixmap(QtGui.QPixmap(path))
|
||||
else:
|
||||
self.missionImage.setPixmap(QtGui.QPixmap(directories.assets + "/briefing1.png"))
|
||||
|
||||
|
||||
|
||||
|
||||
def generateMissionAction(self):
|
||||
red_forces_filename = red_forces_files[self.redforces_comboBox.currentIndex()]
|
||||
blue_forces_filename = blue_forces_files[self.blueforces_comboBox.currentIndex()]
|
||||
scenario_filename = scenarios[self.scenario_comboBox.currentIndex()]
|
||||
source = "offline"
|
||||
data = {
|
||||
"source": source,
|
||||
"scenario_filename": scenario_filename,
|
||||
"red_forces_filename": red_forces_filename,
|
||||
"blue_forces_filename": blue_forces_filename,
|
||||
@ -258,7 +303,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
"transport_drop_qty": self.troop_drop_spinBox.value(),
|
||||
"smoke_pickup_zones": self.smoke_pickup_zone_checkBox.isChecked(),
|
||||
}
|
||||
os.chdir(self.m.home_dir + '/Generator')
|
||||
os.chdir(directories.home_dir + '/Generator')
|
||||
n = ROps.RotorOpsMission()
|
||||
result = n.generateMission(data)
|
||||
logger.info("Generating mission with options:")
|
||||
@ -274,7 +319,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
msg = QMessageBox()
|
||||
msg.setWindowTitle("Mission Generated")
|
||||
msg.setText("Awesome, your mission is ready! It's located in this directory: \n" +
|
||||
self.m.output_dir + "\n" +
|
||||
directories.output + "\n" +
|
||||
"\n" +
|
||||
"Next, you should use the DCS Mission Editor to fine tune unit placements. Don't be afraid to edit the missions that this generator produces. \n" +
|
||||
"\n" +
|
||||
@ -294,13 +339,74 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
msg.setText(result["failure_msg"])
|
||||
x = msg.exec_()
|
||||
|
||||
def prevScenario(self):
|
||||
self.scenario_comboBox.setCurrentIndex((self.scenario_comboBox.currentIndex() - 1))
|
||||
|
||||
def nextScenario(self):
|
||||
self.scenario_comboBox.setCurrentIndex((self.scenario_comboBox.currentIndex() + 1))
|
||||
|
||||
def loadOnlineContent(self):
|
||||
url = user_files_url + 'directory.yaml'
|
||||
r = requests.get(url, allow_redirects=False)
|
||||
user_files = yaml.safe_load(r.content)
|
||||
count = 0
|
||||
#todo: try/catch/fail here
|
||||
|
||||
# Download scenarios files
|
||||
os.chdir(directories.scenarios)
|
||||
if user_files["scenarios"]["files"]:
|
||||
for filename in user_files["scenarios"]["files"]:
|
||||
url = user_files_url + user_files["scenarios"]["dir"] + '/' + filename
|
||||
r = requests.get(url, allow_redirects=False)
|
||||
open(filename, 'wb').write(r.content)
|
||||
count = count + 1
|
||||
|
||||
|
||||
# Download blue forces files
|
||||
os.chdir(directories.forces + '/blue')
|
||||
if user_files["forces_blue"]["files"]:
|
||||
for filename in user_files["forces_blue"]["files"]:
|
||||
url = user_files_url + user_files["forces_blue"]["dir"] + '/' + filename
|
||||
r = requests.get(url, allow_redirects=False)
|
||||
open(filename, 'wb').write(r.content)
|
||||
count = count + 1
|
||||
|
||||
# Download red forces files
|
||||
os.chdir(directories.forces + '/red')
|
||||
if user_files["forces_red"]["files"]:
|
||||
for filename in user_files["forces_red"]["files"]:
|
||||
url = user_files_url + user_files["forces_red"]["dir"] + '/' + filename
|
||||
r = requests.get(url, allow_redirects=False)
|
||||
open(filename, 'wb').write(r.content)
|
||||
count = count + 1
|
||||
|
||||
# Download imports files
|
||||
os.chdir(directories.imports)
|
||||
if user_files["imports"]["files"]:
|
||||
for filename in user_files["imports"]["files"]:
|
||||
url = user_files_url + user_files["imports"]["dir"] + '/' + filename
|
||||
r = requests.get(url, allow_redirects=False)
|
||||
open(filename, 'wb').write(r.content)
|
||||
count = count + 1
|
||||
|
||||
msg = QMessageBox()
|
||||
msg.setWindowTitle("Downloaded Files")
|
||||
msg.setText("We've downloaded " + str(count) + " new files!")
|
||||
x = msg.exec_()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
# QCoreApplication.setAttribute(QtCore.Qt.AA_DisableHighDpiScaling)
|
||||
win = Window()
|
||||
win.show()
|
||||
# win.show()
|
||||
# win.loadOnlineContent()
|
||||
|
||||
|
||||
qtmodern.styles.dark(app)
|
||||
mw = qtmodern.windows.ModernWindow(win)
|
||||
mw.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
|
||||
|
||||
|
||||
@ -39,3 +39,4 @@ exe = EXE(pyz,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None )
|
||||
|
||||
|
||||
@ -14,7 +14,14 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(1209, 900)
|
||||
MainWindow.resize(1280, 720)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
|
||||
MainWindow.setSizePolicy(sizePolicy)
|
||||
MainWindow.setMinimumSize(QtCore.QSize(1280, 720))
|
||||
MainWindow.setMaximumSize(QtCore.QSize(1280, 720))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(10)
|
||||
MainWindow.setFont(font)
|
||||
@ -23,353 +30,479 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setWindowIcon(icon)
|
||||
MainWindow.setWindowOpacity(4.0)
|
||||
MainWindow.setAutoFillBackground(False)
|
||||
MainWindow.setStyleSheet("background-color: white;")
|
||||
MainWindow.setStyleSheet("/*-----QScrollBar-----*/\n"
|
||||
"QScrollBar:horizontal \n"
|
||||
"{\n"
|
||||
" background-color: transparent;\n"
|
||||
" height: 8px;\n"
|
||||
" margin: 0px;\n"
|
||||
" padding: 0px;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QScrollBar::handle:horizontal \n"
|
||||
"{\n"
|
||||
" border: none;\n"
|
||||
" min-width: 100px;\n"
|
||||
" background-color: #9b9b9b;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QScrollBar::add-line:horizontal, \n"
|
||||
"QScrollBar::sub-line:horizontal,\n"
|
||||
"QScrollBar::add-page:horizontal, \n"
|
||||
"QScrollBar::sub-page:horizontal \n"
|
||||
"{\n"
|
||||
" width: 0px;\n"
|
||||
" background-color: transparent;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QScrollBar:vertical \n"
|
||||
"{\n"
|
||||
" background-color: transparent;\n"
|
||||
" width: 8px;\n"
|
||||
" margin: 0;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QScrollBar::handle:vertical \n"
|
||||
"{\n"
|
||||
" border: none;\n"
|
||||
" min-height: 100px;\n"
|
||||
" background-color: #9b9b9b;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"QScrollBar::add-line:vertical, \n"
|
||||
"QScrollBar::sub-line:vertical,\n"
|
||||
"QScrollBar::add-page:vertical, \n"
|
||||
"QScrollBar::sub-page:vertical \n"
|
||||
"{\n"
|
||||
" height: 0px;\n"
|
||||
" background-color: transparent;\n"
|
||||
"\n"
|
||||
"}")
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.logistics_crates_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.logistics_crates_checkBox.setGeometry(QtCore.QRect(990, 211, 251, 28))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.logistics_crates_checkBox.setFont(font)
|
||||
self.logistics_crates_checkBox.setChecked(True)
|
||||
self.logistics_crates_checkBox.setObjectName("logistics_crates_checkBox")
|
||||
self.zone_sams_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.zone_sams_checkBox.setGeometry(QtCore.QRect(990, 320, 241, 28))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.zone_sams_checkBox.setFont(font)
|
||||
self.zone_sams_checkBox.setObjectName("zone_sams_checkBox")
|
||||
self.red_forces_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.red_forces_label.setGeometry(QtCore.QRect(470, 80, 171, 27))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.red_forces_label.setFont(font)
|
||||
self.red_forces_label.setObjectName("red_forces_label")
|
||||
self.scenario_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.scenario_comboBox.setGeometry(QtCore.QRect(270, 40, 361, 31))
|
||||
self.scenario_comboBox.setGeometry(QtCore.QRect(30, 20, 371, 29))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(8)
|
||||
font.setBold(True)
|
||||
self.scenario_comboBox.setFont(font)
|
||||
self.scenario_comboBox.setToolTip("")
|
||||
self.scenario_comboBox.setToolTipDuration(-1)
|
||||
self.scenario_comboBox.setWhatsThis("")
|
||||
self.scenario_comboBox.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContentsOnFirstShow)
|
||||
self.scenario_comboBox.setFrame(True)
|
||||
self.scenario_comboBox.setObjectName("scenario_comboBox")
|
||||
self.scenario_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label.setGeometry(QtCore.QRect(60, 30, 181, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.scenario_label.setFont(font)
|
||||
self.scenario_label.setObjectName("scenario_label")
|
||||
self.generateButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.generateButton.setGeometry(QtCore.QRect(1020, 790, 141, 41))
|
||||
self.generateButton.setStyleSheet("background-color: white;\n"
|
||||
"border-style: outset;\n"
|
||||
"border-width: 2px;\n"
|
||||
"border-radius: 15px;\n"
|
||||
"border-color: black;\n"
|
||||
"padding: 4px;")
|
||||
self.generateButton.setObjectName("generateButton")
|
||||
self.description_textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
|
||||
self.description_textBrowser.setGeometry(QtCore.QRect(670, 30, 501, 131))
|
||||
self.description_textBrowser.setGeometry(QtCore.QRect(40, 410, 361, 251))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.description_textBrowser.setFont(font)
|
||||
self.description_textBrowser.setStyleSheet("border-radius: 5px; color: gray")
|
||||
self.description_textBrowser.setStyleSheet("padding: 5px;")
|
||||
self.description_textBrowser.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||
self.description_textBrowser.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.description_textBrowser.setLineWidth(1)
|
||||
self.description_textBrowser.setObjectName("description_textBrowser")
|
||||
self.blueforces_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.blueforces_comboBox.setGeometry(QtCore.QRect(790, 230, 291, 31))
|
||||
self.blueforces_comboBox.setObjectName("blueforces_comboBox")
|
||||
self.blue_forces_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.blue_forces_label.setGeometry(QtCore.QRect(690, 180, 241, 31))
|
||||
self.defense_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.defense_checkBox.setEnabled(True)
|
||||
self.defense_checkBox.setGeometry(QtCore.QRect(470, 120, 156, 28))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.blue_forces_label.setFont(font)
|
||||
self.blue_forces_label.setObjectName("blue_forces_label")
|
||||
self.red_forces_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.red_forces_label.setGeometry(QtCore.QRect(60, 180, 261, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.red_forces_label.setFont(font)
|
||||
self.red_forces_label.setObjectName("red_forces_label")
|
||||
self.redforces_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.redforces_comboBox.setGeometry(QtCore.QRect(170, 230, 291, 31))
|
||||
self.redforces_comboBox.setObjectName("redforces_comboBox")
|
||||
self.background_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.background_label.setGeometry(QtCore.QRect(-40, 490, 801, 371))
|
||||
self.background_label.setAutoFillBackground(False)
|
||||
self.background_label.setStyleSheet("")
|
||||
self.background_label.setText("")
|
||||
self.background_label.setPixmap(QtGui.QPixmap("assets/background.PNG"))
|
||||
self.background_label.setObjectName("background_label")
|
||||
self.scenario_hint_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_hint_label.setGeometry(QtCore.QRect(250, 80, 381, 16))
|
||||
self.scenario_hint_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.scenario_hint_label.setObjectName("scenario_hint_label")
|
||||
self.forces_hint_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.forces_hint_label.setGeometry(QtCore.QRect(130, 270, 381, 16))
|
||||
self.forces_hint_label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.forces_hint_label.setObjectName("forces_hint_label")
|
||||
self.blueqty_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.blueqty_spinBox.setGeometry(QtCore.QRect(690, 230, 71, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.blueqty_spinBox.setFont(font)
|
||||
self.blueqty_spinBox.setMinimum(0)
|
||||
self.blueqty_spinBox.setMaximum(8)
|
||||
self.blueqty_spinBox.setProperty("value", 3)
|
||||
self.blueqty_spinBox.setObjectName("blueqty_spinBox")
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.defense_checkBox.setFont(font)
|
||||
self.defense_checkBox.setCheckable(True)
|
||||
self.defense_checkBox.setObjectName("defense_checkBox")
|
||||
self.redqty_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.redqty_spinBox.setGeometry(QtCore.QRect(70, 230, 71, 31))
|
||||
self.redqty_spinBox.setGeometry(QtCore.QRect(1070, 80, 51, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.redqty_spinBox.setFont(font)
|
||||
self.redqty_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.redqty_spinBox.setMinimum(0)
|
||||
self.redqty_spinBox.setMaximum(8)
|
||||
self.redqty_spinBox.setProperty("value", 2)
|
||||
self.redqty_spinBox.setObjectName("redqty_spinBox")
|
||||
self.scenario_label_4 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_4.setGeometry(QtCore.QRect(670, 260, 101, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.scenario_label_4.setFont(font)
|
||||
self.scenario_label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.scenario_label_4.setObjectName("scenario_label_4")
|
||||
self.game_status_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.game_status_checkBox.setGeometry(QtCore.QRect(810, 760, 191, 16))
|
||||
self.redforces_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.redforces_comboBox.setGeometry(QtCore.QRect(660, 80, 391, 33))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.redforces_comboBox.sizePolicy().hasHeightForWidth())
|
||||
self.redforces_comboBox.setSizePolicy(sizePolicy)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.game_status_checkBox.setFont(font)
|
||||
self.game_status_checkBox.setChecked(True)
|
||||
self.game_status_checkBox.setTristate(False)
|
||||
self.game_status_checkBox.setObjectName("game_status_checkBox")
|
||||
self.voiceovers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.voiceovers_checkBox.setGeometry(QtCore.QRect(810, 790, 191, 16))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.voiceovers_checkBox.setFont(font)
|
||||
self.voiceovers_checkBox.setChecked(True)
|
||||
self.voiceovers_checkBox.setObjectName("voiceovers_checkBox")
|
||||
self.logistics_crates_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.logistics_crates_checkBox.setGeometry(QtCore.QRect(920, 320, 251, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.logistics_crates_checkBox.setFont(font)
|
||||
self.logistics_crates_checkBox.setChecked(True)
|
||||
self.logistics_crates_checkBox.setObjectName("logistics_crates_checkBox")
|
||||
self.awacs_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.awacs_checkBox.setGeometry(QtCore.QRect(920, 350, 251, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.awacs_checkBox.setFont(font)
|
||||
self.awacs_checkBox.setStatusTip("")
|
||||
self.awacs_checkBox.setChecked(True)
|
||||
self.awacs_checkBox.setObjectName("awacs_checkBox")
|
||||
self.tankers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.tankers_checkBox.setGeometry(QtCore.QRect(920, 380, 251, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.tankers_checkBox.setFont(font)
|
||||
self.tankers_checkBox.setChecked(True)
|
||||
self.tankers_checkBox.setObjectName("tankers_checkBox")
|
||||
self.apcs_spawn_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.apcs_spawn_checkBox.setGeometry(QtCore.QRect(450, 420, 251, 31))
|
||||
font.setBold(False)
|
||||
self.redforces_comboBox.setFont(font)
|
||||
self.redforces_comboBox.setObjectName("redforces_comboBox")
|
||||
self.scenario_label_8 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_8.setGeometry(QtCore.QRect(570, 220, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
self.apcs_spawn_checkBox.setFont(font)
|
||||
self.apcs_spawn_checkBox.setChecked(True)
|
||||
self.apcs_spawn_checkBox.setObjectName("apcs_spawn_checkBox")
|
||||
self.inf_spawn_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.inf_spawn_spinBox.setGeometry(QtCore.QRect(670, 340, 51, 31))
|
||||
font.setBold(False)
|
||||
self.scenario_label_8.setFont(font)
|
||||
self.scenario_label_8.setObjectName("scenario_label_8")
|
||||
self.slot_template_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.slot_template_comboBox.setGeometry(QtCore.QRect(960, 384, 271, 33))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.inf_spawn_spinBox.setFont(font)
|
||||
self.inf_spawn_spinBox.setMinimum(0)
|
||||
self.inf_spawn_spinBox.setMaximum(20)
|
||||
self.inf_spawn_spinBox.setProperty("value", 2)
|
||||
self.inf_spawn_spinBox.setObjectName("inf_spawn_spinBox")
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.slot_template_comboBox.setFont(font)
|
||||
self.slot_template_comboBox.setObjectName("slot_template_comboBox")
|
||||
self.scenario_label_5 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_5.setGeometry(QtCore.QRect(50, 260, 101, 31))
|
||||
self.scenario_label_5.setGeometry(QtCore.QRect(1130, 40, 131, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(8)
|
||||
self.scenario_label_5.setFont(font)
|
||||
self.scenario_label_5.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.scenario_label_5.setObjectName("scenario_label_5")
|
||||
self.forces_hint_label_2 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.forces_hint_label_2.setGeometry(QtCore.QRect(790, 270, 311, 20))
|
||||
self.forces_hint_label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.forces_hint_label_2.setObjectName("forces_hint_label_2")
|
||||
self.label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label.setGeometry(QtCore.QRect(450, 340, 211, 21))
|
||||
self.blue_forces_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.blue_forces_label.setGeometry(QtCore.QRect(470, 30, 161, 27))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.slot_template_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.slot_template_comboBox.setGeometry(QtCore.QRect(870, 640, 291, 31))
|
||||
self.slot_template_comboBox.setObjectName("slot_template_comboBox")
|
||||
self.label_2 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label_2.setGeometry(QtCore.QRect(750, 640, 111, 31))
|
||||
font.setBold(False)
|
||||
self.blue_forces_label.setFont(font)
|
||||
self.blue_forces_label.setObjectName("blue_forces_label")
|
||||
self.blueqty_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.blueqty_spinBox.setGeometry(QtCore.QRect(1070, 30, 51, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.force_offroad_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.force_offroad_checkBox.setGeometry(QtCore.QRect(810, 820, 191, 16))
|
||||
font.setPointSize(12)
|
||||
self.blueqty_spinBox.setFont(font)
|
||||
self.blueqty_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.blueqty_spinBox.setMinimum(0)
|
||||
self.blueqty_spinBox.setMaximum(8)
|
||||
self.blueqty_spinBox.setProperty("value", 3)
|
||||
self.blueqty_spinBox.setObjectName("blueqty_spinBox")
|
||||
self.blueforces_comboBox = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.blueforces_comboBox.setGeometry(QtCore.QRect(660, 30, 391, 33))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.force_offroad_checkBox.setFont(font)
|
||||
self.force_offroad_checkBox.setChecked(False)
|
||||
self.force_offroad_checkBox.setTristate(False)
|
||||
self.force_offroad_checkBox.setObjectName("force_offroad_checkBox")
|
||||
self.defense_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.defense_checkBox.setGeometry(QtCore.QRect(60, 90, 181, 31))
|
||||
font.setBold(False)
|
||||
self.blueforces_comboBox.setFont(font)
|
||||
self.blueforces_comboBox.setObjectName("blueforces_comboBox")
|
||||
self.scenario_label_4 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_4.setGeometry(QtCore.QRect(1130, 90, 131, 18))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.defense_checkBox.setFont(font)
|
||||
self.defense_checkBox.setObjectName("defense_checkBox")
|
||||
font.setPointSize(8)
|
||||
self.scenario_label_4.setFont(font)
|
||||
self.scenario_label_4.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.scenario_label_4.setObjectName("scenario_label_4")
|
||||
self.version_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.version_label.setGeometry(QtCore.QRect(1140, 650, 111, 20))
|
||||
self.version_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.version_label.setObjectName("version_label")
|
||||
self.scenario_label_10 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_10.setGeometry(QtCore.QRect(570, 260, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.scenario_label_10.setFont(font)
|
||||
self.scenario_label_10.setObjectName("scenario_label_10")
|
||||
self.e_transport_helos_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.e_transport_helos_spinBox.setGeometry(QtCore.QRect(510, 260, 51, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.e_transport_helos_spinBox.sizePolicy().hasHeightForWidth())
|
||||
self.e_transport_helos_spinBox.setSizePolicy(sizePolicy)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.e_transport_helos_spinBox.setFont(font)
|
||||
self.e_transport_helos_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.e_transport_helos_spinBox.setMinimum(0)
|
||||
self.e_transport_helos_spinBox.setMaximum(8)
|
||||
self.e_transport_helos_spinBox.setProperty("value", 1)
|
||||
self.e_transport_helos_spinBox.setObjectName("e_transport_helos_spinBox")
|
||||
self.e_attack_planes_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.e_attack_planes_spinBox.setGeometry(QtCore.QRect(510, 220, 51, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.e_attack_planes_spinBox.sizePolicy().hasHeightForWidth())
|
||||
self.e_attack_planes_spinBox.setSizePolicy(sizePolicy)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.e_attack_planes_spinBox.setFont(font)
|
||||
self.e_attack_planes_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.e_attack_planes_spinBox.setMinimum(0)
|
||||
self.e_attack_planes_spinBox.setMaximum(8)
|
||||
self.e_attack_planes_spinBox.setProperty("value", 1)
|
||||
self.e_attack_planes_spinBox.setObjectName("e_attack_planes_spinBox")
|
||||
self.e_attack_helos_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.e_attack_helos_spinBox.setGeometry(QtCore.QRect(70, 330, 51, 31))
|
||||
self.e_attack_helos_spinBox.setGeometry(QtCore.QRect(510, 180, 51, 31))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.e_attack_helos_spinBox.sizePolicy().hasHeightForWidth())
|
||||
self.e_attack_helos_spinBox.setSizePolicy(sizePolicy)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.e_attack_helos_spinBox.setFont(font)
|
||||
self.e_attack_helos_spinBox.setReadOnly(False)
|
||||
self.e_attack_helos_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.e_attack_helos_spinBox.setKeyboardTracking(True)
|
||||
self.e_attack_helos_spinBox.setMinimum(0)
|
||||
self.e_attack_helos_spinBox.setMaximum(8)
|
||||
self.e_attack_helos_spinBox.setProperty("value", 2)
|
||||
self.e_attack_helos_spinBox.setObjectName("e_attack_helos_spinBox")
|
||||
self.scenario_label_7 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_7.setGeometry(QtCore.QRect(140, 330, 211, 31))
|
||||
self.scenario_label_7.setGeometry(QtCore.QRect(570, 180, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.scenario_label_7.setFont(font)
|
||||
self.scenario_label_7.setObjectName("scenario_label_7")
|
||||
self.scenario_label_8 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_8.setGeometry(QtCore.QRect(140, 370, 201, 31))
|
||||
self.label_2 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label_2.setGeometry(QtCore.QRect(840, 390, 111, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.scenario_label_8.setFont(font)
|
||||
self.scenario_label_8.setObjectName("scenario_label_8")
|
||||
self.e_attack_planes_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.e_attack_planes_spinBox.setGeometry(QtCore.QRect(70, 370, 51, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.e_attack_planes_spinBox.setFont(font)
|
||||
self.e_attack_planes_spinBox.setMinimum(0)
|
||||
self.e_attack_planes_spinBox.setMaximum(8)
|
||||
self.e_attack_planes_spinBox.setProperty("value", 1)
|
||||
self.e_attack_planes_spinBox.setObjectName("e_attack_planes_spinBox")
|
||||
self.zone_sams_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.zone_sams_checkBox.setGeometry(QtCore.QRect(920, 410, 201, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.zone_sams_checkBox.setFont(font)
|
||||
self.zone_sams_checkBox.setObjectName("zone_sams_checkBox")
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.scenario_label_9 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_9.setGeometry(QtCore.QRect(810, 450, 171, 31))
|
||||
self.scenario_label_9.setGeometry(QtCore.QRect(490, 450, 251, 23))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
self.scenario_label_9.setFont(font)
|
||||
self.scenario_label_9.setObjectName("scenario_label_9")
|
||||
self.inf_spawn_voiceovers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.inf_spawn_voiceovers_checkBox.setGeometry(QtCore.QRect(810, 720, 251, 31))
|
||||
self.awacs_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.awacs_checkBox.setGeometry(QtCore.QRect(990, 246, 241, 28))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.awacs_checkBox.setFont(font)
|
||||
self.awacs_checkBox.setStatusTip("")
|
||||
self.awacs_checkBox.setChecked(True)
|
||||
self.awacs_checkBox.setObjectName("awacs_checkBox")
|
||||
self.tankers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.tankers_checkBox.setGeometry(QtCore.QRect(990, 282, 241, 28))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.tankers_checkBox.setFont(font)
|
||||
self.tankers_checkBox.setChecked(True)
|
||||
self.tankers_checkBox.setObjectName("tankers_checkBox")
|
||||
self.inf_spawn_voiceovers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.inf_spawn_voiceovers_checkBox.setGeometry(QtCore.QRect(960, 455, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.inf_spawn_voiceovers_checkBox.setFont(font)
|
||||
self.inf_spawn_voiceovers_checkBox.setChecked(True)
|
||||
self.inf_spawn_voiceovers_checkBox.setObjectName("inf_spawn_voiceovers_checkBox")
|
||||
self.farp_never = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_never.setGeometry(QtCore.QRect(950, 500, 95, 20))
|
||||
self.voiceovers_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.voiceovers_checkBox.setGeometry(QtCore.QRect(960, 517, 171, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.voiceovers_checkBox.setFont(font)
|
||||
self.voiceovers_checkBox.setChecked(True)
|
||||
self.voiceovers_checkBox.setObjectName("voiceovers_checkBox")
|
||||
self.smoke_pickup_zone_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.smoke_pickup_zone_checkBox.setGeometry(QtCore.QRect(960, 424, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.smoke_pickup_zone_checkBox.setFont(font)
|
||||
self.smoke_pickup_zone_checkBox.setChecked(False)
|
||||
self.smoke_pickup_zone_checkBox.setObjectName("smoke_pickup_zone_checkBox")
|
||||
self.game_status_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.game_status_checkBox.setGeometry(QtCore.QRect(960, 486, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.game_status_checkBox.setFont(font)
|
||||
self.game_status_checkBox.setChecked(True)
|
||||
self.game_status_checkBox.setTristate(False)
|
||||
self.game_status_checkBox.setObjectName("game_status_checkBox")
|
||||
self.label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label.setGeometry(QtCore.QRect(570, 380, 261, 23))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.inf_spawn_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.inf_spawn_spinBox.setGeometry(QtCore.QRect(510, 380, 47, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.inf_spawn_spinBox.setFont(font)
|
||||
self.inf_spawn_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.inf_spawn_spinBox.setMinimum(0)
|
||||
self.inf_spawn_spinBox.setMaximum(20)
|
||||
self.inf_spawn_spinBox.setProperty("value", 2)
|
||||
self.inf_spawn_spinBox.setObjectName("inf_spawn_spinBox")
|
||||
self.troop_drop_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.troop_drop_spinBox.setGeometry(QtCore.QRect(510, 330, 47, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.troop_drop_spinBox.setFont(font)
|
||||
self.troop_drop_spinBox.setButtonSymbols(QtWidgets.QAbstractSpinBox.PlusMinus)
|
||||
self.troop_drop_spinBox.setMinimum(0)
|
||||
self.troop_drop_spinBox.setMaximum(10)
|
||||
self.troop_drop_spinBox.setProperty("value", 4)
|
||||
self.troop_drop_spinBox.setObjectName("troop_drop_spinBox")
|
||||
self.force_offroad_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.force_offroad_checkBox.setGeometry(QtCore.QRect(960, 548, 161, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.force_offroad_checkBox.setFont(font)
|
||||
self.force_offroad_checkBox.setChecked(False)
|
||||
self.force_offroad_checkBox.setTristate(False)
|
||||
self.force_offroad_checkBox.setObjectName("force_offroad_checkBox")
|
||||
self.label_3 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label_3.setGeometry(QtCore.QRect(570, 330, 281, 23))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.apcs_spawn_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.apcs_spawn_checkBox.setGeometry(QtCore.QRect(990, 180, 251, 27))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(10)
|
||||
font.setBold(False)
|
||||
self.apcs_spawn_checkBox.setFont(font)
|
||||
self.apcs_spawn_checkBox.setChecked(True)
|
||||
self.apcs_spawn_checkBox.setObjectName("apcs_spawn_checkBox")
|
||||
self.generateButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.generateButton.setGeometry(QtCore.QRect(710, 600, 231, 51))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(8)
|
||||
font.setBold(True)
|
||||
self.generateButton.setFont(font)
|
||||
self.generateButton.setStyleSheet("background-color: gray;\n"
|
||||
"color: rgb(255, 255, 255);\n"
|
||||
"border-style: outset;\n"
|
||||
"border-width: 1px;\n"
|
||||
"border-radius: 5px;\n"
|
||||
"border-color: black;\n"
|
||||
"padding: 4px;")
|
||||
self.generateButton.setObjectName("generateButton")
|
||||
self.farp_always = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_always.setGeometry(QtCore.QRect(510, 480, 261, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.farp_always.setFont(font)
|
||||
self.farp_always.setObjectName("farp_always")
|
||||
self.farp_buttonGroup = QtWidgets.QButtonGroup(MainWindow)
|
||||
self.farp_buttonGroup.setObjectName("farp_buttonGroup")
|
||||
self.farp_buttonGroup.addButton(self.farp_always)
|
||||
self.farp_never = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_never.setGeometry(QtCore.QRect(510, 540, 271, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.farp_never.setFont(font)
|
||||
self.farp_never.setObjectName("farp_never")
|
||||
self.farp_buttonGroup = QtWidgets.QButtonGroup(MainWindow)
|
||||
self.farp_buttonGroup.setObjectName("farp_buttonGroup")
|
||||
self.farp_buttonGroup.addButton(self.farp_never)
|
||||
self.farp_gunits = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_gunits.setGeometry(QtCore.QRect(950, 530, 221, 21))
|
||||
self.farp_gunits.setGeometry(QtCore.QRect(510, 509, 261, 24))
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
self.farp_gunits.setFont(font)
|
||||
self.farp_gunits.setChecked(True)
|
||||
self.farp_gunits.setObjectName("farp_gunits")
|
||||
self.farp_buttonGroup.addButton(self.farp_gunits)
|
||||
self.farp_always = QtWidgets.QRadioButton(self.centralwidget)
|
||||
self.farp_always.setGeometry(QtCore.QRect(950, 560, 221, 21))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.farp_always.setFont(font)
|
||||
self.farp_always.setObjectName("farp_always")
|
||||
self.farp_buttonGroup.addButton(self.farp_always)
|
||||
self.version_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.version_label.setGeometry(QtCore.QRect(920, 840, 241, 21))
|
||||
self.version_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.version_label.setObjectName("version_label")
|
||||
self.scenario_label_10 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.scenario_label_10.setGeometry(QtCore.QRect(140, 410, 241, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(11)
|
||||
self.scenario_label_10.setFont(font)
|
||||
self.scenario_label_10.setObjectName("scenario_label_10")
|
||||
self.e_transport_helos_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.e_transport_helos_spinBox.setGeometry(QtCore.QRect(70, 410, 51, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.e_transport_helos_spinBox.setFont(font)
|
||||
self.e_transport_helos_spinBox.setMinimum(0)
|
||||
self.e_transport_helos_spinBox.setMaximum(8)
|
||||
self.e_transport_helos_spinBox.setProperty("value", 1)
|
||||
self.e_transport_helos_spinBox.setObjectName("e_transport_helos_spinBox")
|
||||
self.label_3 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.label_3.setGeometry(QtCore.QRect(450, 380, 191, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(10)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.troop_drop_spinBox = QtWidgets.QSpinBox(self.centralwidget)
|
||||
self.troop_drop_spinBox.setGeometry(QtCore.QRect(670, 380, 51, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(12)
|
||||
self.troop_drop_spinBox.setFont(font)
|
||||
self.troop_drop_spinBox.setMinimum(0)
|
||||
self.troop_drop_spinBox.setMaximum(10)
|
||||
self.troop_drop_spinBox.setProperty("value", 4)
|
||||
self.troop_drop_spinBox.setObjectName("troop_drop_spinBox")
|
||||
self.smoke_pickup_zone_checkBox = QtWidgets.QCheckBox(self.centralwidget)
|
||||
self.smoke_pickup_zone_checkBox.setGeometry(QtCore.QRect(810, 690, 251, 31))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(9)
|
||||
self.smoke_pickup_zone_checkBox.setFont(font)
|
||||
self.smoke_pickup_zone_checkBox.setChecked(True)
|
||||
self.smoke_pickup_zone_checkBox.setObjectName("smoke_pickup_zone_checkBox")
|
||||
self.background_label.raise_()
|
||||
self.scenario_comboBox.raise_()
|
||||
self.scenario_label.raise_()
|
||||
self.generateButton.raise_()
|
||||
self.description_textBrowser.raise_()
|
||||
self.blueforces_comboBox.raise_()
|
||||
self.blue_forces_label.raise_()
|
||||
self.red_forces_label.raise_()
|
||||
self.redforces_comboBox.raise_()
|
||||
self.scenario_hint_label.raise_()
|
||||
self.forces_hint_label.raise_()
|
||||
self.blueqty_spinBox.raise_()
|
||||
self.redqty_spinBox.raise_()
|
||||
self.scenario_label_4.raise_()
|
||||
self.game_status_checkBox.raise_()
|
||||
self.voiceovers_checkBox.raise_()
|
||||
self.logistics_crates_checkBox.raise_()
|
||||
self.awacs_checkBox.raise_()
|
||||
self.tankers_checkBox.raise_()
|
||||
self.apcs_spawn_checkBox.raise_()
|
||||
self.inf_spawn_spinBox.raise_()
|
||||
self.scenario_label_5.raise_()
|
||||
self.forces_hint_label_2.raise_()
|
||||
self.label.raise_()
|
||||
self.slot_template_comboBox.raise_()
|
||||
self.label_2.raise_()
|
||||
self.force_offroad_checkBox.raise_()
|
||||
self.defense_checkBox.raise_()
|
||||
self.e_attack_helos_spinBox.raise_()
|
||||
self.scenario_label_7.raise_()
|
||||
self.scenario_label_8.raise_()
|
||||
self.e_attack_planes_spinBox.raise_()
|
||||
self.zone_sams_checkBox.raise_()
|
||||
self.scenario_label_9.raise_()
|
||||
self.inf_spawn_voiceovers_checkBox.raise_()
|
||||
self.farp_never.raise_()
|
||||
self.farp_gunits.raise_()
|
||||
self.farp_always.raise_()
|
||||
self.version_label.raise_()
|
||||
self.scenario_label_10.raise_()
|
||||
self.e_transport_helos_spinBox.raise_()
|
||||
self.label_3.raise_()
|
||||
self.troop_drop_spinBox.raise_()
|
||||
self.smoke_pickup_zone_checkBox.raise_()
|
||||
self.missionImage = QtWidgets.QLabel(self.centralwidget)
|
||||
self.missionImage.setEnabled(True)
|
||||
self.missionImage.setGeometry(QtCore.QRect(60, 80, 300, 300))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.missionImage.sizePolicy().hasHeightForWidth())
|
||||
self.missionImage.setSizePolicy(sizePolicy)
|
||||
self.missionImage.setMinimumSize(QtCore.QSize(300, 300))
|
||||
self.missionImage.setMaximumSize(QtCore.QSize(16777215, 16777215))
|
||||
self.missionImage.setStyleSheet("")
|
||||
self.missionImage.setText("")
|
||||
self.missionImage.setPixmap(QtGui.QPixmap("assets/briefing1.png"))
|
||||
self.missionImage.setScaledContents(True)
|
||||
self.missionImage.setWordWrap(False)
|
||||
self.missionImage.setObjectName("missionImage")
|
||||
self.nextScenario_pushButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.nextScenario_pushButton.setGeometry(QtCore.QRect(370, 210, 31, 51))
|
||||
self.nextScenario_pushButton.setObjectName("nextScenario_pushButton")
|
||||
self.prevScenario_pushButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.prevScenario_pushButton.setGeometry(QtCore.QRect(20, 210, 31, 51))
|
||||
self.prevScenario_pushButton.setObjectName("prevScenario_pushButton")
|
||||
self.background_label = QtWidgets.QLabel(self.centralwidget)
|
||||
self.background_label.setGeometry(QtCore.QRect(1020, 600, 241, 51))
|
||||
self.background_label.setText("")
|
||||
self.background_label.setPixmap(QtGui.QPixmap("assets/rotorops-dkgray.png"))
|
||||
self.background_label.setScaledContents(True)
|
||||
self.background_label.setObjectName("background_label")
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1209, 26))
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1280, 26))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menuMap = QtWidgets.QMenu(self.menubar)
|
||||
self.menuMap.setObjectName("menuMap")
|
||||
self.menuGametype_Filter = QtWidgets.QMenu(self.menubar)
|
||||
self.menuGametype_Filter.setObjectName("menuGametype_Filter")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||
font = QtGui.QFont()
|
||||
font.setFamily("Arial")
|
||||
font.setPointSize(9)
|
||||
font.setBold(False)
|
||||
self.statusbar.setFont(font)
|
||||
self.statusbar.setAcceptDrops(False)
|
||||
self.statusbar.setStyleSheet("color: rgb(255, 255, 255);")
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.action_generateMission = QtWidgets.QAction(MainWindow)
|
||||
@ -382,84 +515,131 @@ class Ui_MainWindow(object):
|
||||
self.action_redforcesSelected.setObjectName("action_redforcesSelected")
|
||||
self.action_defensiveModeChanged = QtWidgets.QAction(MainWindow)
|
||||
self.action_defensiveModeChanged.setObjectName("action_defensiveModeChanged")
|
||||
self.action_nextScenario = QtWidgets.QAction(MainWindow)
|
||||
self.action_nextScenario.setObjectName("action_nextScenario")
|
||||
self.action_prevScenario = QtWidgets.QAction(MainWindow)
|
||||
self.action_prevScenario.setObjectName("action_prevScenario")
|
||||
self.actionCaucasus = QtWidgets.QAction(MainWindow)
|
||||
self.actionCaucasus.setObjectName("actionCaucasus")
|
||||
self.actionPersian_Gulf = QtWidgets.QAction(MainWindow)
|
||||
self.actionPersian_Gulf.setObjectName("actionPersian_Gulf")
|
||||
self.actionMarianas = QtWidgets.QAction(MainWindow)
|
||||
self.actionMarianas.setObjectName("actionMarianas")
|
||||
self.actionNevada = QtWidgets.QAction(MainWindow)
|
||||
self.actionNevada.setObjectName("actionNevada")
|
||||
self.actionSyria = QtWidgets.QAction(MainWindow)
|
||||
self.actionSyria.setObjectName("actionSyria")
|
||||
self.actionAll = QtWidgets.QAction(MainWindow)
|
||||
self.actionAll.setCheckable(True)
|
||||
self.actionAll.setChecked(True)
|
||||
self.actionAll.setObjectName("actionAll")
|
||||
self.actionMultiplayer = QtWidgets.QAction(MainWindow)
|
||||
self.actionMultiplayer.setCheckable(True)
|
||||
self.actionMultiplayer.setObjectName("actionMultiplayer")
|
||||
self.actionAll_2 = QtWidgets.QAction(MainWindow)
|
||||
self.actionAll_2.setCheckable(True)
|
||||
self.actionAll_2.setChecked(True)
|
||||
self.actionAll_2.setObjectName("actionAll_2")
|
||||
self.menuMap.addAction(self.actionAll_2)
|
||||
self.menuMap.addAction(self.actionCaucasus)
|
||||
self.menuMap.addAction(self.actionPersian_Gulf)
|
||||
self.menuMap.addAction(self.actionMarianas)
|
||||
self.menuMap.addAction(self.actionNevada)
|
||||
self.menuMap.addAction(self.actionSyria)
|
||||
self.menuGametype_Filter.addAction(self.actionAll)
|
||||
self.menuGametype_Filter.addAction(self.actionMultiplayer)
|
||||
self.menubar.addAction(self.menuMap.menuAction())
|
||||
self.menubar.addAction(self.menuGametype_Filter.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.generateButton.clicked.connect(self.action_generateMission.trigger)
|
||||
self.scenario_comboBox.currentIndexChanged['int'].connect(self.action_scenarioSelected.trigger)
|
||||
self.defense_checkBox.stateChanged['int'].connect(self.action_defensiveModeChanged.trigger)
|
||||
self.nextScenario_pushButton.clicked.connect(self.action_nextScenario.trigger)
|
||||
self.prevScenario_pushButton.clicked.connect(self.action_prevScenario.trigger)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "RotorOps Mission Generator"))
|
||||
self.logistics_crates_checkBox.setStatusTip(_translate("MainWindow", "Enable CTLD logistics crates for building ground units and air defenses. Pickup logistics containers to create new logistics sites."))
|
||||
self.logistics_crates_checkBox.setText(_translate("MainWindow", "Logistics"))
|
||||
self.zone_sams_checkBox.setStatusTip(_translate("MainWindow", "Inactive conflict zones will be protected by SAMs. When a zone is cleared, SAMs at next active zone will be destroyed."))
|
||||
self.zone_sams_checkBox.setText(_translate("MainWindow", "Inactive Zone SAMs"))
|
||||
self.red_forces_label.setText(_translate("MainWindow", "Red Forces:"))
|
||||
self.scenario_comboBox.setStatusTip(_translate("MainWindow", "Tip: You can create your own templates that include mission options like kneeboards, briefings, weather, static units, triggers, scripts, etc."))
|
||||
self.scenario_label.setText(_translate("MainWindow", "Scenario Template:"))
|
||||
self.generateButton.setText(_translate("MainWindow", "Generate Mission"))
|
||||
self.description_textBrowser.setHtml(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:\'Segoe UI\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
||||
"</style></head><body style=\" font-family:\'Arial\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'MS Shell Dlg 2\'; font-size:10pt;\">Provide close air support for our convoys as we take back Las Vegas from the enemy!</span></p></body></html>"))
|
||||
self.blueforces_comboBox.setStatusTip(_translate("MainWindow", "Tip: You can create your own custom ground forces groups to be automatically generated."))
|
||||
self.blue_forces_label.setText(_translate("MainWindow", "Friendly Forces:"))
|
||||
self.red_forces_label.setText(_translate("MainWindow", "Enemy Forces:"))
|
||||
self.redforces_comboBox.setStatusTip(_translate("MainWindow", "Tip: You can create your own custom ground forces groups to be automatically generated."))
|
||||
self.scenario_hint_label.setText(_translate("MainWindow", "Scenario templates are .miz files in \'Generator/Scenarios\'"))
|
||||
self.forces_hint_label.setText(_translate("MainWindow", "Forces templates are .miz files in \'Generator/Forces\'"))
|
||||
self.blueqty_spinBox.setStatusTip(_translate("MainWindow", "How many groups should we generate?"))
|
||||
self.defense_checkBox.setText(_translate("MainWindow", "Blue on Defense"))
|
||||
self.redqty_spinBox.setStatusTip(_translate("MainWindow", "How many groups should we generate?"))
|
||||
self.scenario_label_4.setText(_translate("MainWindow", "Groups Per Zone"))
|
||||
self.game_status_checkBox.setStatusTip(_translate("MainWindow", "Enable an onscreen zone status display. This helps keep focus on the active conflict zone."))
|
||||
self.game_status_checkBox.setText(_translate("MainWindow", "Game Status Display"))
|
||||
self.voiceovers_checkBox.setStatusTip(_translate("MainWindow", "Voiceovers from the ground commander. Helps keep focus on the active zone."))
|
||||
self.voiceovers_checkBox.setText(_translate("MainWindow", "Voiceovers"))
|
||||
self.logistics_crates_checkBox.setStatusTip(_translate("MainWindow", "Enable CTLD logistics crates for building ground units and air defenses. Pickup logistics containers to create new logistics sites."))
|
||||
self.logistics_crates_checkBox.setText(_translate("MainWindow", "Logistics"))
|
||||
self.awacs_checkBox.setText(_translate("MainWindow", "Friendly AWACS"))
|
||||
self.tankers_checkBox.setText(_translate("MainWindow", "Friendly Tankers"))
|
||||
self.apcs_spawn_checkBox.setStatusTip(_translate("MainWindow", "Friendly/enemy APCs will drop infantry when reaching a new conflict zone. Disables infinite troop pickups from conflict zones (you must pick up existing troops)."))
|
||||
self.apcs_spawn_checkBox.setText(_translate("MainWindow", "APCs Spawn Infantry"))
|
||||
self.inf_spawn_spinBox.setStatusTip(_translate("MainWindow", "This value is multiplied by the number of spawn zones in the mission template."))
|
||||
self.scenario_label_5.setText(_translate("MainWindow", "Groups Per Zone"))
|
||||
self.forces_hint_label_2.setText(_translate("MainWindow", "Forces templates are .miz files in \'Generator/Forces\'"))
|
||||
self.label.setStatusTip(_translate("MainWindow", "This value is multiplied by the number of spawn zones in the mission template."))
|
||||
self.label.setText(_translate("MainWindow", "Infantry Spawns per zone:"))
|
||||
self.slot_template_comboBox.setStatusTip(_translate("MainWindow", "Default player/client spawn locations at a friendly airport."))
|
||||
self.label_2.setText(_translate("MainWindow", "Player Slots"))
|
||||
self.force_offroad_checkBox.setStatusTip(_translate("MainWindow", "May help prevent long travel times or pathfinding issues. "))
|
||||
self.force_offroad_checkBox.setText(_translate("MainWindow", "Force Offroad"))
|
||||
self.defense_checkBox.setText(_translate("MainWindow", "Defensive Mode"))
|
||||
self.e_attack_helos_spinBox.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack helicopter group spawns."))
|
||||
self.scenario_label_7.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack helicopter group spawns."))
|
||||
self.scenario_label_7.setText(_translate("MainWindow", "Enemy Attack Helicopters"))
|
||||
self.redforces_comboBox.setStatusTip(_translate("MainWindow", "Tip: You can create your own custom ground forces groups to be automatically generated."))
|
||||
self.scenario_label_8.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack plane group spawns."))
|
||||
self.scenario_label_8.setText(_translate("MainWindow", "Enemy Attack Planes"))
|
||||
self.e_attack_planes_spinBox.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack plane group spawns."))
|
||||
self.zone_sams_checkBox.setStatusTip(_translate("MainWindow", "Inactive conflict zones will be protected by SAMs. When a zone is cleared, SAMs at next active zone will be destroyed."))
|
||||
self.zone_sams_checkBox.setText(_translate("MainWindow", "Inactive Zone SAMs"))
|
||||
self.scenario_label_9.setText(_translate("MainWindow", "Zone FARP Conditions:"))
|
||||
self.inf_spawn_voiceovers_checkBox.setStatusTip(_translate("MainWindow", "Friendly/enemy APCs will drop infantry when reaching a new conflict zone."))
|
||||
self.inf_spawn_voiceovers_checkBox.setText(_translate("MainWindow", "Voiceovers on Infantry Spawn"))
|
||||
self.farp_never.setStatusTip(_translate("MainWindow", "Never spawn FARPs in defeated conflict zones."))
|
||||
self.farp_never.setText(_translate("MainWindow", "Never"))
|
||||
self.farp_gunits.setStatusTip(_translate("MainWindow", "Only spawn FARPs in defeated conflict zones if we have sufficient ground units remaining."))
|
||||
self.farp_gunits.setText(_translate("MainWindow", "20% Ground Units Remaining"))
|
||||
self.farp_always.setStatusTip(_translate("MainWindow", "Always spawn a FARP in defeated conflict zones."))
|
||||
self.farp_always.setText(_translate("MainWindow", "Always"))
|
||||
self.slot_template_comboBox.setStatusTip(_translate("MainWindow", "Default player/client spawn locations at a friendly airport."))
|
||||
self.scenario_label_5.setText(_translate("MainWindow", "Groups Per Zone"))
|
||||
self.blue_forces_label.setText(_translate("MainWindow", "Blue Forces:"))
|
||||
self.blueqty_spinBox.setStatusTip(_translate("MainWindow", "How many groups should we generate?"))
|
||||
self.blueforces_comboBox.setStatusTip(_translate("MainWindow", "Tip: You can create your own custom ground forces groups to be automatically generated."))
|
||||
self.scenario_label_4.setText(_translate("MainWindow", "Groups Per Zone"))
|
||||
self.version_label.setText(_translate("MainWindow", "Version string"))
|
||||
self.scenario_label_10.setStatusTip(_translate("MainWindow", "Approximate number of enemy transport helicopter spawns."))
|
||||
self.scenario_label_10.setText(_translate("MainWindow", "Enemy Transport Helicopters"))
|
||||
self.e_transport_helos_spinBox.setStatusTip(_translate("MainWindow", "Approximate number of enemy transport helicopter spawns."))
|
||||
self.label_3.setStatusTip(_translate("MainWindow", "The number of troop drops per transport helicopter flight."))
|
||||
self.label_3.setText(_translate("MainWindow", "Transport Drop Points:"))
|
||||
self.troop_drop_spinBox.setStatusTip(_translate("MainWindow", "The number of troop drops per transport helicopter flight."))
|
||||
self.e_attack_planes_spinBox.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack plane group spawns."))
|
||||
self.e_attack_helos_spinBox.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack helicopter group spawns."))
|
||||
self.scenario_label_7.setStatusTip(_translate("MainWindow", "Approximate number of enemy attack helicopter group spawns."))
|
||||
self.scenario_label_7.setText(_translate("MainWindow", "Enemy Attack Helicopters"))
|
||||
self.label_2.setText(_translate("MainWindow", "Player Slots:"))
|
||||
self.scenario_label_9.setText(_translate("MainWindow", "Zone FARP Conditions:"))
|
||||
self.awacs_checkBox.setText(_translate("MainWindow", "Friendly AWACS"))
|
||||
self.tankers_checkBox.setText(_translate("MainWindow", "Friendly Tankers"))
|
||||
self.inf_spawn_voiceovers_checkBox.setStatusTip(_translate("MainWindow", "Friendly/enemy APCs will drop infantry when reaching a new conflict zone."))
|
||||
self.inf_spawn_voiceovers_checkBox.setText(_translate("MainWindow", "Voiceovers on Infantry Spawn"))
|
||||
self.voiceovers_checkBox.setStatusTip(_translate("MainWindow", "Voiceovers from the ground commander. Helps keep focus on the active zone."))
|
||||
self.voiceovers_checkBox.setText(_translate("MainWindow", "Voiceovers"))
|
||||
self.smoke_pickup_zone_checkBox.setStatusTip(_translate("MainWindow", "Infinite troop pickup zones will be marked with blue smoke."))
|
||||
self.smoke_pickup_zone_checkBox.setText(_translate("MainWindow", "Smoke at Troop Pickup Zones"))
|
||||
self.game_status_checkBox.setStatusTip(_translate("MainWindow", "Enable an onscreen zone status display. This helps keep focus on the active conflict zone."))
|
||||
self.game_status_checkBox.setText(_translate("MainWindow", "Game Status Display"))
|
||||
self.label.setStatusTip(_translate("MainWindow", "This value is multiplied by the number of spawn zones in the mission template."))
|
||||
self.label.setText(_translate("MainWindow", "Infantry Spawns per zone"))
|
||||
self.inf_spawn_spinBox.setStatusTip(_translate("MainWindow", "This value is multiplied by the number of spawn zones in the mission template."))
|
||||
self.troop_drop_spinBox.setStatusTip(_translate("MainWindow", "The number of troop drops per transport helicopter flight."))
|
||||
self.force_offroad_checkBox.setStatusTip(_translate("MainWindow", "May help prevent long travel times or pathfinding issues. "))
|
||||
self.force_offroad_checkBox.setText(_translate("MainWindow", "Force Offroad"))
|
||||
self.label_3.setStatusTip(_translate("MainWindow", "The number of troop drops per transport helicopter flight."))
|
||||
self.label_3.setText(_translate("MainWindow", "Transport Drop Points"))
|
||||
self.apcs_spawn_checkBox.setStatusTip(_translate("MainWindow", "Friendly/enemy APCs will drop infantry when reaching a new conflict zone. Disables infinite troop pickups from conflict zones (you must pick up existing troops)."))
|
||||
self.apcs_spawn_checkBox.setText(_translate("MainWindow", "APCs Spawn Infantry"))
|
||||
self.generateButton.setText(_translate("MainWindow", "GENERATE MISSION"))
|
||||
self.farp_always.setStatusTip(_translate("MainWindow", "Always spawn a FARP in defeated conflict zones."))
|
||||
self.farp_always.setText(_translate("MainWindow", "Always"))
|
||||
self.farp_never.setStatusTip(_translate("MainWindow", "Never spawn FARPs in defeated conflict zones."))
|
||||
self.farp_never.setText(_translate("MainWindow", "Never"))
|
||||
self.farp_gunits.setStatusTip(_translate("MainWindow", "Only spawn FARPs in defeated conflict zones if we have sufficient ground units remaining."))
|
||||
self.farp_gunits.setText(_translate("MainWindow", "20% Ground Units Remaining"))
|
||||
self.nextScenario_pushButton.setText(_translate("MainWindow", ">"))
|
||||
self.prevScenario_pushButton.setText(_translate("MainWindow", "<"))
|
||||
self.menuMap.setTitle(_translate("MainWindow", "Map Filter"))
|
||||
self.menuGametype_Filter.setTitle(_translate("MainWindow", "Gametype Filter"))
|
||||
self.action_generateMission.setText(_translate("MainWindow", "_generateMission"))
|
||||
self.action_scenarioSelected.setText(_translate("MainWindow", "_scenarioSelected"))
|
||||
self.action_blueforcesSelected.setText(_translate("MainWindow", "_blueforcesSelected"))
|
||||
self.action_redforcesSelected.setText(_translate("MainWindow", "_redforcesSelected"))
|
||||
self.action_defensiveModeChanged.setText(_translate("MainWindow", "_defensiveModeChanged"))
|
||||
self.action_nextScenario.setText(_translate("MainWindow", "_nextScenario"))
|
||||
self.action_prevScenario.setText(_translate("MainWindow", "_prevScenario"))
|
||||
self.actionCaucasus.setText(_translate("MainWindow", "Caucasus"))
|
||||
self.actionPersian_Gulf.setText(_translate("MainWindow", "Persian Gulf"))
|
||||
self.actionMarianas.setText(_translate("MainWindow", "Marianas"))
|
||||
self.actionNevada.setText(_translate("MainWindow", "Nevada"))
|
||||
self.actionSyria.setText(_translate("MainWindow", "Syria"))
|
||||
self.actionAll.setText(_translate("MainWindow", "All"))
|
||||
self.actionMultiplayer.setText(_translate("MainWindow", "Multiplayer"))
|
||||
self.actionAll_2.setText(_translate("MainWindow", "All"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,8 @@ def triggerSetup(rops, options):
|
||||
# Add the first trigger
|
||||
trig = dcs.triggers.TriggerOnce(comment="RotorOps Setup Scripts")
|
||||
trig.rules.append(dcs.condition.TimeAfter(1))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["mist_4_4_90.lua"]))
|
||||
#trig.actions.append(dcs.action.DoScriptFile(rops.scripts["mist_4_4_90.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["mist_4_5_107_grimm.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["Splash_Damage_2_0.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["CTLD.lua"]))
|
||||
trig.actions.append(dcs.action.DoScriptFile(rops.scripts["RotorOps.lua"]))
|
||||
|
||||
@ -5,16 +5,13 @@ from MissionGenerator import logger
|
||||
|
||||
class ImportObjects:
|
||||
|
||||
def __init__(self, mizfile, source_point=None, source_heading=0):
|
||||
def __init__(self, mizfile):
|
||||
self.pad_unit = True #todo: use this to hold a unit for helicopter placement on ships ie flight_group_from_unit
|
||||
logger.info("Importing objects from " + mizfile)
|
||||
self.source_mission = dcs.mission.Mission()
|
||||
self.source_mission.load_file(mizfile)
|
||||
self.source_heading = source_heading
|
||||
if source_point:
|
||||
self.source_point = source_point
|
||||
else:
|
||||
self.source_point = dcs.Point(self.source_mission.terrain.bullseye_blue["x"], self.source_mission.terrain.bullseye_blue["y"])
|
||||
self.source_heading = None
|
||||
self.source_point = None
|
||||
self.statics = []
|
||||
self.vehicles = []
|
||||
self.helicopters = []
|
||||
|
||||
@ -4,6 +4,7 @@ import dcs
|
||||
import os
|
||||
import random
|
||||
|
||||
|
||||
import RotorOpsGroups
|
||||
import RotorOpsUnits
|
||||
import RotorOpsUtils
|
||||
@ -11,6 +12,7 @@ import RotorOpsConflict
|
||||
from RotorOpsImport import ImportObjects
|
||||
import time
|
||||
from MissionGenerator import logger
|
||||
from MissionGenerator import directories
|
||||
|
||||
jtf_red = "Combined Joint Task Forces Red"
|
||||
jtf_blue = "Combined Joint Task Forces Blue"
|
||||
@ -19,15 +21,15 @@ class RotorOpsMission:
|
||||
|
||||
def __init__(self):
|
||||
self.m = dcs.mission.Mission()
|
||||
os.chdir("../")
|
||||
self.home_dir = os.getcwd()
|
||||
self.scenarios_dir = self.home_dir + "\Generator\Scenarios"
|
||||
self.forces_dir = self.home_dir + "\Generator\Forces"
|
||||
self.script_directory = self.home_dir
|
||||
self.sound_directory = self.home_dir + "\sound\embedded"
|
||||
self.output_dir = self.home_dir + "\Generator\Output"
|
||||
self.assets_dir = self.home_dir + "\Generator/assets"
|
||||
self.imports_dir = self.home_dir + "\Generator\Imports"
|
||||
# os.chdir("../")
|
||||
# directories.home_dir = os.getcwd()
|
||||
# directories.scenarios = directories.home_dir + "\Generator\Scenarios"
|
||||
# directories.forces = directories.home_dir + "\Generator\Forces"
|
||||
# directories.scripts = directories.home_dir
|
||||
# directories.sound = directories.home_dir + "\sound\embedded"
|
||||
# directories.output = directories.home_dir + "\Generator\Output"
|
||||
# directories.assets = directories.home_dir + "\Generator/assets"
|
||||
# directories.imports = directories.home_dir + "\Generator\Imports"
|
||||
|
||||
self.conflict_zones = {}
|
||||
self.staging_zones = {}
|
||||
@ -89,8 +91,8 @@ class RotorOpsMission:
|
||||
attack_planes = []
|
||||
fighter_planes = []
|
||||
|
||||
os.chdir(self.home_dir)
|
||||
os.chdir(self.forces_dir + "/" + side)
|
||||
os.chdir(directories.home_dir)
|
||||
os.chdir(directories.forces + "/" + side)
|
||||
logger.info("Looking for " + side + " Forces files in '" + os.getcwd())
|
||||
source_mission = dcs.mission.Mission()
|
||||
|
||||
@ -124,9 +126,11 @@ class RotorOpsMission:
|
||||
logger.error("Failed to load units from " + filename)
|
||||
|
||||
def generateMission(self, options):
|
||||
os.chdir(self.scenarios_dir)
|
||||
os.chdir(directories.scenarios)
|
||||
logger.info("Looking for mission files in " + os.getcwd())
|
||||
|
||||
|
||||
|
||||
self.m.load_file(options["scenario_filename"])
|
||||
|
||||
self.importObjects()
|
||||
@ -135,7 +139,7 @@ class RotorOpsMission:
|
||||
self.m.coalition.get("neutrals").add_country(dcs.countries.UnitedNationsPeacekeepers())
|
||||
|
||||
if not self.m.country(jtf_red) or not self.m.country(jtf_blue) or not self.m.country(dcs.countries.UnitedNationsPeacekeepers.name):
|
||||
failure_msg = "You must include a CombinedJointTaskForcesBlue and CombinedJointTaskForcesRed unit in the scenario template. See the instructions in " + self.scenarios_dir
|
||||
failure_msg = "You must include a CombinedJointTaskForcesBlue and CombinedJointTaskForcesRed unit in the scenario template. See the instructions in " + directories.scenarios
|
||||
return {"success": False, "failure_msg": failure_msg}
|
||||
|
||||
red_forces = self.getUnitsFromMiz(options["red_forces_filename"], "red")
|
||||
@ -147,8 +151,8 @@ class RotorOpsMission:
|
||||
# blue = self.m.coalition.get("blue")
|
||||
# blue.add_country(dcs.countries.CombinedJointTaskForcesBlue())
|
||||
|
||||
self.m.add_picture_blue(self.assets_dir + '/briefing1.png')
|
||||
self.m.add_picture_blue(self.assets_dir + '/briefing2.png')
|
||||
self.m.add_picture_blue(directories.assets + '/briefing1.png')
|
||||
self.m.add_picture_blue(directories.assets + '/briefing2.png')
|
||||
|
||||
|
||||
# add zones to target mission
|
||||
@ -207,7 +211,7 @@ class RotorOpsMission:
|
||||
hidden=False, dead=False,
|
||||
farp_type=dcs.unit.InvisibleFARP)
|
||||
|
||||
os.chdir(self.imports_dir)
|
||||
os.chdir(directories.imports)
|
||||
if self.config and self.config["zone_farp_file"]:
|
||||
filename = self.config["zone_farp_file"]
|
||||
else:
|
||||
@ -249,7 +253,7 @@ class RotorOpsMission:
|
||||
# RotorOpsGroups.VehicleTemplate.CombinedJointTaskForcesBlue.logistics_site(self.m, self.m.country(jtf_blue),
|
||||
# blue_zones[zone_name].position,
|
||||
# 180, zone_name)
|
||||
os.chdir(self.imports_dir)
|
||||
os.chdir(directories.imports)
|
||||
staging_flag = self.m.find_group(zone_name)
|
||||
if staging_flag:
|
||||
staging_position = staging_flag.units[0].position
|
||||
@ -293,15 +297,15 @@ class RotorOpsMission:
|
||||
self.m.map.zoom = 100000
|
||||
|
||||
#add files and triggers necessary for RotorOps.lua script
|
||||
self.addResources(self.sound_directory, self.script_directory)
|
||||
self.addResources(directories.sound, directories.scripts)
|
||||
RotorOpsConflict.triggerSetup(self, options)
|
||||
|
||||
|
||||
#Save the mission file
|
||||
os.chdir(self.output_dir)
|
||||
os.chdir(directories.output)
|
||||
output_filename = options["scenario_filename"].removesuffix('.miz') + " " + time.strftime('%a%H%M%S') + '.miz'
|
||||
success = self.m.save(output_filename)
|
||||
return {"success": success, "filename": output_filename, "directory": self.output_dir} #let the UI know the result
|
||||
return {"success": success, "filename": output_filename, "directory": directories.output} #let the UI know the result
|
||||
|
||||
def addGroundGroups(self, zone, _country, groups, quantity):
|
||||
for a in range(0, quantity):
|
||||
@ -344,8 +348,10 @@ class RotorOpsMission:
|
||||
def getParking(self, airport, aircraft, alt_airports=None, group_size=1):
|
||||
|
||||
if len(airport.free_parking_slots(aircraft)) >= group_size:
|
||||
if not (aircraft.id in dcs.planes.plane_map and len(airport.runways) == 0):
|
||||
if not (aircraft.id in dcs.planes.plane_map and (len(airport.runways) == 0 or airport.runways[0].ils is None)):
|
||||
return airport
|
||||
|
||||
|
||||
if alt_airports:
|
||||
for airport in alt_airports:
|
||||
if len(airport.free_parking_slots(aircraft)) >= group_size:
|
||||
@ -483,7 +489,7 @@ class RotorOpsMission:
|
||||
if farp.units[0].type == 'Invisible FARP':
|
||||
fg.points[0].action = dcs.point.PointAction.FromGroundArea
|
||||
fg.points[0].type = "TakeOffGround"
|
||||
fg.units[0].position = fg.units[0].position.point_from_heading(heading, 30)
|
||||
fg.units[0].position = fg.units[0].position.point_from_heading(heading, 20)
|
||||
heading += 90
|
||||
else:
|
||||
fg = self.m.flight_group_from_airport(self.m.country(jtf_blue), primary_f_airport.name + " " + helotype.id, helotype,
|
||||
@ -508,12 +514,12 @@ class RotorOpsMission:
|
||||
return dcs.mapping.Point(x1, y1), heading, race_dist
|
||||
|
||||
@staticmethod
|
||||
def perpRacetrack(enemy_heading, friendly_pt):
|
||||
def perpRacetrack(enemy_heading, friendly_pt, terrain):
|
||||
heading = enemy_heading + random.randrange(70,110)
|
||||
race_dist = random.randrange(40 * 1000, 80 * 1000)
|
||||
center_pt = dcs.mapping.point_from_heading(friendly_pt.x, friendly_pt.y, enemy_heading - random.randrange(140, 220), 10000)
|
||||
pt1 = dcs.mapping.point_from_heading(center_pt[0], center_pt[1], enemy_heading - 90, random.randrange(20 * 1000, 40 * 1000))
|
||||
return dcs.mapping.Point(pt1[0], pt1[1]), heading, race_dist
|
||||
return dcs.mapping.Point(pt1[0], pt1[1], terrain), heading, race_dist
|
||||
|
||||
def addFlights(self, options, red_forces, blue_forces):
|
||||
combinedJointTaskForcesBlue = self.m.country(dcs.countries.CombinedJointTaskForcesBlue.name)
|
||||
@ -543,7 +549,7 @@ class RotorOpsMission:
|
||||
awacs_name = "AWACS"
|
||||
awacs_freq = 266
|
||||
#pos, heading, race_dist = self.TrainingScenario.random_orbit(orbit_rect)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position, self.m.terrain)
|
||||
awacs = self.m.awacs_flight(
|
||||
combinedJointTaskForcesBlue,
|
||||
awacs_name,
|
||||
@ -589,7 +595,7 @@ class RotorOpsMission:
|
||||
t2_freq = 256
|
||||
t2_tac = "101Y"
|
||||
#pos, heading, race_dist = self.TrainingScenario.random_orbit(orbit_rect)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position, self.m.terrain)
|
||||
refuel_net = self.m.refuel_flight(
|
||||
combinedJointTaskForcesBlue,
|
||||
t1_name,
|
||||
@ -605,7 +611,7 @@ class RotorOpsMission:
|
||||
tacanchannel=t1_tac)
|
||||
|
||||
#pos, heading, race_dist = self.TrainingScenario.random_orbit(orbit_rect)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position)
|
||||
pos, heading, race_dist = self.TrainingScenario.perpRacetrack(e_airport_heading, primary_f_airport.position, self.m.terrain)
|
||||
refuel_rod = self.m.refuel_flight(
|
||||
combinedJointTaskForcesBlue,
|
||||
t2_name,
|
||||
@ -762,7 +768,7 @@ class RotorOpsMission:
|
||||
|
||||
|
||||
def importObjects(self):
|
||||
os.chdir(self.imports_dir)
|
||||
os.chdir(directories.imports)
|
||||
logger.info("Looking for import .miz files in '" + os.getcwd())
|
||||
|
||||
for side in "red", "blue", "neutrals":
|
||||
|
||||
@ -2,7 +2,7 @@ import dcs
|
||||
|
||||
client_helos = [
|
||||
dcs.helicopters.UH_1H,
|
||||
dcs.helicopters.Mi_8MT,
|
||||
dcs.helicopters.AH_64D_BLK_II,
|
||||
dcs.helicopters.Mi_24P,
|
||||
dcs.helicopters.Ka_50,
|
||||
]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
61
Generator/assets/frameless.qss
Normal file
61
Generator/assets/frameless.qss
Normal file
@ -0,0 +1,61 @@
|
||||
#windowFrame {
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
background-color: palette(Window);
|
||||
}
|
||||
|
||||
#titleBar {
|
||||
border: 0px none palette(base);
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
background-color: palette(Window);
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
#btnClose, #btnRestore, #btnMaximize, #btnMinimize {
|
||||
min-width: 14px;
|
||||
min-height: 14px;
|
||||
max-width: 14px;
|
||||
max-height: 14px;
|
||||
border-radius: 7px;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
#btnRestore, #btnMaximize {
|
||||
background-color: hsv(123, 204, 198);
|
||||
}
|
||||
|
||||
#btnRestore::hover, #btnMaximize::hover {
|
||||
background-color: hsv(123, 204, 148);
|
||||
}
|
||||
|
||||
#btnRestore::pressed, #btnMaximize::pressed {
|
||||
background-color: hsv(123, 204, 98);
|
||||
}
|
||||
|
||||
#btnMinimize {
|
||||
background-color: hsv(38, 218, 253);
|
||||
}
|
||||
|
||||
#btnMinimize::hover {
|
||||
background-color: hsv(38, 218, 203);
|
||||
}
|
||||
|
||||
#btnMinimize::pressed {
|
||||
background-color: hsv(38, 218, 153);
|
||||
}
|
||||
|
||||
#btnClose {
|
||||
background-color: hsv(0, 182, 252);
|
||||
}
|
||||
|
||||
#btnClose::hover {
|
||||
background-color: hsv(0, 182, 202);
|
||||
}
|
||||
|
||||
#btnClose::pressed {
|
||||
background-color: hsv(0, 182, 152);
|
||||
}
|
||||
|
||||
#btnClose::disabled, #btnRestore::disabled, #btnMaximize::disabled, #btnMinimize::disabled {
|
||||
background-color: palette(midlight);
|
||||
}
|
||||
BIN
Generator/assets/rotorops-dkgray.png
Normal file
BIN
Generator/assets/rotorops-dkgray.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
148
Generator/assets/style.qss
Normal file
148
Generator/assets/style.qss
Normal file
@ -0,0 +1,148 @@
|
||||
/*
|
||||
* QGroupBox
|
||||
*/
|
||||
|
||||
QGroupBox {
|
||||
background-color: palette(alternate-base);
|
||||
border: 1px solid palette(midlight);
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
QGroupBox::title {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/*
|
||||
* QToolBar
|
||||
*/
|
||||
|
||||
QToolBar {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* QTabBar
|
||||
*/
|
||||
|
||||
QTabBar{
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
QTabBar::tab{
|
||||
padding: 4px 6px;
|
||||
background-color: transparent;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected, QTabBar::tab:hover {
|
||||
color: palette(text);
|
||||
border-bottom: 2px solid palette(highlight);
|
||||
}
|
||||
|
||||
QTabBar::tab:selected:disabled {
|
||||
border-bottom: 2px solid palette(light);
|
||||
}
|
||||
|
||||
/*
|
||||
* QScrollBar
|
||||
*/
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: palette(base);
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
width: 16px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
background-color: palette(midlight);
|
||||
border-radius: 2px;
|
||||
min-height: 20px;
|
||||
margin: 2px 4px 2px 4px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical:hover, QScrollBar::handle:horizontal:hover, QScrollBar::handle:vertical:pressed, QScrollBar::handle:horizontal:pressed {
|
||||
background-color:palette(highlight);
|
||||
}
|
||||
|
||||
QScrollBar::add-line:vertical {
|
||||
background: none;
|
||||
height: 0px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
background: none;
|
||||
height: 0px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar:horizontal{
|
||||
background: palette(base);
|
||||
height: 16px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal {
|
||||
background-color: palette(midlight);
|
||||
border-radius: 2px;
|
||||
min-width: 20px;
|
||||
margin: 4px 2px 4px 2px;
|
||||
}
|
||||
|
||||
|
||||
QScrollBar::add-line:horizontal {
|
||||
background: none;
|
||||
width: 0px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:horizontal {
|
||||
background: none;
|
||||
width: 0px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
/*
|
||||
* QScrollArea
|
||||
*/
|
||||
|
||||
QScrollArea {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
QScrollArea > QWidget > QWidget {
|
||||
background-color: palette(alternate-base);
|
||||
}
|
||||
|
||||
/*
|
||||
* QSlider
|
||||
*/
|
||||
|
||||
QSlider::handle:horizontal {
|
||||
border-radius: 5px;
|
||||
background-color: palette(light);
|
||||
max-height: 20px;
|
||||
}
|
||||
|
||||
QSlider::add-page:horizontal {
|
||||
background: palette(base);
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal {
|
||||
background: palette(highlight);
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background-color: palette(light);
|
||||
}
|
||||
|
||||
QTableView {
|
||||
background-color: palette(link-visited);
|
||||
alternate-background-color: palette(midlight);
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
26
RotorOps.lua
26
RotorOps.lua
@ -747,11 +747,25 @@ function RotorOps.aiExecute(vars)
|
||||
-- if vars.zone then zone = vars.zone end
|
||||
|
||||
|
||||
if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then
|
||||
--error after Apache update
|
||||
-- if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then
|
||||
-- debugMsg(group_name.." no longer exists")
|
||||
-- RotorOps.ai_tasks[group_name] = nil
|
||||
-- return
|
||||
-- end
|
||||
|
||||
if Group.getByName(group_name) then
|
||||
if Group.isExist(Group.getByName(group_name)) ~= true or #Group.getByName(group_name):getUnits() < 1 then
|
||||
debugMsg(group_name.." no longer exists")
|
||||
RotorOps.ai_tasks[group_name] = nil
|
||||
return
|
||||
end
|
||||
else
|
||||
debugMsg(group_name.." no longer exists")
|
||||
RotorOps.ai_tasks[group_name] = nil
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
local same_zone = false
|
||||
if zone ~= nil then
|
||||
@ -1499,9 +1513,9 @@ function RotorOps.spawnTranspHelos(troops, max_drops)
|
||||
|
||||
end
|
||||
|
||||
--- USEFUL PUBLIC 'LUA PREDICATE' FUNCTIONS FOR MISSION EDITOR TRIGGERS
|
||||
--- USEFUL PUBLIC 'LUA PREDICATE' FUNCTIONS FOR MISSION EDITOR TRIGGERS (don't forget that DCS lua predicate functions should 'return' these function calls)
|
||||
|
||||
--determine if any players are above a defined ceiling above ground level. If 'above' parameter is false, function will return true if no players above ceiling
|
||||
--determine if any human players are above a defined ceiling above ground level. If 'above' parameter is false, function will return true if no players above ceiling
|
||||
function RotorOps.predPlayerMaxAGL(max_agl, above)
|
||||
local players_above_ceiling = 0
|
||||
|
||||
@ -1525,7 +1539,7 @@ function RotorOps.predPlayerMaxAGL(max_agl, above)
|
||||
|
||||
end
|
||||
|
||||
--determine if any players are in a zone (not currently working)
|
||||
--determine if any human players are in a zone
|
||||
function RotorOps.predPlayerInZone(zone_name)
|
||||
local players_in_zone = 0
|
||||
for uName, uData in pairs(mist.DBs.humansByName) do
|
||||
|
||||
9084
mist_4_5_107_grimm.lua
Normal file
9084
mist_4_5_107_grimm.lua
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user