free skill option

This commit is contained in:
Detoria
2021-05-06 17:16:28 -03:00
committed by GitHub
parent 42e916df6d
commit b2929d9ab8
6 changed files with 195 additions and 121 deletions

View File

@ -20,14 +20,16 @@ class Highscore
NGio.postScore(score, song);
#end
if (songScores.exists(daSong))
if(!FlxG.save.data.botplay)
{
if (songScores.get(daSong) < score)
if (songScores.exists(daSong))
{
if (songScores.get(daSong) < score)
setScore(daSong, score);
}
else
setScore(daSong, score);
}
else
setScore(daSong, score);
}else trace('BotPlay detected. Score saving is disabled.');
}
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
@ -37,16 +39,18 @@ class Highscore
NGio.postScore(score, "Week " + week);
#end
var daWeek:String = formatSong('week' + week, diff);
if (songScores.exists(daWeek))
if(!FlxG.save.data.botplay)
{
if (songScores.get(daWeek) < score)
var daWeek:String = formatSong('week' + week, diff);
if (songScores.exists(daWeek))
{
if (songScores.get(daWeek) < score)
setScore(daWeek, score);
}
else
setScore(daWeek, score);
}
else
setScore(daWeek, score);
}else trace('BotPlay detected. Score saving is disabled.');
}
/**
@ -95,4 +99,4 @@ class Highscore
songScores = FlxG.save.data.songScores;
}
}
}
}