From b049e11fd15406924c522455ba5e8ab1d15aad34 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 19 May 2021 15:30:43 -0300 Subject: New commandline argument: `launch` “Skips main menu” MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/core.rpy | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/core.rpy b/game/core.rpy index bfa51fe..928189e 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -208,8 +208,9 @@ default SCR_RESULT = None ## Command Line Interface init -4 python: USE_DUMMY_DATA = False + AUTOLAUNCH = False def parse_command(): - global USE_DUMMY_DATA + global USE_DUMMY_DATA, AUTOLAUNCH parser = renpy.arguments.ArgumentParser() ## Collect args @@ -229,7 +230,20 @@ init -4 python: if ("dummy" in args): print("Dummy Mode Enabled") USE_DUMMY_DATA = True + if ("launch" in args): + print("Auto-launch mode Enabled") + AUTOLAUNCH = True return True renpy.arguments.register_command('adv', parse_command) + +label main_menu: + ## Autolaunch - Skip main menu + if AUTOLAUNCH: + $stdout("Auto-launching...") + $AUTOLAUNCH=False + return + call screen main_menu() + $ renpy.quit() + -- cgit v1.2.3-70-g09d2