From 3970189fe92dbbdac9256687174f1a9953ee83cf Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 12 Sep 2024 15:43:40 -0400 Subject: [PATCH] Ensure save data gets flushed when you see a character --- source/funkin/save/Save.hx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/funkin/save/Save.hx b/source/funkin/save/Save.hx index 1fa283b26..43b7667da 100644 --- a/source/funkin/save/Save.hx +++ b/source/funkin/save/Save.hx @@ -407,6 +407,9 @@ class Save return data.unlocks.charactersSeen; } + /** + * Marks whether the player has seen the spotlight animation, which should only display once per save file ever. + */ public var oldChar(get, set):Bool; function get_oldChar():Bool @@ -416,7 +419,9 @@ class Save function set_oldChar(value:Bool):Bool { - return data.unlocks.oldChar = value; + data.unlocks.oldChar = value; + flush(); + return data.unlocks.oldChar; } /** @@ -425,7 +430,11 @@ class Save */ public function addCharacterSeen(character:String):Void { - if (!data.unlocks.charactersSeen.contains(character)) data.unlocks.charactersSeen.push(character); + if (!data.unlocks.charactersSeen.contains(character)) + { + data.unlocks.charactersSeen.push(character); + flush(); + } } /**