summaryrefslogtreecommitdiff
path: root/game/01_init.rpy
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-07-28 10:07:12 -0300
committerJesusaves <cpntb1@ymail.com>2022-07-28 10:07:12 -0300
commita0d4981e4f5e1cc03506324a602cf4468b6eee90 (patch)
tree3cdd600dd09199bc143115f019ce50688fc86194 /game/01_init.rpy
parentab245b9ca20067afc35effdaa64594f7305c1dd6 (diff)
downloadclient-a0d4981e4f5e1cc03506324a602cf4468b6eee90.tar.gz
client-a0d4981e4f5e1cc03506324a602cf4468b6eee90.tar.bz2
client-a0d4981e4f5e1cc03506324a602cf4468b6eee90.tar.xz
client-a0d4981e4f5e1cc03506324a602cf4468b6eee90.zip
Add bare support to RenPy 8
Diffstat (limited to 'game/01_init.rpy')
-rw-r--r--game/01_init.rpy14
1 files changed, 10 insertions, 4 deletions
diff --git a/game/01_init.rpy b/game/01_init.rpy
index bcc8052..0b6eb48 100644
--- a/game/01_init.rpy
+++ b/game/01_init.rpy
@@ -30,8 +30,14 @@ 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):
- 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.")
+ print(PYTHON_VERSION)
+ if (PYTHON_VERSION < 2700):
+ raise Exception("WARNING: Python version is too old\nStrange bugs may happen on your client.\n\nClick on \"Ignore\" to continue.\nClick on \"Quit\" to exit.")
+ # From Python 3.6.x up to Python 3.9.x supported
+ elif (PYTHON_VERSION > 3600 and PYTHON_VERSION < 4000):
+ pass
+ else:
+ raise Exception("WARNING: Python version is too recent\nStrange bugs may happen on your client.\n\nClick on \"Ignore\" to continue.\nClick on \"Quit\" to exit.")
# Configuration
config.autoreload = False
@@ -286,7 +292,7 @@ init -3 python:
#page.close()
return surf
- except Exception, e:
+ except Exception as e:
if renpy.config.missing_image_callback:
im = renpy.config.missing_image_callback(self.loc)
if im is None:
@@ -357,7 +363,7 @@ init -3 python:
ver=int(x.text)
except:
stdout("IMPOSSIBLE TO DETERMINE VERSION")
- raise Exception("Could not estabilish a connection to update server:\n%s is not valid." % x.text) # TODO: Show this beautifully?
+ raise Exception("Could not estabilish a connection to update server:\n%s is not valid." % repr(x.text)) # TODO: Show this beautifully?
# TODO: Should we set a "ver"?
if (int(persistent.version) < ver):