-
Notifications
You must be signed in to change notification settings - Fork 592
compatibility changes for dadbattle + philly #789
Conversation
'Dad Battle' is now called 'Dad Battle' in game and uses 'dadbattle' as files 'Philly' is now called 'Philly Nice' in game and uses 'philly' as files
@theDetourist here ya go |
source/FreeplayState.hx
Outdated
@@ -202,13 +202,24 @@ class FreeplayState extends MusicBeatState | |||
|
|||
if (accepted) | |||
{ | |||
trace(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase()); | |||
// pre lowercasing the song name | |||
var songLowercase = switch (songs[curSelected].songName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switch case is hella wack you're repeating code and changing like one argument
Do something like this instead
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
switch (songLowercase) {
case 'dad-battle': songLowercase = 'dadbattle';
case 'philly-nice': songLowercase = 'philly';
}
source/Paths.hx
Outdated
@@ -97,14 +97,30 @@ class Paths | |||
|
|||
inline static public function voices(song:String) | |||
{ | |||
song = StringTools.replace(song," ", "-"); | |||
return 'songs:assets/songs/${song.toLowerCase()}/Voices.$SOUND_EXT'; | |||
var songLowercase = switch (song) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous
source/Paths.hx
Outdated
} | ||
|
||
inline static public function inst(song:String) | ||
{ | ||
song = StringTools.replace(song," ", "-"); | ||
return 'songs:assets/songs/${song.toLowerCase()}/Inst.$SOUND_EXT'; | ||
var songLowercase = switch (song) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous
source/PlayState.hx
Outdated
@@ -1368,9 +1389,20 @@ class PlayState extends MusicBeatState | |||
|
|||
var playerCounter:Int = 0; | |||
|
|||
// pre lowercasing the song name (generateSong) | |||
var songLowercase = switch (PlayState.SONG.song) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous
source/PlayState.hx
Outdated
|
||
if (SONG.song.toLowerCase() == 'eggnog') | ||
// pre lowercasing the song name (endSong) | ||
var songLowercase = switch (PlayState.SONG.song) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous
source/Song.hx
Outdated
var rawJson = Assets.getText(Paths.json(StringTools.replace(folder," ", "-").toLowerCase() + '/' + StringTools.replace(jsonInput," ", "-").toLowerCase())).trim(); | ||
trace(jsonInput); | ||
// pre lowercasing the folder name | ||
var folderLowercase = switch (folder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see previous
sure, changes comin' right up |
"This switch case is hella wack you're repeating code and changing like one argument"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; @Lucky-56 did you test it with the new changes?
ok... wierd things are happening. |
ah ok I broke Freeplay, nothing I can't fix |
it just crashes when going into freeplay now.. and I'm too tired to fix it now :/ |
highscore would be compatible if the package wasn't changed to KadeDev's own
it works now tested it completely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
switch (songHighscore) { | ||
case 'Dad-Battle': songHighscore = 'Dadbattle'; | ||
case 'Philly-Nice': songHighscore = 'Philly'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there has to be a less janky way to do this but this whole codebase is wack so whatever
just checked and remembered
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imagine making a commit and then immediately reverting it LOLL
yeah because I noticed it right when I commited... heh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Satin Panties and Winter Horrorland also need compatibility changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, disregard what i said
@kadedev ?????????????????? |
sorryy!!! |
yeah it's only hardcoded because it's for compatibility |
fixes:
'Dad Battle' is now called 'Dad Battle' in game and uses 'dadbattle' as files
'Philly' is now called 'Philly Nice' in game and uses 'philly' as files (reverted #760 and instead fixed it better)