Skip to content

Commit

Permalink
slight update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronya-Rand committed Dec 27, 2022
1 parent e03ade9 commit ab2d4be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions launcher/game/front_page.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ label front_page:
if persistent.daily_update_check and ((not persistent.last_update_check) or (datetime.date.today() > persistent.last_update_check)):
python hide:
persistent.last_update_check = datetime.date.today()
persistent.update_available = False
renpy.invoke_in_thread(fetch_ddmm_updates, update_json=True)
renpy.invoke_in_thread(fetch_ddmm_updates, mt=True, update_json=True)

Expand Down
6 changes: 4 additions & 2 deletions launcher/game/mmupdater.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ init python:
return tuple(int(num) for num in config.version.split("."))

def fetch_ddmm_updates(quiet=True, mt=False, update_json=True):
persistent.update_available = False
if not quiet:
process_text = ""
if mt:
Expand Down Expand Up @@ -93,6 +92,7 @@ label mmupdater:
if not os.path.exists(config.basedir + "/update"):
os.makedirs(config.basedir + "/update")

$ persistent.update_available = False
$ ddmm_chan = fetch_ddmm_updates(False)
$ ddmt_chan = fetch_ddmm_updates(False, True)
call screen ddmmupdate(ddmm_chan, ddmt_chan)
Expand Down Expand Up @@ -173,7 +173,7 @@ label install_ddmt_update_script(ddmt_chan):
filename = "DDLCModTemplate-" + ddmt_chan["tag_name"] + ".zip"

try:
for x in glob.glob("templates/DDLCModTemplate-*.zip"):
for x in glob.glob(config.basedir + "/templates/DDLCModTemplate-*.zip"):
os.remove(x)
except: pass

Expand All @@ -186,6 +186,8 @@ label install_ddmt_update_script(ddmt_chan):
os.rename(config.basedir + "/templates/guide.pdf", config.basedir + "/templates/Android Mod Guide.pdf")
except:
newTemplate.extract("Documentation/Android Mod Guide.pdf", config.basedir + "/templates")
shutil.move(config.basedir + "/templates/Documentation/Android Mod Guide.pdf", config.basedir + "/templates/Android Mod Guide.pdf")
shutil.rmtree(config.basedir + "/templates/Documentation")

persistent.update_available = False
interface.info("The update has been complete.")
Expand Down

0 comments on commit ab2d4be

Please sign in to comment.