diff --git a/game/scripts/interface/achievements.rpy b/game/scripts/interface/achievements.rpy index 18bdb765..f5e7a7c6 100644 --- a/game/scripts/interface/achievements.rpy +++ b/game/scripts/interface/achievements.rpy @@ -208,38 +208,6 @@ init python: __regen(category_items) number_unlocked = len(tuple(filter(achievement.has, menu_items))) - class __Filter(Action): - # TODO: in 8.2, replace with CycleVariable("current_filter", (None, "Locked", "Unlocked", "Secret")) - def __call__(self): - global current_filter - global number_unlocked - - if current_filter is None: - current_filter = "Locked" - elif current_filter == "Locked": - current_filter = "Unlocked" - elif current_filter == "Unlocked": - current_filter = "Secret" - else: - current_filter = None - __regen() - number_unlocked = len(tuple(filter(achievement.has, menu_items))) - - class __Sort(Action): - # TODO: in 8.2, replace with CycleVariable("current_sorting", ("A-z", "z-A", "Unlocked", "Locked")) - def __call__(self): - global current_sorting - - if current_sorting == "A-z": - current_sorting = "z-A" - elif current_sorting == "z-A": - current_sorting = "Unlocked" - elif current_sorting == "Unlocked": - current_sorting = "Locked" - else: - current_sorting = "A-z" - __regen() - def __regen(category_items=achievements_db): global menu_items global menu_items_length @@ -318,10 +286,10 @@ screen achievement_menu(): style_prefix gui.theme('achievements_filters') pos (6, 384) if current_filter is None: - textbutton "Show: All" action __Filter() + textbutton "Show: All" action [CycleVariable("current_filter", (None, "Locked", "Unlocked", "Secret")), __regen] else: - textbutton "Show: [current_filter]" action __Filter() - textbutton "Sort by: [current_sorting]" action __Sort() + textbutton "Show: [current_filter]" action [CycleVariable("current_filter", (None, "Locked", "Unlocked", "Secret")), __regen] + textbutton "Sort by: [current_sorting]" action [CycleVariable("current_sorting", ("A-z", "z-A", "Unlocked", "Locked")), __regen] screen achievement_menuitem(): window: diff --git a/game/scripts/utility/updater.rpy b/game/scripts/utility/updater.rpy index 5c029e77..cfc81517 100644 --- a/game/scripts/utility/updater.rpy +++ b/game/scripts/utility/updater.rpy @@ -211,6 +211,8 @@ init python: doll.body.matrix = IdentityMatrix() + delattr(store, "achievements_dict") + if current > latest: raise Exception("Loaded save file is incompatible. (Save Version: {}, Game Version: {})".format(current, latest)) @@ -219,8 +221,6 @@ init python: setattr(store, "_savecompat", True) message = "Have fun!" - achievements.attempt_repair() - renpy.call_in_new_context("modal_popup", "Update Successful", "\nYour save file has been successfully updated to version {{b}}{}{{/b}}.\n\n{}".format(config.version, message), None, "Hurray!") renpy.block_rollback()