Skip to content

Commit

Permalink
quick fix again
Browse files Browse the repository at this point in the history
  • Loading branch information
Joalor64GH authored Nov 12, 2024
1 parent 8857ebf commit c7578ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion source/states/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 9 additions & 7 deletions source/states/ScriptedState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 9 additions & 7 deletions source/substates/ScriptedSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c7578ef

Please sign in to comment.