Skip to content
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

[Enhancement] Built in alt inst unlocking #3961

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MidyGamy
Copy link

This add a built in check of available alt inst and if it's unlocked, allowing to remove that annoying function found in almost all song scripts (and will be easier do add more mixes)

  public override function listAltInstrumentalIds(difficultyId:String, variationId:String):Array<String> {
    if (difficultyId == 'easy' || difficultyId == 'normal' || difficultyId == 'hard') {
      var hasBeatenPicoMix = Save.instance.hasBeatenSong(this.id, null, 'pico');

      switch (variationId) {
        case 'pico':
          // return hasBeatenPicoMix ? [''] : [];
          // No Pico mix on BF instrumental, sorry!
          return [];
        default:
          return hasBeatenPicoMix ? ['pico'] : [];
      }
    }
  }

It also adds the unlockedInstByDefault property in the song metadata of a song alt to lock it (since it's unlocked by default if the property doesn't exits)

@github-actions github-actions bot added size: medium A medium pull request with 100 or fewer changes. pr: haxe PR modifies game code. labels Dec 29, 2024
@MidyGamy
Copy link
Author

Btw that also fixes a problem where a song with a Pico Mix couldn't have an other altInst using the _merge folder

@MidyGamy MidyGamy changed the title [Enhancement] Built in alt inst checking [Enhancement] Built in alt inst unlocking Dec 29, 2024
@EliteMasterEric EliteMasterEric added the status: pending triage Awaiting review. label Jan 17, 2025
@TechnikTil
Copy link
Contributor

i made something like this on FunkinCrew/funkin.assets#105

@MidyGamy
Copy link
Author

i made something like this on FunkinCrew/funkin.assets#105

Yeah, but you have to manually put it every times, here it's built in, with just the need of a check box in the chart editor

@TechnikTil
Copy link
Contributor

i made something like this on FunkinCrew/funkin.assets#105

Yeah, but you have to manually put it every times, here it's built in, with just the need of a check box in the chart editor

o ok

@Hundrec Hundrec added the type: enhancement Involves an enhancement or new feature. label Jan 22, 2025
@AbnormalPoof
Copy link
Collaborator

This PR appears to have merge conflicts. Please fix them!

@AbnormalPoof AbnormalPoof added status: needs revision Cannot be approved because it is awaiting some work by the contributor. and removed status: pending triage Awaiting review. labels Jan 22, 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: needs revision Cannot be approved because it is awaiting some work by the contributor. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants