fixed the scripts

This commit is contained in:
Yoshman29
2023-01-10 13:54:54 +01:00
parent adb8a48480
commit 494f1ac3ca
5 changed files with 7 additions and 6 deletions
+1
View File
@@ -274,6 +274,7 @@ class CoolUtil
}
public static function __loadSong(name:String, difficulty:String) {
PlayState.difficulty = difficulty;
PlayState.SONG = Song.loadFromJson(name, difficulty);
}
public static function setSpriteSize(sprite:FlxSprite, width:Float, height:Float) {
+1 -1
View File
@@ -31,7 +31,7 @@ class Song
public static function loadFromJson(songName:String, ?difficulty:String = "normal"):SwagSong
{
var assetPath = Paths.chart(songName, difficulty);
PlayState.fromMods = assetPath.startsWith("mods");
PlayState.fromMods = Paths.assetsTree.existsSpecific(assetPath, "TEXT", MODS);
var rawJson = Assets.getText(assetPath).trim();
while (!rawJson.endsWith("}"))