Make UNLOCK_EVERYTHING work properly with songs.

This commit is contained in:
MoonDroid
2025-05-22 16:55:51 +07:00
parent 59a2b4ce6f
commit a5b4a7d2cc
2 changed files with 8 additions and 15 deletions
+4 -11
View File
@@ -653,7 +653,8 @@ class Project extends HXProject {
FEATURE_NEWGROUNDS.apply(this, false);
EXCLUDE_ARMV7.apply(this, false);
FEATURE_COMPRESSED_TEXTURES.apply(this, false);
FEATURE_GHOST_TAPPING.apply(this, isTest());
FEATURE_GHOST_TAPPING.apply(this, false);
UNLOCK_EVERYTHING.apply(this, false);
// Should be true unless explicitly requested.
HARDCODED_CREDITS.apply(this, true);
@@ -670,7 +671,7 @@ class Project extends HXProject {
// Got a lot of complains about this being turned off by default on some builds.
// TODO: Look into ways to optimize logging (maybe by using a thread pool?)
FEATURE_LOG_TRACE.apply(this, isDebug() || isTest());
FEATURE_LOG_TRACE.apply(this, isDebug());
FEATURE_NEWGROUNDS.apply(this, !isMobile());
FEATURE_NEWGROUNDS_DEBUG.apply(this, false);
@@ -719,10 +720,7 @@ class Project extends HXProject {
FEATURE_MOBILE_IAP.apply(this, (isMobile() && isRelease() && envConfig != null));
// Should be true only on debug mobile builds.
TESTING_ADS.apply(this, (isTest() || isDebug()) && FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this));
// For now needed only on mobile for testing.
UNLOCK_EVERYTHING.apply(this, isMobile());
TESTING_ADS.apply(this, isDebug() && FEATURE_MOBILE_ADVERTISEMENTS.isEnabled(this));
}
/**
@@ -1128,11 +1126,6 @@ class Project extends HXProject {
return this.targetFlags.exists("bundle") && isAndroid();
}
public function isTest():Bool
{
return this.targetFlags.exists("test");
}
public function getHaxedef(name:String):Null<Dynamic>
{
return this.haxedefs.get(name);
+4 -4
View File
@@ -858,10 +858,6 @@ class Save
*/
public function hasBeatenSong(songId:String, ?difficultyList:Array<String>, ?variation:String):Bool
{
#if UNLOCK_EVERYTHING
return true;
#end
if (difficultyList == null)
{
difficultyList = ['easy', 'normal', 'hard'];
@@ -876,6 +872,7 @@ class Save
var score:Null<SaveScoreData> = getSongScore(songId, difficulty);
if (score != null)
{
#if NO_UNLOCK_EVERYTHING
if (score.score > 0)
{
// Level has score data, which means we cleared it!
@@ -886,6 +883,9 @@ class Save
// Level has score data, but the score is 0.
continue;
}
#else
return true;
#end
}
}
return false;