Skip to content

Commit

Permalink
once again fix this thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya-Rand committed Jan 27, 2023
1 parent d79e085 commit 5c1e08c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
29 changes: 10 additions & 19 deletions launcher/game/front_page.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion launcher/game/options.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c1e08c

Please sign in to comment.