From 5a0f55cc08fb2ad9c69da62b7ae7c66ec0ee6dc4 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Tue, 18 Jul 2023 16:17:35 +0100 Subject: [PATCH 01/10] Bug fix * Fixed stale images being displayed when threading is enabled and no image was called in a while --- game/scripts/doll/main.rpy | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 450eedfc..5a942049 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -155,25 +155,25 @@ init python: def _image(self, st, at): return self._sprite.get_with_default(Null()), None + def is_stale(self): + curr_hash = self.generate_hash() + stale = curr_hash != self._hash + self._hash = curr_hash + + if stale and settings.get("multithreading"): + self.build_image() + return stale + @property def image(self): + if not renpy.is_skipping() and self.is_stale(): + + if renpy.showing(get_character_tag(self.name), layer=self.layer): + self.show() + if settings.get("multithreading"): - - if not renpy.is_skipping() and self.is_stale(): - self.build_image() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() - # elif renpy.in_rollback(): - # self.build_image() - return DynamicDisplayable(self._image) else: - if not renpy.is_skipping() and self.is_stale(): - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() - return self._build_image(self._hash) def equip(self, obj, remove_old=True): From c536626a0b403c2776fcdf7957eaf198b9e553ad Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Tue, 18 Jul 2023 16:30:15 +0100 Subject: [PATCH 02/10] Bug fixes * Fixed outfit deletion tab not updating the list of items * Fixed Tonks' public requests menu crashing due to an omitted result type * Removed manual image rebuilding in wardrobe (superseded) --- game/scripts/characters/tonks/summon.rpy | 2 +- game/scripts/wardrobe/wardrobe.rpy | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/game/scripts/characters/tonks/summon.rpy b/game/scripts/characters/tonks/summon.rpy index 3148891f..1f5eb33f 100644 --- a/game/scripts/characters/tonks/summon.rpy +++ b/game/scripts/characters/tonks/summon.rpy @@ -126,7 +126,7 @@ label tonks_favor_menu: $ result = show_events_menu(tonks_requests) - if result == "disabled": + if result in ("disabled", "noncompliant"): "You haven't unlocked this request opportunity yet." jump .requests elif result == "exit": diff --git a/game/scripts/wardrobe/wardrobe.rpy b/game/scripts/wardrobe/wardrobe.rpy index 477517d9..728044dc 100644 --- a/game/scripts/wardrobe/wardrobe.rpy +++ b/game/scripts/wardrobe/wardrobe.rpy @@ -446,6 +446,7 @@ label wardrobe_menu(): if _confirmed: _choice[1].delete() + category_items = set_wardrobe_categories(current_category) renpy.notify("Outfit Deleted.") elif _choice[0] == "export": @@ -595,14 +596,10 @@ label wardrobe_menu(): renpy.music.play(last_track) DollThread.stop_all() - # set_wardrobe_categories.cache_clear() - char_active.build_image() enable_game_menu() renpy.return_statement() - $ char_active.build_image() - jump .after_init screen wardrobe_menu(xx, yy): From dad333ffc8074292515208bd8b52a0e5f00d975d Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Tue, 18 Jul 2023 17:01:17 +0100 Subject: [PATCH 03/10] Bug fixes and autosaves * Added autosave toggle * Fixed achievements being granted in replay scope --- game/scripts/gui/preferences.rpy | 1 + game/scripts/interface/achievements.rpy | 3 +++ 2 files changed, 4 insertions(+) diff --git a/game/scripts/gui/preferences.rpy b/game/scripts/gui/preferences.rpy index f1d4ec2d..0524024c 100644 --- a/game/scripts/gui/preferences.rpy +++ b/game/scripts/gui/preferences.rpy @@ -63,6 +63,7 @@ screen preferences_general(): textbutton _("Tooltips") action settings.Toggle("tooltip") textbutton _("System Cursor") action Preference("system cursor", "toggle") textbutton _("Automatic Updates") action settings.Toggle("updates") + textbutton _("Autosave") action ToggleField(store, "_autosave") default trans = config.intra_transition diff --git a/game/scripts/interface/achievements.rpy b/game/scripts/interface/achievements.rpy index 0aafce72..b90b29c7 100644 --- a/game/scripts/interface/achievements.rpy +++ b/game/scripts/interface/achievements.rpy @@ -83,6 +83,9 @@ init python: return self.achievements.get(id)[3] def unlock(self, id, silent=False): + if _in_replay: + return + if persistent.achievements[id][3] == False: self.achievements[id][3] = True persistent.achievements[id][3] = True From 105d60e61eaf9655cdc818ae3d2412040f477a01 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 19 Jul 2023 16:39:24 +0100 Subject: [PATCH 04/10] Bug fixes * Fixed cardgame TypeError crash during random matches * Fixed mistakenly excluded ExampleMod from releases --- game/mods/.gitignore | 5 +++++ game/scripts/minigames/cardgame/__card_game_init__.rpy | 2 +- game/scripts/options.rpy | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 game/mods/.gitignore diff --git a/game/mods/.gitignore b/game/mods/.gitignore new file mode 100644 index 00000000..f1bcb3c7 --- /dev/null +++ b/game/mods/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in this directory +* +# Except this file and ExampleMod +!.gitignore +!ExampleMod/ diff --git a/game/scripts/minigames/cardgame/__card_game_init__.rpy b/game/scripts/minigames/cardgame/__card_game_init__.rpy index 6d859b81..69923e68 100644 --- a/game/scripts/minigames/cardgame/__card_game_init__.rpy +++ b/game/scripts/minigames/cardgame/__card_game_init__.rpy @@ -579,7 +579,7 @@ init python: while min > get_deck_score(new_deck) or max < get_deck_score(new_deck): replace_index = 0 - if new_deck < min: + if get_deck_score(new_deck) < min: replace_index = find_index_func(temp_pool, smalles_func) else: replace_index = find_index_func(temp_pool, gretest_func) diff --git a/game/scripts/options.rpy b/game/scripts/options.rpy index d934fc34..86d59851 100644 --- a/game/scripts/options.rpy +++ b/game/scripts/options.rpy @@ -167,7 +167,7 @@ init python: build.classify("icon.ico", "windows") build.classify("game/presplash_*.png", "renpy") build.classify("game/outfits/**", "all") - build.classify("game/mods/MyMod/**", "all") + build.classify("game/mods/ExampleMod/**", "all") build.classify("**.py", None) build.classify("**.txt", None) From 18721850f51edfaa2a328cbbca6fc938ee405fee Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 19 Jul 2023 17:49:51 +0100 Subject: [PATCH 05/10] Bug fix * Fixed mods warning for compatible mods due to old var reference --- game/scripts/gui/mods.rpy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/scripts/gui/mods.rpy b/game/scripts/gui/mods.rpy index 7a045e70..efb1cb1e 100644 --- a/game/scripts/gui/mods.rpy +++ b/game/scripts/gui/mods.rpy @@ -63,7 +63,7 @@ screen mods(): text "[name]": style "mods_text" size 16 - if not compat >= compatible_version: + if not compat >= mods_compatible: color "#ff8000" text "[version]": @@ -101,7 +101,7 @@ screen mods(): add logo xalign 0.5 size (320, 240) text "[name]\n[version]" offset (6, 6) - if not compat >= compatible_version: + if not compat >= mods_compatible: text "{color=#ff8000}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) else: text "{color=#228B22}[compat]{/color}" align (1.0, 1.0) offset (-6, -3) From 37ed32f50df8388902940926cfdb8cb95cc92e9d Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 19 Jul 2023 22:11:55 +0100 Subject: [PATCH 06/10] Bug fixes * Fixed updater (AGAIN!!) * Disabled the 'server not responding' hint because it doesn't really match what's happening in the server code * Version bump --- game/scripts/gui/main_menu.rpy | 2 +- game/scripts/options.rpy | 2 +- game/scripts/utility/updater.rpy | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/game/scripts/gui/main_menu.rpy b/game/scripts/gui/main_menu.rpy index 14190223..ec01c15a 100644 --- a/game/scripts/gui/main_menu.rpy +++ b/game/scripts/gui/main_menu.rpy @@ -255,7 +255,7 @@ screen navigation(title=None): if not title: if not renpy.mobile: - if version_float(UPDATE_VER) < version_float(): + if version_float(UPDATE_VER) > version_float(): textbutton "Install updates" action InstallUpdates() style_prefix "update_available" sensitive (not prerelease) else: textbutton "Check for updates" action CheckUpdates(300) sensitive (not prerelease) diff --git a/game/scripts/options.rpy b/game/scripts/options.rpy index 86d59851..f1fd1f74 100644 --- a/game/scripts/options.rpy +++ b/game/scripts/options.rpy @@ -38,7 +38,7 @@ define config.debug = config.developer or prerelease define config.console = True # Game version and naming -define config.version = "1.45.2" +define config.version = "1.45.3" define compatible_version = 1.451 define config.name = "Witch Trainer Silver" diff --git a/game/scripts/utility/updater.rpy b/game/scripts/utility/updater.rpy index 14c1ed17..370be1ae 100644 --- a/game/scripts/utility/updater.rpy +++ b/game/scripts/utility/updater.rpy @@ -5,6 +5,10 @@ init python: UPDATE_VER = None UPDATE_HINT = "" + if config.developer: + persistent._update_version = {} + persistent._update_last_checked = {} + @renpy.pure class CheckUpdates(Action): def __init__(self, interval=3600*6, simulate=None, onetime=False, autostart=True, **kwargs): @@ -52,15 +56,15 @@ init python: UPDATE_VER = persistent._update_version.get(url, None) - if version_float(UPDATE_VER) < version_float(): + if version_float(UPDATE_VER) > version_float(): if not self.onetime: UPDATE_HINT = "New game version available!" renpy.restart_interaction() if self.autostart: renpy.invoke_in_new_context(updater.update, self.url, simulate=self.simulate, **self.kwargs) - elif not UPDATE_VER: - ui.timer(2.0, SetVariable("UPDATE_HINT", "Server is not responding.")) + # elif not UPDATE_VER: + # ui.timer(2.0, SetVariable("UPDATE_HINT", "Server is not responding.")) elif not self.onetime: ui.timer(2.0, SetVariable("UPDATE_HINT", "You are already up-to-date.")) From ac39490836dbc441cdaff4686854f502d0500438 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 20 Jul 2023 22:11:17 +0100 Subject: [PATCH 07/10] 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) From cd8b94e40ce089529a933637ffddf47089631f20 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sun, 23 Jul 2023 17:40:03 +0100 Subject: [PATCH 08/10] Bug fixes and improvements * Improved skipping performance by delaying the call to render functions until after skipping ends * Fixed skipping not refreshing the doll image * Fixed skipping callback handler being affected by rollback * Refactored doll show method --- game/scripts/characters/astoria/common.rpy | 2 +- game/scripts/characters/cho/common.rpy | 2 +- game/scripts/characters/hermione/common.rpy | 2 +- game/scripts/characters/hooch/common.rpy | 2 +- game/scripts/characters/luna/common.rpy | 2 +- game/scripts/characters/susan/common.rpy | 2 +- game/scripts/characters/tonks/common.rpy | 2 +- game/scripts/doll/common.rpy | 7 +++- game/scripts/doll/main.rpy | 41 ++++++++------------- game/scripts/utility/skipping.rpy | 3 ++ 10 files changed, 31 insertions(+), 34 deletions(-) diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index 41f186d2..7165e474 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -38,7 +38,7 @@ init python: emote=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - astoria.show() + astoria.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index 91e78700..a77e10a9 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -36,7 +36,7 @@ init python in character: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - renpy.store.cho.show() + renpy.store.cho.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or renpy.store.d2) diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index 98a4d180..0e0b2050 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -31,7 +31,7 @@ init python: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - hermione.show() + hermione.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/characters/hooch/common.rpy b/game/scripts/characters/hooch/common.rpy index ac765507..08c21fcf 100644 --- a/game/scripts/characters/hooch/common.rpy +++ b/game/scripts/characters/hooch/common.rpy @@ -22,7 +22,7 @@ init python: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - hooch.show() + hooch.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index cc2c5353..f4ddc843 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -34,7 +34,7 @@ init python: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - luna.show() + luna.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index 5c0a2a06..0cec9062 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -33,7 +33,7 @@ init python: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - susan.show() + susan.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index c3b4ce38..92e6c766 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -44,7 +44,7 @@ init python: emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): def show(): - tonks.show() + tonks.show(force=True) if not renpy.in_rollback(): renpy.with_statement(trans or d2) diff --git a/game/scripts/doll/common.rpy b/game/scripts/doll/common.rpy index 8aaee2c6..a0bc9b0d 100644 --- a/game/scripts/doll/common.rpy +++ b/game/scripts/doll/common.rpy @@ -78,8 +78,11 @@ init -1 python: def DollRebuild(): for i in states.dolls: doll = getattr(store, i) - doll.build_image() + + if doll.is_stale() and not settings.get("multithreading"): + doll.show(ignore_skipping=True) + renpy.restart_interaction() config.after_load_callbacks.append(DollRebuild) - # end_skip_callbacks.append(DollRebuild) \ No newline at end of file + end_skip_callbacks.append(DollRebuild) diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 5a942049..0d3885ca 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -88,10 +88,16 @@ init python: salt = str( [self.name, self.pose, str(self.body._hash), str(self.face._hash), str(self.cum._hash), clothes_hash] ) return hash(salt) - def show(self): + def show(self, force=False, ignore_skipping=False): if renpy.get_screen(("wardrobe", "animatedCG", "studio")) or renpy.showing("cg"): return + if renpy.is_skipping() and not ignore_skipping: + return + + if not force and not renpy.showing(get_character_tag(self.name), layer=self.layer): + return + base_transform = doll_transform(self.pos, self.zoom, self.xzoom) animation = self.animation @@ -167,9 +173,7 @@ init python: @property def image(self): if not renpy.is_skipping() and self.is_stale(): - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() if settings.get("multithreading"): return DynamicDisplayable(self._image) @@ -226,9 +230,7 @@ init python: update_chibi(self.name) self.cum.is_stale() self.is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def unequip(self, *args): """Takes argument(s) containing string cloth type(s) to unequip.""" @@ -285,9 +287,7 @@ init python: update_chibi(self.name) self.cum.is_stale() self.is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def get_equipped(self, slot): """Takes argument containing string cloth type. Returns equipped object for cloth type.""" @@ -338,9 +338,7 @@ init python: update_chibi(self.name) self.is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def wear(self, *args): """Takes argument(s) containing string cloth type(s) to temporarily displace (hide).""" @@ -376,9 +374,7 @@ init python: update_chibi(self.name) self.is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def is_equipped(self, *args): """Takes argument containing string cloth type. Returns True if slot is occupied, False otherwise.""" @@ -491,16 +487,12 @@ init python: i[0].is_stale() self.is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def set_cum(self, *args, **kwargs): """Takes keyword argument(s) containing string name(s) of cum layers to apply or None.""" self.cum.set_cum(*args, **kwargs) - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.show() def set_pose(self, pose): pose = "default" if pose is None else pose @@ -512,9 +504,8 @@ init python: for i in self.states.values(): if i[0]: i[0].is_stale() - - if renpy.showing(get_character_tag(self.name), layer=self.layer): - self.show() + self.is_stale() + self.show() def rebuild_blacklist(self): blacklist = [] diff --git a/game/scripts/utility/skipping.rpy b/game/scripts/utility/skipping.rpy index e1fe93e3..9308b7be 100644 --- a/game/scripts/utility/skipping.rpy +++ b/game/scripts/utility/skipping.rpy @@ -9,6 +9,9 @@ init -5 python: self.was_skipping = False def __call__(self): + if renpy.in_rollback(): + return + is_skipping = renpy.is_skipping() was_skipping = self.was_skipping From 027f237606d19ff0f057229663d2c570e3ffa303 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 26 Jul 2023 22:50:01 +0100 Subject: [PATCH 09/10] Bug fix * Fixed puzzle generator outputting invalid combinations due to the lack of floor division --- game/scripts/minigames/puzzle.rpy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/scripts/minigames/puzzle.rpy b/game/scripts/minigames/puzzle.rpy index 22e446fa..db7a1855 100644 --- a/game/scripts/minigames/puzzle.rpy +++ b/game/scripts/minigames/puzzle.rpy @@ -23,7 +23,7 @@ init python: if (grid % 2 == 1): is_solvable = (inversions % 2 == 0) else: - blank_row = grid - (puzzle.index(blank) / grid) + blank_row = grid - (puzzle.index(blank) // grid) is_solvable = (inversions % 2 != blank_row % 2) too_difficult = (inversions <= difficulty) From 43b1954263dff900caa048f5927a4fd2c77b9b3c Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 27 Jul 2023 00:54:03 +0100 Subject: [PATCH 10/10] Bug fix * Fixed whitespace calculation for non-wardrobe elements * Fixed an issue with floats when expecting an int --- game/scripts/utility/image_crop.rpy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/scripts/utility/image_crop.rpy b/game/scripts/utility/image_crop.rpy index 694341c2..2b27c5b3 100644 --- a/game/scripts/utility/image_crop.rpy +++ b/game/scripts/utility/image_crop.rpy @@ -25,10 +25,10 @@ init python: size = surf.get_size() box = tuple(surf.get_bounding_rect()) - if size[0] != 1010: + if "/clothes/" in path and size[0] != 1010: ratio = size[0] / 1010 box = tuple(v/ratio for v in box) - whitespace_dict[path] = box + whitespace_dict[path] = tuple(map(int, box)) return box def crop_image_zoom(path, xsize, ysize, grayscale=False):