From ff952f6f904dc5ba87c5379ce06a129dc56efef7 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sat, 15 Jul 2023 21:54:01 +0100 Subject: [PATCH] Bug fixes * Fixed an issue with rollback during event cancellation, rolling back attributes * Fixed compatibility patch issue with None values --- game/scripts/events/queue.rpy | 5 +++++ game/scripts/utility/updater.rpy | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/game/scripts/events/queue.rpy b/game/scripts/events/queue.rpy index 9cd6b47e..2af20593 100644 --- a/game/scripts/events/queue.rpy +++ b/game/scripts/events/queue.rpy @@ -268,7 +268,10 @@ init -1 python: rollback = f"{stdcol.UNDERLINE}(Rollback){stdcol.END} " if renpy.in_rollback() else "" caller_id = _caller.id if _caller else renpy.get_filename_line() print(f"{rollback}Cancelling '{stdcol.GREEN}{self.id}{stdcol.END}' caller '{stdcol.BLUE}{caller_id}{stdcol.END}'... ") + self.started = False + self.completed = False + self.completed_failed = False if self._track_completion in event_callbacks: event_callbacks.remove(self._track_completion) @@ -279,6 +282,8 @@ init -1 python: if renpy.get_return_stack(): renpy.pop_call() + renpy.block_rollback() + def _track_completion(self, label, abnormal): if renpy.is_init_phase(): return diff --git a/game/scripts/utility/updater.rpy b/game/scripts/utility/updater.rpy index 53f89228..472431e3 100644 --- a/game/scripts/utility/updater.rpy +++ b/game/scripts/utility/updater.rpy @@ -141,10 +141,10 @@ init python: getattr(store, "letter_cards_store").wait = 7 # Fix revertable types for modding - mods_enabled = getattr(persistent, "mods_enabled", _set()) + mods_enabled = getattr(persistent, "mods_enabled", _set()) or _set() setattr(persistent, "mods_enabled", _set(mods_enabled)) - mods_list = getattr(persistent, "mods_list", _dict()) + mods_list = getattr(persistent, "mods_list", _dict()) or _dict() setattr(persistent, "mods_list", _dict(mods_list)) if current > latest: