mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-27 07:27:12 +00:00
Erect mixes play properly when selected
This commit is contained in:
parent
a599dbea11
commit
09654170ed
|
@ -103,9 +103,9 @@ class Paths
|
|||
return 'songs:assets/songs/${song.toLowerCase()}/Voices$suffix.$SOUND_EXT';
|
||||
}
|
||||
|
||||
inline static public function inst(song:String)
|
||||
inline static public function inst(song:String, ?suffix:String)
|
||||
{
|
||||
return 'songs:assets/songs/${song.toLowerCase()}/Inst.$SOUND_EXT';
|
||||
return 'songs:assets/songs/${song.toLowerCase()}/Inst$suffix.$SOUND_EXT';
|
||||
}
|
||||
|
||||
inline static public function image(key:String, ?library:String)
|
||||
|
|
|
@ -253,7 +253,8 @@ class SongDifficulty
|
|||
|
||||
public inline function playInst(volume:Float = 1.0, looped:Bool = false)
|
||||
{
|
||||
FlxG.sound.playMusic(Paths.inst(this.song.songId), volume, looped);
|
||||
var suffix:String = variation == null ? null : '-$variation';
|
||||
FlxG.sound.playMusic(Paths.inst(this.song.songId, suffix), volume, looped);
|
||||
}
|
||||
|
||||
public inline function cacheVocals()
|
||||
|
@ -265,7 +266,7 @@ class SongDifficulty
|
|||
{
|
||||
// TODO: Implement.
|
||||
|
||||
return [""];
|
||||
return [variation == null ? '' : '-$variation'];
|
||||
}
|
||||
|
||||
public function buildVocals(charId:String = "bf"):VoicesGroup
|
||||
|
|
|
@ -143,9 +143,15 @@ class SongDataParser
|
|||
|
||||
for (variation in variations)
|
||||
{
|
||||
var variationRawJson:String = loadSongMetadataFile(songId, variation);
|
||||
var variationSongMetadata:SongMetadata = SongMigrator.migrateSongMetadata(variationRawJson, '${songId}_${variation}');
|
||||
variationSongMetadata = SongValidator.validateSongMetadata(variationSongMetadata, '${songId}_${variation}');
|
||||
var variationJsonStr:String = loadSongMetadataFile(songId, variation);
|
||||
var variationJsonData:Dynamic = null;
|
||||
try
|
||||
{
|
||||
variationJsonData = Json.parse(variationJsonStr);
|
||||
}
|
||||
catch (e) {}
|
||||
var variationSongMetadata:SongMetadata = SongMigrator.migrateSongMetadata(variationJsonData, '${songId}-${variation}');
|
||||
variationSongMetadata = SongValidator.validateSongMetadata(variationSongMetadata, '${songId}-${variation}');
|
||||
if (variationSongMetadata != null)
|
||||
{
|
||||
variationSongMetadata.variation = variation;
|
||||
|
|
|
@ -127,6 +127,8 @@ class Level implements IRegistryEntry<LevelData>
|
|||
var songId:String = songList[songIndex];
|
||||
var song:Song = funkin.play.song.SongData.SongDataParser.fetchSong(songId);
|
||||
|
||||
if (song == null) continue;
|
||||
|
||||
for (difficulty in difficulties)
|
||||
{
|
||||
if (!song.hasDifficulty(difficulty))
|
||||
|
|
Loading…
Reference in a new issue