fixed the scripts
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1991
|
||||
1994
|
||||
@@ -549,8 +549,8 @@ class PlayState extends MusicBeatState
|
||||
// ADD YOUR HARDCODED SCRIPTS HERE!
|
||||
default:
|
||||
for(content in [
|
||||
Paths.getFolderContent('songs/${SONG.song.toLowerCase()}/scripts', true, !fromMods),
|
||||
Paths.getFolderContent('data/charts/', true, !fromMods)]) {
|
||||
Paths.getFolderContent('songs/${SONG.song.toLowerCase()}/scripts', true, fromMods ? MODS : SOURCE),
|
||||
Paths.getFolderContent('data/charts/', true, fromMods ? MODS : SOURCE)]) {
|
||||
for(file in content) {
|
||||
var ext = Path.extension(file).toLowerCase();
|
||||
if (Script.scriptExtensions.contains(ext))
|
||||
|
||||
@@ -260,7 +260,7 @@ class FreeplaySonglist {
|
||||
try {
|
||||
var json:FreeplayJSON = Json.parse(Paths.assetsTree.getSpecificAsset(path, "TEXT", source));
|
||||
addOGSongs = CoolUtil.getDefault(json.addOGSongs, true);
|
||||
_addJSONSongs(json.songs, false);
|
||||
_addJSONSongs(json.songs, source == SOURCE);
|
||||
} catch(e) {
|
||||
Logs.trace('Couldn\'t parse Freeplay JSON: ${e.toString()}');
|
||||
}
|
||||
@@ -286,7 +286,7 @@ class FreeplaySonglist {
|
||||
});
|
||||
}
|
||||
}
|
||||
_addJSONSongs(found, false);
|
||||
_addJSONSongs(found, source == SOURCE);
|
||||
}
|
||||
return addOGSongs;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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("}"))
|
||||
|
||||
Reference in New Issue
Block a user