mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 16:17:53 -05:00
Merge pull request #462 from FunkinCrew/bugfix/chart-editor-weekend-1
Bugfix/chart editor weekend 1
This commit is contained in:
commit
5c1b6d9848
6 changed files with 8 additions and 7 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit ddeed88638a6a36aca4d2a91633f48cff50dd6c7
|
Subproject commit a1d24709d4a89f188beac95b55da9594b2db28cd
|
|
@ -441,7 +441,7 @@ class PauseSubState extends MusicBeatSubState
|
||||||
var entries:Array<PauseMenuEntry> = [];
|
var entries:Array<PauseMenuEntry> = [];
|
||||||
if (PlayState.instance.currentChart != null)
|
if (PlayState.instance.currentChart != null)
|
||||||
{
|
{
|
||||||
var difficultiesInVariation = PlayState.instance.currentSong.listDifficulties(PlayState.instance.currentChart.variation);
|
var difficultiesInVariation = PlayState.instance.currentSong.listDifficulties(PlayState.instance.currentChart.variation, true);
|
||||||
trace('DIFFICULTIES: ${difficultiesInVariation}');
|
trace('DIFFICULTIES: ${difficultiesInVariation}');
|
||||||
for (difficulty in difficultiesInVariation)
|
for (difficulty in difficultiesInVariation)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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