mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
port SAVE from develop
This commit is contained in:
parent
f0ac09f949
commit
2a9814e030
1 changed files with 29 additions and 1 deletions
|
@ -125,6 +125,7 @@ class Save
|
|||
{
|
||||
// Default to having seen the default character.
|
||||
charactersSeen: ["bf"],
|
||||
oldChar: false
|
||||
},
|
||||
|
||||
optionsChartEditor:
|
||||
|
@ -406,13 +407,34 @@ 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
|
||||
{
|
||||
return data.unlocks.oldChar;
|
||||
}
|
||||
|
||||
function set_oldChar(value:Bool):Bool
|
||||
{
|
||||
data.unlocks.oldChar = value;
|
||||
flush();
|
||||
return data.unlocks.oldChar;
|
||||
}
|
||||
|
||||
/**
|
||||
* When we've seen a character unlock, add it to the list of characters seen.
|
||||
* @param character
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1027,6 +1049,12 @@ typedef SaveDataUnlocks =
|
|||
* add it to this list so that we don't show it again.
|
||||
*/
|
||||
var charactersSeen:Array<String>;
|
||||
|
||||
/**
|
||||
* This is a conditional when the player enters the character state
|
||||
* For the first time ever
|
||||
*/
|
||||
var oldChar:Bool;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue