Skip to content

Commit

Permalink
Merge branch 'experimental' of https://github.com/ShadowMario/FNF-Psy…
Browse files Browse the repository at this point in the history
…chEngine into experimental
  • Loading branch information
ShadowMario committed Sep 16, 2024
2 parents bcd13b5 + 18f60ee commit 9b39fe8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions source/psychlua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,10 @@ class FunkinLua {
});
Lua_helper.add_callback(lua, "stopSound", function(tag:String) {
if(tag == null || tag.length < 1)
if(FlxG.sound.music != null) FlxG.sound.music.stop();
{
if(FlxG.sound.music != null)
FlxG.sound.music.stop();
}
else
{
tag = LuaUtils.formatVariable('sound_$tag');
Expand All @@ -1356,7 +1359,10 @@ class FunkinLua {
});
Lua_helper.add_callback(lua, "pauseSound", function(tag:String) {
if(tag == null || tag.length < 1)
if(FlxG.sound.music != null) FlxG.sound.music.pause();
{
if(FlxG.sound.music != null)
FlxG.sound.music.pause();
}
else
{
tag = LuaUtils.formatVariable('sound_$tag');
Expand All @@ -1366,7 +1372,10 @@ class FunkinLua {
});
Lua_helper.add_callback(lua, "resumeSound", function(tag:String) {
if(tag == null || tag.length < 1)
if(FlxG.sound.music != null) FlxG.sound.music.play();
{
if(FlxG.sound.music != null)
FlxG.sound.music.play();
}
else
{
tag = LuaUtils.formatVariable('sound_$tag');
Expand Down

0 comments on commit 9b39fe8

Please sign in to comment.