summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-19 15:30:43 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-19 15:30:43 -0300
commitb049e11fd15406924c522455ba5e8ab1d15aad34 (patch)
tree97d5ab92d907b01bb40e712193f35993fb346205
parentac0c15d53ca2477a0efabc292ace2ef3beccdacb (diff)
downloadrenpy-b049e11fd15406924c522455ba5e8ab1d15aad34.tar.gz
renpy-b049e11fd15406924c522455ba5e8ab1d15aad34.tar.bz2
renpy-b049e11fd15406924c522455ba5e8ab1d15aad34.tar.xz
renpy-b049e11fd15406924c522455ba5e8ab1d15aad34.zip
New commandline argument: `launch`
“Skips main menu”
-rw-r--r--game/core.rpy16
1 files changed, 15 insertions, 1 deletions
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()
+