cleaned up code
"This switch case is hella wack you're repeating code and changing like one argument"
This commit is contained in:
@ -237,14 +237,10 @@ class PlayState extends MusicBeatState
|
||||
repReleases = 0;
|
||||
|
||||
// pre lowercasing the song name (create)
|
||||
var songLowercase = switch (PlayState.SONG.song)
|
||||
{
|
||||
case 'Dad Battle':
|
||||
StringTools.replace(PlayState.SONG.song," ", "").toLowerCase();
|
||||
case 'Philly Nice':
|
||||
StringTools.replace(PlayState.SONG.song," Nice", "").toLowerCase();
|
||||
default:
|
||||
StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase();
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
|
||||
#if windows
|
||||
@ -1083,14 +1079,10 @@ class PlayState extends MusicBeatState
|
||||
senpaiEvil.screenCenter();
|
||||
|
||||
// pre lowercasing the song name (schoolIntro)
|
||||
var songLowercase = switch (PlayState.SONG.song)
|
||||
{
|
||||
case 'Dad Battle':
|
||||
StringTools.replace(PlayState.SONG.song," ", "").toLowerCase();
|
||||
case 'Philly Nice':
|
||||
StringTools.replace(PlayState.SONG.song," Nice", "").toLowerCase();
|
||||
default:
|
||||
StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase();
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
if (songLowercase == 'roses' || songLowercase == 'thorns')
|
||||
{
|
||||
@ -1390,14 +1382,10 @@ class PlayState extends MusicBeatState
|
||||
var playerCounter:Int = 0;
|
||||
|
||||
// pre lowercasing the song name (generateSong)
|
||||
var songLowercase = switch (PlayState.SONG.song)
|
||||
{
|
||||
case 'Dad Battle':
|
||||
StringTools.replace(PlayState.SONG.song," ", "").toLowerCase();
|
||||
case 'Philly Nice':
|
||||
StringTools.replace(PlayState.SONG.song," Nice", "").toLowerCase();
|
||||
default:
|
||||
StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase();
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
// Per song offset check
|
||||
#if windows
|
||||
@ -2531,26 +2519,18 @@ class PlayState extends MusicBeatState
|
||||
|
||||
trace('LOADING NEXT SONG');
|
||||
// pre lowercasing the next story song name
|
||||
var nextSongLowercase = switch (PlayState.storyPlaylist[0])
|
||||
{
|
||||
case 'Dad Battle':
|
||||
StringTools.replace(PlayState.storyPlaylist[0]," ", "").toLowerCase();
|
||||
case 'Philly Nice':
|
||||
StringTools.replace(PlayState.storyPlaylist[0]," Nice", "").toLowerCase();
|
||||
default:
|
||||
StringTools.replace(PlayState.storyPlaylist[0]," ", "-").toLowerCase();
|
||||
}
|
||||
var songLowercase = StringTools.replace(PlayState.storyPlaylist[0], " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
trace(nextSongLowercase + difficulty);
|
||||
|
||||
// pre lowercasing the song name (endSong)
|
||||
var songLowercase = switch (PlayState.SONG.song)
|
||||
{
|
||||
case 'Dad Battle':
|
||||
StringTools.replace(PlayState.SONG.song," ", "").toLowerCase();
|
||||
case 'Philly Nice':
|
||||
StringTools.replace(PlayState.SONG.song," Nice", "").toLowerCase();
|
||||
default:
|
||||
StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase();
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
switch (songLowercase) {
|
||||
case 'dad-battle': songLowercase = 'dadbattle';
|
||||
case 'philly-nice': songLowercase = 'philly';
|
||||
}
|
||||
if (songLowercase == 'eggnog')
|
||||
{
|
||||
|
Reference in New Issue
Block a user