mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-16 20:01:49 -05:00
Additional save fix
This commit is contained in:
parent
b39712d33f
commit
d8903f138f
1 changed files with 16 additions and 0 deletions
|
@ -392,6 +392,22 @@ class Save
|
|||
*/
|
||||
public function getLevelScore(levelId:String, difficultyId:String = 'normal'):Null<SaveScoreData>
|
||||
{
|
||||
if (data.scores?.levels == null)
|
||||
{
|
||||
if (data.scores == null)
|
||||
{
|
||||
data.scores =
|
||||
{
|
||||
songs: [],
|
||||
levels: []
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
data.scores.levels = [];
|
||||
}
|
||||
}
|
||||
|
||||
var level = data.scores.levels.get(levelId);
|
||||
if (level == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue