summaryrefslogtreecommitdiff
path: root/game/core.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/core.rpy')
-rw-r--r--game/core.rpy17
1 files changed, 13 insertions, 4 deletions
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"]