Skip to content

Commit

Permalink
Fixed compiling with some different settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowMario committed Oct 14, 2024
1 parent d95164a commit 690411f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions source/psychlua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,15 @@ class FunkinLua {
return true;
}

#if HSCRIPT_ALLOWED
var hscriptPath:String = findScript(scriptFile, '.hx');
if(hscriptPath != null)
{
for (hscriptInstance in game.hscriptArray)
if(hscriptInstance.origin == hscriptPath)
return true;
}
#end
return false;
});

Expand Down
2 changes: 1 addition & 1 deletion source/states/LoadingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class LoadingState extends MusicBeatState
}

pessy.animation.play('run', true);
Achievements.unlock('pessy_easter_egg');
#if ACHIEVEMENTS_ALLOWED Achievements.unlock('pessy_easter_egg'); #end

insert(members.indexOf(loadingText), pessy);
new FlxTimer().start(5, function(tmr:FlxTimer) canChangeState = true);
Expand Down
4 changes: 4 additions & 0 deletions source/states/editors/StageEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,7 @@ class StageEditorState extends MusicBeatState implements PsychUIEventHandler.Psy
}

createPopup.visible = createPopup.active = false;
#if MODS_ALLOWED
var modFolder:String = (Mods.currentModDirectory != null && Mods.currentModDirectory.length > 0) ? Paths.mods('${Mods.currentModDirectory}/images/') : Paths.mods('images/');
openSubState(new BasePrompt(480, 160, 'This file is not inside Psych Engine.', function(state:BasePrompt)
{
Expand Down Expand Up @@ -1767,6 +1768,9 @@ class StageEditorState extends MusicBeatState implements PsychUIEventHandler.Psy
btn.cameras = state.cameras;
state.add(btn);
}));
#else
showOutput('ERROR! File cannot be used, move it to "assets" and recompile.', true);
#end
}
_file = null;
#else
Expand Down

0 comments on commit 690411f

Please sign in to comment.