mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-29 02:04:28 +00:00
null check if difficulties dont exist
This commit is contained in:
parent
21726ee56a
commit
a0271a3e92
|
@ -145,12 +145,13 @@ class SongLoad
|
|||
*/
|
||||
public static function castArrayToNoteData(noteStuff:Array<SwagSection>)
|
||||
{
|
||||
if (noteStuff == null)
|
||||
return;
|
||||
|
||||
for (sectionIndex => section in noteStuff)
|
||||
{
|
||||
for (noteIndex => noteDataArray in section.sectionNotes)
|
||||
{
|
||||
trace(noteDataArray);
|
||||
|
||||
var arrayDipshit:Array<Dynamic> = cast noteDataArray; // crackhead
|
||||
|
||||
// at this point noteStuff[sectionIndex].sectionNotes[noteIndex] is an array because of the cast from the first line in this function
|
||||
|
@ -170,6 +171,9 @@ class SongLoad
|
|||
*/
|
||||
public static function castNoteDataToArray(noteStuff:Array<SwagSection>)
|
||||
{
|
||||
if (noteStuff == null)
|
||||
return;
|
||||
|
||||
for (sectionIndex => section in noteStuff)
|
||||
{
|
||||
for (noteIndex => noteTypeDefShit in section.sectionNotes)
|
||||
|
|
|
@ -6,6 +6,7 @@ import Section.SwagSection;
|
|||
import SongLoad.SwagSong;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.addons.display.FlxGridOverlay;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.addons.ui.FlxInputText;
|
||||
import flixel.addons.ui.FlxUI;
|
||||
import flixel.addons.ui.FlxUICheckBox;
|
||||
|
@ -216,6 +217,8 @@ class ChartingState extends MusicBeatState
|
|||
|
||||
var reloadSongJson:FlxButton = new FlxButton(reloadSong.x, saveButton.y + 30, "Reload JSON", function()
|
||||
{
|
||||
FlxTransitionableState.skipNextTransIn = true;
|
||||
FlxTransitionableState.skipNextTransOut = true;
|
||||
loadJson(_song.song.toLowerCase());
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue