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] Change listAltInstrumentalIds overrides to support mods #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions preload/scripts/songs/blammed.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ class BlammedSong extends Song {
}

public override function listAltInstrumentalIds(difficultyId:String, variationId:String):Array<String> {
if (difficultyId == 'easy' || difficultyId == 'normal' || difficultyId == 'hard')
if(variationId == 'default')
{
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'] : [];
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}
}

return [];
return toReturn;
}
else
{
return [];
}
}
}
26 changes: 13 additions & 13 deletions preload/scripts/songs/bopeebo.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ class BopeeboSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}
}

return [];
return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/dadbattle.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class DadBattleSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
27 changes: 15 additions & 12 deletions preload/scripts/songs/eggnog.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ class EggnogSong extends Song
}

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'] : [];
}
}
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}

public override function onSongEnd(event:CountdownScriptEvent):Void {
Expand Down
23 changes: 13 additions & 10 deletions preload/scripts/songs/fresh.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,20 @@ class FreshSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/guns.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ class GunsSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}

Expand Down
23 changes: 13 additions & 10 deletions preload/scripts/songs/philly-nice.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class PhillyNiceSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/pico.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class PhillyNiceSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/south.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class SouthSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/spookeez.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class SpookeezSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}
}
23 changes: 13 additions & 10 deletions preload/scripts/songs/ugh.hxc
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ class UghSong extends Song {
}

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'] : [];
if(variationId == 'default')
{
var toReturn:Array<String> = [];
for(variation in super.listAltInstrumentalIds(difficultyId, variationId))
{
if(Save.instance.hasBeatenSong(this.id, null, variation))
toReturn.push(variation);
}

return toReturn;
}
else
{
return [];
}
}

Expand Down