Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to pass rpyc version value as an argument #4572

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions renpy/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import argparse
import os
import sys
import time

import renpy

Expand Down Expand Up @@ -118,6 +119,10 @@ def __init__(self, second_pass=True, description=None, require_command=True):
"--compile", action='store_true', dest='compile',
help='Forces all .rpy scripts to be recompiled before proceeding.')

self.add_argument(
"--rpyc-version", action='store', type=int, default=int(time.time()),
help='The integer version number to use when compiling .rpyc files. Defaults to the current epoch time.')

self.add_argument(
"--keep-orphan-rpyc", action="store_true",
help="Prevents the compile command from deleting orphan rpyc files.")
Expand Down
2 changes: 1 addition & 1 deletion renpy/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def assign_names(self, stmts, fn):

all_stmts = collapse_stmts(stmts)

version = int(time.time())
version = renpy.game.args.rpyc_version

for s in all_stmts:
if s.name is None:
Expand Down