diff options
-rw-r--r-- | game/core.rpy | 13 | ||||
-rw-r--r-- | game/renpy.rpy | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/game/core.rpy b/game/core.rpy index 14f22c9..8da3f7f 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -242,8 +242,9 @@ default MLP_DEST = None init -4 python: USE_DUMMY_DATA = False AUTOLAUNCH = False + AUTOWORLD = 0 def parse_command(): - global USE_DUMMY_DATA, AUTOLAUNCH + global USE_DUMMY_DATA, AUTOLAUNCH, AUTOWORLD global vault, VAULT_HOST, VAULT_CERT parser = renpy.arguments.ArgumentParser() @@ -299,8 +300,16 @@ init -4 python: print("version - shows the program version and exits") print("help - shows this help screen and exits") print("") - print("Last commands have precedence over earlier ones.") + print("Advanced:") + print("w<id> - logins to world <id> upon launching") + print("") + print("Latter commands have precedence over earlier ones.") renpy.quit() + elif (cmd.startswith("w")): + try: + AUTOWORLD=int(cmd[1:]) + except: + pass # Invalid world id else: print("\033[31;1mWARNING:\033[0m Unrecognized argument: %s" % cmd) return True diff --git a/game/renpy.rpy b/game/renpy.rpy index 2caa262..9cdb545 100644 --- a/game/renpy.rpy +++ b/game/renpy.rpy @@ -131,6 +131,12 @@ label start: #centered "Error" #if config.developer: # "User ID: [vaultId]" + + ## Automatic world selection from commandline + if (AUTOWORLD): + $ _return = AUTOWORLD + jump load_world + label start_loop: $ renpy.block_rollback() call screen mirrorlake |