From 148d2fcac5544266a43d17b7c4a066d3ebe00693 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 20 Jul 2023 22:11:17 +0100 Subject: [PATCH] Bug fixes * Fixed updater logo issues * Fixed modpath getting 'mods' subpath appended to it recursively with each clone --- game/scripts/doll/clothes.rpy | 3 ++- game/scripts/doll/clothes_dynamic.rpy | 3 ++- game/scripts/doll/makeup.rpy | 3 ++- game/scripts/options.rpy | 1 + game/scripts/utility/updater.rpy | 12 +++++++++++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/game/scripts/doll/clothes.rpy b/game/scripts/doll/clothes.rpy index a2485cbb..58453dd6 100644 --- a/game/scripts/doll/clothes.rpy +++ b/game/scripts/doll/clothes.rpy @@ -383,7 +383,8 @@ init python: def clone(self): """Creates a clone of this cloth object. Since it requires a parent object it should be used internally only to avoid object depth issue.""" - return DollCloth(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, self.modpath, self) + modpath = self.modpath.lstrip("mods/") + return DollCloth(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, modpath, self) def is_modded(self): """Returns True if item comes from a mod.""" diff --git a/game/scripts/doll/clothes_dynamic.rpy b/game/scripts/doll/clothes_dynamic.rpy index ac13e3a0..2226ea53 100644 --- a/game/scripts/doll/clothes_dynamic.rpy +++ b/game/scripts/doll/clothes_dynamic.rpy @@ -183,4 +183,5 @@ init python: def clone(self): """Creates a clone of this cloth object. Since it requires a parent object it should be used internally only to avoid object depth issue.""" - return DollClothDynamic(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, self.modpath, self._tracking, self) + modpath = self.modpath.lstrip("mods/") + return DollClothDynamic(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, modpath, self._tracking, self) diff --git a/game/scripts/doll/makeup.rpy b/game/scripts/doll/makeup.rpy index 4c613b26..b93fd86e 100644 --- a/game/scripts/doll/makeup.rpy +++ b/game/scripts/doll/makeup.rpy @@ -62,4 +62,5 @@ init python: def clone(self): """Creates a clone of this cloth object. Since it requires a parent object it should be used internally only to avoid object depth issue.""" - return DollMakeup(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, self.modpath, self, self.tracking) \ No newline at end of file + modpath = self.modpath.lstrip("mods/") + return DollMakeup(self.name, self.categories, self.type, self.id, [x for x in self.color] if self.color else None, self.zorder, self.unlocked, self.level, self.blacklist, modpath, self, self.tracking) diff --git a/game/scripts/options.rpy b/game/scripts/options.rpy index f1fd1f74..8a702ac7 100644 --- a/game/scripts/options.rpy +++ b/game/scripts/options.rpy @@ -168,6 +168,7 @@ init python: build.classify("game/presplash_*.png", "renpy") build.classify("game/outfits/**", "all") build.classify("game/mods/ExampleMod/**", "all") + build.classify("update/generic.webp", "pc mac") build.classify("**.py", None) build.classify("**.txt", None) diff --git a/game/scripts/utility/updater.rpy b/game/scripts/utility/updater.rpy index 370be1ae..b00da8cc 100644 --- a/game/scripts/utility/updater.rpy +++ b/game/scripts/utility/updater.rpy @@ -156,6 +156,16 @@ init python: if ev.completed and not states.cho.ev.inspect_her_body.T2_E3_complete: states.cho.ev.inspect_her_body.T2_E3_complete = True + if current < 1.453: + for i in states.dolls: + doll = getattr(store, i) + + for j in doll.outfits: + + for k in j.group: + if k.modpath: + k.modpath = "mods/" + k.modpath.split("/")[-1] + if current > latest: raise Exception("Loaded save file is incompatible. (Save Version: {}, Game Version: {})".format(current, latest)) @@ -200,7 +210,7 @@ init python: with open(path, "rb") as f: data = f.read() else: - data = Null() + return Null() return Fixed(im.Data(data, path), Text(UPDATE_VER, size=96, align=(0.5, 0.8), color="#000000", outlines=[( 1, "#ffffff", 0, 0 )]), fit_first=True)