From cd485b2bac0437ef8c480a8ea13b6c9cb9dc9071 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Fri, 17 Jun 2022 22:05:08 +0100 Subject: [PATCH] Bug fixes * Added checkpoints to forbid the editor from rolling back to menu context * Added forced checkpoint for when the editor is being opened to avoid rolling back to before it was opened (by opening a console for example) * Alleviated the issue for when the game tries to recover from the place it cannot stop rolling back, but version var is unavailable because of it being not initialized in that moment --- game/scripts/characters/astoria/summon.rpy | 2 ++ game/scripts/characters/cho/summon.rpy | 2 ++ game/scripts/characters/hermione/summon.rpy | 2 ++ game/scripts/characters/luna/summon.rpy | 2 ++ game/scripts/characters/snape/summon.rpy | 2 ++ game/scripts/characters/susan/summon.rpy | 2 ++ game/scripts/characters/tonks/summon.rpy | 2 ++ game/scripts/utility/editor.rpy | 5 +++-- game/scripts/utility/updater.rpy | 9 ++------- 9 files changed, 19 insertions(+), 9 deletions(-) diff --git a/game/scripts/characters/astoria/summon.rpy b/game/scripts/characters/astoria/summon.rpy index 90bec367..52320fc2 100644 --- a/game/scripts/characters/astoria/summon.rpy +++ b/game/scripts/characters/astoria/summon.rpy @@ -9,6 +9,8 @@ label summon_astoria: #call update_ast_tier call update_astoria + $ renpy.checkpoint(hard=True) + # Clothes Events call astoria_summon_setup diff --git a/game/scripts/characters/cho/summon.rpy b/game/scripts/characters/cho/summon.rpy index dc951443..0060cc0f 100644 --- a/game/scripts/characters/cho/summon.rpy +++ b/game/scripts/characters/cho/summon.rpy @@ -10,6 +10,8 @@ label summon_cho: #call update_cho_tier call update_cho + $ renpy.checkpoint(hard=True) + if has_cho_panties: if cho_tier == 2: jump cho_panties_response_T2 diff --git a/game/scripts/characters/hermione/summon.rpy b/game/scripts/characters/hermione/summon.rpy index a2a317ed..ab91dae9 100644 --- a/game/scripts/characters/hermione/summon.rpy +++ b/game/scripts/characters/hermione/summon.rpy @@ -12,6 +12,8 @@ label summon_hermione: call update_hermione call update_her_tier + $ renpy.checkpoint(hard=True) + # Clothes Events call hermione_summon_setup diff --git a/game/scripts/characters/luna/summon.rpy b/game/scripts/characters/luna/summon.rpy index 5b0906c5..029bb610 100644 --- a/game/scripts/characters/luna/summon.rpy +++ b/game/scripts/characters/luna/summon.rpy @@ -9,6 +9,8 @@ label summon_luna: call update_luna call update_lun_tier + $ renpy.checkpoint(hard=True) + call play_music("luna") call play_sound("door") call lun_chibi("stand","mid","base") diff --git a/game/scripts/characters/snape/summon.rpy b/game/scripts/characters/snape/summon.rpy index b30896fc..c7221fc2 100644 --- a/game/scripts/characters/snape/summon.rpy +++ b/game/scripts/characters/snape/summon.rpy @@ -9,6 +9,8 @@ label summon_snape: call sna_chibi("stand","mid","base") with d3 + $ renpy.checkpoint(hard=True) + sna "Yes, what is it?" ("snape_01",xpos="base",ypos="base", trans=d3) label snape_ready: diff --git a/game/scripts/characters/susan/summon.rpy b/game/scripts/characters/susan/summon.rpy index 6cf15240..41854f0b 100644 --- a/game/scripts/characters/susan/summon.rpy +++ b/game/scripts/characters/susan/summon.rpy @@ -8,6 +8,8 @@ label summon_susan: call update_susan + $ renpy.checkpoint(hard=True) + call play_music("susan") call play_sound("door") diff --git a/game/scripts/characters/tonks/summon.rpy b/game/scripts/characters/tonks/summon.rpy index e00981e6..69118f34 100644 --- a/game/scripts/characters/tonks/summon.rpy +++ b/game/scripts/characters/tonks/summon.rpy @@ -12,6 +12,8 @@ label summon_tonks: call play_music("tonks") call play_sound("door") + $ renpy.checkpoint(hard=True) + # Clothes Events call tonks_summon_setup diff --git a/game/scripts/utility/editor.rpy b/game/scripts/utility/editor.rpy index 31acc28c..7951a311 100644 --- a/game/scripts/utility/editor.rpy +++ b/game/scripts/utility/editor.rpy @@ -424,6 +424,8 @@ init python: renpy.show_screen("editor") renpy.restart_interaction() + renpy.game.context().force_checkpoint = True + renpy.checkpoint(hard=True) if config.developer: e = Editor() @@ -444,8 +446,7 @@ screen editor(): drag: pos (50, 50) - xminimum 500 - xmaximum 500 + maximum (500, 500) xsize 500 frame: diff --git a/game/scripts/utility/updater.rpy b/game/scripts/utility/updater.rpy index 2cd6c723..c3160549 100644 --- a/game/scripts/utility/updater.rpy +++ b/game/scripts/utility/updater.rpy @@ -63,13 +63,8 @@ init python: return latest = version_float() - - if not hasattr(renpy.store, "version"): - if hasattr(renpy.store, "save_internal_version"): - raise Exception("Loaded save file is incompatible. (Save Version: {}, Game Version: {})".format(getattr(renpy.store, "save_internal_version")), latest) - raise Exception("Loaded save file is incompatible. (Save Version: Unknown, Game Version: {})".format(latest)) - - current = version + # For unknown reasons, sometimes version is missing from the save, so we need a fallback + current = getattr(renpy.store, "version", latest) if current > latest: raise Exception("Loaded save file is incompatible. (Save Version: {}, Game Version: {})".format(current, latest))