mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-25 21:55:55 +00:00
Ensure save data gets flushed when you see a character
This commit is contained in:
parent
e5673549cf
commit
3970189fe9
|
|
@ -407,6 +407,9 @@ class Save
|
||||||
return data.unlocks.charactersSeen;
|
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;
|
public var oldChar(get, set):Bool;
|
||||||
|
|
||||||
function get_oldChar():Bool
|
function get_oldChar():Bool
|
||||||
|
|
@ -416,7 +419,9 @@ class Save
|
||||||
|
|
||||||
function set_oldChar(value:Bool):Bool
|
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
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue