1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-10-03 15:59:04 +00:00

Fixes to Erect/Nightmare only

This commit is contained in:
EliteMasterEric 2023-12-19 01:25:15 -05:00
parent 4ff5bd21df
commit 328bb7b938
4 changed files with 20 additions and 2 deletions

View file

@ -34,6 +34,18 @@ class Cursor
Cursor.cursorMode = null;
}
public static inline function toggle():Void
{
if (FlxG.mouse.visible)
{
hide();
}
else
{
show();
}
}
public static final CURSOR_DEFAULT_PARAMS:CursorParams =
{
graphic: "assets/images/cursor/cursor-default.png",

View file

@ -164,6 +164,7 @@ class StageDataParser
try
{
var parser = new json2object.JsonParser<StageData>();
parser.ignoreUnknownVariables = false;
parser.fromJson(rawJson, '$stageId.json');
if (parser.errors.length > 0)

View file

@ -1010,7 +1010,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
function get_availableDifficulties():Array<String>
{
var m:Null<SongMetadata> = songMetadata.get(selectedVariation);
return m?.playData?.difficulties ?? [];
return m?.playData?.difficulties ?? [Constants.DEFAULT_DIFFICULTY];
}
/**
@ -1069,7 +1069,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
var result:Null<SongChartData> = songChartData.get(selectedVariation);
if (result == null)
{
result = new SongChartData(["normal" => 1.0], [], ["normal" => []]);
result = new SongChartData([Constants.DEFAULT_DIFFICULTY => 1.0], [], [Constants.DEFAULT_DIFFICULTY => []]);
songChartData.set(selectedVariation, result);
}
return result;
@ -1293,6 +1293,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
function set_selectedDifficulty(value:String):String
{
if (value == null) value = availableDifficulties[0] ?? Constants.DEFAULT_DIFFICULTY;
selectedDifficulty = value;
// Make sure view is updated when the difficulty changes.

View file

@ -687,6 +687,9 @@ class ChartEditorDialogHandler
Conductor.instrumentalOffset = state.currentInstrumentalOffset; // Loads from the metadata.
Conductor.mapTimeChanges(state.currentSongMetadata.timeChanges);
state.selectedVariation = Constants.DEFAULT_VARIATION;
state.selectedDifficulty = state.availableDifficulties[0];
state.difficultySelectDirty = true;
dialog.hideDialog(DialogButton.APPLY);