Skip to content

Commit e7b10a3

Browse files
make onSongEnd cancellable
idk some rando asked for it
1 parent afe51ad commit e7b10a3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

source/funkin/game/PlayState.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,9 @@ class PlayState extends MusicBeatState
14591459
*/
14601460
public function endSong():Void
14611461
{
1462-
scripts.call("onSongEnd");
1462+
var event = scripts.event("onSongEnd", new CancellableEvent());
1463+
if (event.cancelled) return;
1464+
14631465
canPause = false;
14641466
inst.volume = 0;
14651467
vocals.volume = 0;

0 commit comments

Comments
 (0)