Skip to content

[ENHANCEMENT] Ability to prevent the Freeplay Song preview from playing #5272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KoloInDaCrib
Copy link
Contributor

Linked Issues

N/A

Description

There has been a big debate whether or not having the song labelled as "NEW" should prevent the preview from being played or not. This PR provides an alternative solution so that both parties are satisfied.
If the song's script has a function override canPlayPreview (with params being the same as with isSongNew), with the return false, the freeplay song preview would be replaced by the Random track. However, if multiple songs in a row have canPlayPreview disabled, the 'Random' track wouldn't get reset.

Script Example
import funkin.play.song.Song;
class PhillyNiceSong extends Song
{
	public function new() {
		super('philly-nice');
	}

	public override function canPlayPreview(currentDifficulty:String, currentVariation:String):Bool {
		return false;
	}
}

Screenshots/Videos

random.is.awesome.mp4

@github-actions github-actions bot added size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. pr: haxe PR modifies game code. labels Jun 27, 2025
@AbnormalPoof AbnormalPoof added type: enhancement Involves an enhancement or new feature. topic: mods Related to the creation or use of mods. labels Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. topic: mods Related to the creation or use of mods. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants