From f30f61adfa3701d60ea4e4d9bc9d1b51b603ffea Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 16 Jun 2022 21:15:18 +0000 Subject: Add Support for Renpy 8 --- game/core.rpy | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'game/core.rpy') diff --git a/game/core.rpy b/game/core.rpy index 90ba8eb..b4bbbf6 100644 --- a/game/core.rpy +++ b/game/core.rpy @@ -23,12 +23,18 @@ init -3 python: # Ren'Py should come with Python 2.7.10 (2710), but just in case # After all, I only tested with 2.7.10, 2.7.13 and 2.7.15 - if (PYTHON_VERSION < 2700 or PYTHON_VERSION > 3000): + if (PYTHON_VERSION < 2700): + raise KeyboardInterrupt("Unsupported Python version: %d" % PYTHON_VERSION) + elif (PYTHON_VERSION > 3000): + # This is Python 3.x execute=subprocess.run - # FIXME: check must be set and True - raise Exception("WARNING: Python version is not 2.7\nStrange bugs may happen on your client.\n\nClick on \"Ignore\" to continue.\nClick on \"Quit\" to exit.") + LEGACY = False + print("Python 3.x detected! Version is %d. Compatibility mode enabled!" % PYTHON_VERSION) else: + # This is Python 2.7 execute=subprocess.call + LEGACY = True + print("Python 2.7 detected! Setting legacy mode... (ver: %d)" % PYTHON_VERSION) ############################################################################# # Functions @@ -150,7 +156,10 @@ init -3 python: ############################################################################# ## Conditional imports if persistent.steam: - import _renpysteam as steam + try: + import _renpysteam as steam + except: + persistent.steam = False ############################################################################# # ["themanaworld.org", "germantmw.de", "moubootaurlegends.org"] -- cgit v1.2.3-70-g09d2