mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add --dev flag to put the game in developer mode.
Right now the only thing this does is remove sleeps meant to give people time to read things that developers have already seen hundreds of times.
This commit is contained in:
parent
b4edd5d841
commit
2c6e8c414c
@ -58,7 +58,7 @@ def inject_custom_payloads(user_path: Path) -> None:
|
|||||||
PayloadDirectories.set_preferred(user_path / "MissionEditor" / "UnitPayloads")
|
PayloadDirectories.set_preferred(user_path / "MissionEditor" / "UnitPayloads")
|
||||||
|
|
||||||
|
|
||||||
def run_ui(game: Optional[Game], new_map: bool) -> None:
|
def run_ui(game: Optional[Game], new_map: bool, dev: bool) -> None:
|
||||||
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" # Potential fix for 4K screens
|
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" # Potential fix for 4K screens
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
@ -92,8 +92,10 @@ def run_ui(game: Optional[Game], new_map: bool) -> None:
|
|||||||
splash = QSplashScreen(pixmap)
|
splash = QSplashScreen(pixmap)
|
||||||
splash.show()
|
splash.show()
|
||||||
|
|
||||||
# Give enough time to read splash screen
|
# Developers are launching the game in a loop hundreds of times. We've read it.
|
||||||
time.sleep(3)
|
if not dev:
|
||||||
|
# Give enough time to read splash screen
|
||||||
|
time.sleep(3)
|
||||||
|
|
||||||
# Once splash screen is up : load resources & setup stuff
|
# Once splash screen is up : load resources & setup stuff
|
||||||
uiconstants.load_icons()
|
uiconstants.load_icons()
|
||||||
@ -172,16 +174,18 @@ def parse_args() -> argparse.Namespace:
|
|||||||
help="Emits a warning for weapons without date or fallback information.",
|
help="Emits a warning for weapons without date or fallback information.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument("--dev", action="store_true", help="Enable development mode.")
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--new-map",
|
"--new-map",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Use the Vue based map. Not yet fully functional.",
|
help="Use the React based map. Not yet fully functional.",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--old-map",
|
"--old-map",
|
||||||
dest="new_map",
|
dest="new_map",
|
||||||
action="store_false",
|
action="store_false",
|
||||||
help="Deprecated. Does nothing.",
|
help="Use the legacy map. This is the default.",
|
||||||
)
|
)
|
||||||
|
|
||||||
new_game = subparsers.add_parser("new-game")
|
new_game = subparsers.add_parser("new-game")
|
||||||
@ -352,7 +356,7 @@ def main():
|
|||||||
return
|
return
|
||||||
|
|
||||||
with Server().run_in_thread():
|
with Server().run_in_thread():
|
||||||
run_ui(game, args.new_map)
|
run_ui(game, args.new_map, args.dev)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user