diff --git a/source/states/ChartingState.hx b/source/states/ChartingState.hx index 344a8dc..41730fd 100644 --- a/source/states/ChartingState.hx +++ b/source/states/ChartingState.hx @@ -169,7 +169,7 @@ class ChartingState extends ExtendableState { setBPMButton = new FlxButton(FlxG.width - 110, 250, "Set BPM", setBPM); add(setBPMButton); - var gridBlackLine:FlxSprite = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height), FlxColor.BLACK); + var gridBlackLine:FlxSprite = new FlxSprite(gridBG.x + gridBG.width / 2).makeGraphic(2, Std.int(gridBG.height) + 40, FlxColor.BLACK); add(gridBlackLine); strumLine = new FlxSprite(0, 50).makeGraphic(Std.int(FlxG.width / 2), 4); diff --git a/source/states/ScriptedState.hx b/source/states/ScriptedState.hx index 4e41d1e..68a2abf 100644 --- a/source/states/ScriptedState.hx +++ b/source/states/ScriptedState.hx @@ -24,17 +24,19 @@ class ScriptedState extends ExtendableState { for (mod in ModHandler.getModIDs()) folders.push('mods/' + mod + '/classes/'); #end - - var foundPath:String = null; for (folder in folders) { - if (FileSystem.exists(folder + path)) { - foundPath = folder + path + '.hxs'; - break; + if (FileSystem.exists(folder)) { + for (file in FileSystem.readDirectory(folder)) { + if (file.endsWith('.hxs')) { + path = folder + file; + break; + } + } } } - script = new Hscript(foundPath, false); - script.execute(foundPath, false); + script = new Hscript(path, false); + script.execute(path, false); scriptSet('this', this); scriptSet('add', add); diff --git a/source/substates/ScriptedSubState.hx b/source/substates/ScriptedSubState.hx index c87d4d5..5782d1d 100644 --- a/source/substates/ScriptedSubState.hx +++ b/source/substates/ScriptedSubState.hx @@ -18,17 +18,19 @@ class ScriptedSubState extends ExtendableSubState { for (mod in ModHandler.getModIDs()) folders.push('mods/' + mod + '/classes/'); #end - - var foundPath:String = null; for (folder in folders) { - if (FileSystem.exists(folder + path)) { - foundPath = folder + path + '.hxs'; - break; + if (FileSystem.exists(folder)) { + for (file in FileSystem.readDirectory(folder)) { + if (file.endsWith('.hxs')) { + path = folder + file; + break; + } + } } } - script = new Hscript(foundPath, false); - script.execute(foundPath, false); + script = new Hscript(path, false); + script.execute(path, false); scriptSet('this', this); scriptSet('add', add);