From 5c1e08c46f12b7a937876787c20609b32ef42ea3 Mon Sep 17 00:00:00 2001 From: GanstaKingofSA Date: Thu, 26 Jan 2023 23:52:16 -0600 Subject: [PATCH] once again fix this thing --- launcher/game/front_page.rpy | 29 ++++++++++------------------- launcher/game/options.rpy | 2 +- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/launcher/game/front_page.rpy b/launcher/game/front_page.rpy index d9d1b57..bdcca26 100644 --- a/launcher/game/front_page.rpy +++ b/launcher/game/front_page.rpy @@ -31,30 +31,21 @@ init python: renpy.quit(relaunch=True) def readVersion(): - if persistent.projects_directory is not None: - # move renpy-version.txt to project game folder for easy transfer - old_txt_path = os.path.join(persistent.projects_directory, project.current.name, 'renpy-version.txt').replace("\\", "/") - - if os.path.exists(old_txt_path): - new_txt_path = os.path.join(persistent.projects_directory, project.current.name, 'game/renpy-version.txt').replace("\\", "/") - try: - renpy.file(old_txt_path) - shutil.move(old_txt_path, new_txt_path) - except IOError: pass - else: - new_txt_path = os.path.join(config.basedir, project.current.name, 'game/renpy-version.txt').replace("\\", "/") - else: - new_txt_path = os.path.join(config.basedir, project.current.name, 'game/renpy-version.txt').replace("\\", "/") + old_txt_path = os.path.join(project.current.path, 'renpy-version.txt').replace("\\", "/") + new_txt_path = os.path.join(project.current.path, 'game/renpy-version.txt').replace("\\", "/") + + if os.path.exists(old_txt_path): + shutil.move(old_txt_path, new_txt_path) + try: with open(new_txt_path) as f: - file_ver = f.readline().strip() + file_ver = int(f.readline().strip()) - int_ver = int(file_ver) - if int_ver >= 6 and int_ver <= 8: - return int_ver + if file_ver >= 6 and file_ver <= 8: + return file_ver else: return -1 - except IOError: + except IOError: return None except ValueError: return -1 diff --git a/launcher/game/options.rpy b/launcher/game/options.rpy index 564ea0a..2193a76 100644 --- a/launcher/game/options.rpy +++ b/launcher/game/options.rpy @@ -52,7 +52,7 @@ init -1 python hide: # These control the name and version of the game, that are reported # with tracebacks and other debugging logs. config.name = "Doki Doki Mod Maker" - config.version = "1.5.21" + config.version = "1.5.22" ##################### # Themes