mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-30 03:25:47 -05:00
Fix a bug where if Weekend 1 wasn't cleared, you can't chart those songs
This commit is contained in:
parent
fbba04bbe7
commit
f129cb7997
4 changed files with 6 additions and 5 deletions
|
@ -404,11 +404,12 @@ class Song implements IPlayStateScriptedClass implements IRegistryEntry<SongMeta
|
||||||
*
|
*
|
||||||
* @param variationId Optionally filter by a single variation.
|
* @param variationId Optionally filter by a single variation.
|
||||||
* @param variationIds Optionally filter by multiple variations.
|
* @param variationIds Optionally filter by multiple variations.
|
||||||
|
* @param showLocked Include charts which are not unlocked
|
||||||
* @param showHidden Include charts which are not accessible to the player.
|
* @param showHidden Include charts which are not accessible to the player.
|
||||||
*
|
*
|
||||||
* @return The list of difficulties.
|
* @return The list of difficulties.
|
||||||
*/
|
*/
|
||||||
public function listDifficulties(?variationId:String, ?variationIds:Array<String>, showHidden:Bool = false):Array<String>
|
public function listDifficulties(?variationId:String, ?variationIds:Array<String>, showLocked:Bool = false, showHidden:Bool = false):Array<String>
|
||||||
{
|
{
|
||||||
if (variationIds == null) variationIds = [];
|
if (variationIds == null) variationIds = [];
|
||||||
if (variationId != null) variationIds.push(variationId);
|
if (variationId != null) variationIds.push(variationId);
|
||||||
|
|
|
@ -73,7 +73,7 @@ class ChartEditorImportExportHandler
|
||||||
state.loadInstFromAsset(Paths.inst(songId, '-$variation'), variation);
|
state.loadInstFromAsset(Paths.inst(songId, '-$variation'), variation);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (difficultyId in song.listDifficulties(variation))
|
for (difficultyId in song.listDifficulties(variation, true, true))
|
||||||
{
|
{
|
||||||
var diff:Null<SongDifficulty> = song.getDifficulty(difficultyId, variation);
|
var diff:Null<SongDifficulty> = song.getDifficulty(difficultyId, variation);
|
||||||
if (diff == null) continue;
|
if (diff == null) continue;
|
||||||
|
|
|
@ -195,7 +195,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
var song:Song = SongRegistry.instance.fetchEntry(songId);
|
var song:Song = SongRegistry.instance.fetchEntry(songId);
|
||||||
|
|
||||||
// Only display songs which actually have available charts for the current character.
|
// Only display songs which actually have available charts for the current character.
|
||||||
var availableDifficultiesForSong:Array<String> = song.listDifficulties(displayedVariations);
|
var availableDifficultiesForSong:Array<String> = song.listDifficulties(displayedVariations, false);
|
||||||
if (availableDifficultiesForSong.length == 0) continue;
|
if (availableDifficultiesForSong.length == 0) continue;
|
||||||
|
|
||||||
songs.push(new FreeplaySongData(levelId, songId, song, displayedVariations));
|
songs.push(new FreeplaySongData(levelId, songId, song, displayedVariations));
|
||||||
|
@ -1400,7 +1400,7 @@ class FreeplaySongData
|
||||||
|
|
||||||
function updateValues(variations:Array<String>):Void
|
function updateValues(variations:Array<String>):Void
|
||||||
{
|
{
|
||||||
this.songDifficulties = song.listDifficulties(variations);
|
this.songDifficulties = song.listDifficulties(variations, false, false);
|
||||||
if (!this.songDifficulties.contains(currentDifficulty)) currentDifficulty = Constants.DEFAULT_DIFFICULTY;
|
if (!this.songDifficulties.contains(currentDifficulty)) currentDifficulty = Constants.DEFAULT_DIFFICULTY;
|
||||||
|
|
||||||
var songDifficulty:SongDifficulty = song.getDifficulty(currentDifficulty, variations);
|
var songDifficulty:SongDifficulty = song.getDifficulty(currentDifficulty, variations);
|
||||||
|
|
|
@ -169,7 +169,7 @@ class Level implements IRegistryEntry<LevelData>
|
||||||
if (firstSong != null)
|
if (firstSong != null)
|
||||||
{
|
{
|
||||||
// Don't display alternate characters in Story Mode. Only show `default` and `erect` variations.
|
// Don't display alternate characters in Story Mode. Only show `default` and `erect` variations.
|
||||||
for (difficulty in firstSong.listDifficulties([Constants.DEFAULT_VARIATION, 'erect']))
|
for (difficulty in firstSong.listDifficulties([Constants.DEFAULT_VARIATION, 'erect'], false, false))
|
||||||
{
|
{
|
||||||
difficulties.push(difficulty);
|
difficulties.push(difficulty);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue