compatibility changes for dadbattle + philly

'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
This commit is contained in:
Lucky56 2021-06-08 07:13:33 +02:00
parent 338e17eacb
commit 8ac6249e2b
No known key found for this signature in database
GPG Key ID: 19E3875EAD1F8B8F
17 changed files with 122 additions and 29 deletions

View File

@ -6,7 +6,7 @@ Spookeez:spooky:2
South:spooky:2
Monster:monster:2
Pico:pico:3
Philly:pico:3
Philly Nice:pico:3
Blammed:pico:3
Satin Panties:mom:4
High:mom:4

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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)
{
case 'Dad Battle':
StringTools.replace(songs[curSelected].songName," ", "").toLowerCase();
case 'Philly Nice':
StringTools.replace(songs[curSelected].songName," Nice", "").toLowerCase();
default:
StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase();
}
trace(songLowercase);
var poop:String = Highscore.formatSong(StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase(), curDifficulty);
var poop:String = Highscore.formatSong(songLowercase, curDifficulty);
trace(poop);
PlayState.SONG = Song.loadFromJson(poop, StringTools.replace(songs[curSelected].songName," ", "-").toLowerCase());
PlayState.SONG = Song.loadFromJson(poop, songLowercase);
PlayState.isStoryMode = false;
PlayState.storyDifficulty = curDifficulty;
PlayState.storyWeek = songs[curSelected].week;

View File

@ -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)
{
case 'Dad Battle':
StringTools.replace(song," ", "").toLowerCase();
case 'Philly Nice':
StringTools.replace(song," Nice", "").toLowerCase();
default:
StringTools.replace(song," ", "-").toLowerCase();
}
return 'songs:assets/songs/${songLowercase}/Voices.$SOUND_EXT';
}
inline static public function inst(song:String)
{
song = StringTools.replace(song," ", "-");
return 'songs:assets/songs/${song.toLowerCase()}/Inst.$SOUND_EXT';
var songLowercase = switch (song)
{
case 'Dad Battle':
StringTools.replace(song," ", "").toLowerCase();
case 'Philly Nice':
StringTools.replace(song," Nice", "").toLowerCase();
default:
StringTools.replace(song," ", "-").toLowerCase();
}
return 'songs:assets/songs/${songLowercase}/Inst.$SOUND_EXT';
}
inline static public function image(key:String, ?library:String)

View File

@ -236,14 +236,25 @@ class PlayState extends MusicBeatState
repPresses = 0;
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();
}
#if windows
executeModchart = FileSystem.exists(Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
#end
#if !cpp
executeModchart = false; // FORCE disable for non cpp targets
#end
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(PlayState.SONG.song.toLowerCase() + "/modchart"));
trace('Mod chart: ' + executeModchart + " - " + Paths.lua(songLowercase + "/modchart"));
#if windows
// Making difficulty text for Discord Rich Presence.
@ -310,7 +321,7 @@ class PlayState extends MusicBeatState
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale + '\nBotPlay : ' + FlxG.save.data.botplay);
//dialogue shit
switch (SONG.song.toLowerCase())
switch (songLowercase)
{
case 'tutorial':
dialogue = ["Hey you're pretty cute.", 'Use the arrow keys to keep up \nwith me singing.'];
@ -323,7 +334,7 @@ class PlayState extends MusicBeatState
];
case 'fresh':
dialogue = ["Not too shabby boy.", ""];
case 'dad battle':
case 'dadbattle':
dialogue = [
"gah you think you're hot stuff?",
"If you can beat me here...",
@ -592,7 +603,7 @@ class PlayState extends MusicBeatState
bgGirls = new BackgroundGirls(-100, 190);
bgGirls.scrollFactor.set(0.9, 0.9);
if (SONG.song.toLowerCase() == 'roses')
if (songLowercase == 'roses')
{
if(FlxG.save.data.distractions){
bgGirls.getScared();
@ -1071,11 +1082,21 @@ class PlayState extends MusicBeatState
senpaiEvil.updateHitbox();
senpaiEvil.screenCenter();
if (SONG.song.toLowerCase() == 'roses' || SONG.song.toLowerCase() == 'thorns')
// 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();
}
if (songLowercase == 'roses' || songLowercase == 'thorns')
{
remove(black);
if (SONG.song.toLowerCase() == 'thorns')
if (songLowercase == 'thorns')
{
add(red);
}
@ -1095,7 +1116,7 @@ class PlayState extends MusicBeatState
{
inCutscene = true;
if (SONG.song.toLowerCase() == 'thorns')
if (songLowercase == 'thorns')
{
add(senpaiEvil);
senpaiEvil.alpha = 0;
@ -1328,7 +1349,7 @@ class PlayState extends MusicBeatState
// Song check real quick
switch(curSong)
{
case 'Bopeebo' | 'Philly' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
case 'Bopeebo' | 'Philly Nice' | 'Blammed' | 'Cocoa' | 'Eggnog': allowedToHeadbang = true;
default: allowedToHeadbang = false;
}
@ -1368,9 +1389,20 @@ 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();
}
// Per song offset check
#if windows
var songPath = 'assets/data/' + StringTools.replace(PlayState.SONG.song," ", "-").toLowerCase() + '/';
var songPath = 'assets/data/' + songLowercase + '/';
for(file in sys.FileSystem.readDirectory(songPath))
{
var path = haxe.io.Path.join([songPath, file]);
@ -1935,7 +1967,7 @@ class PlayState extends MusicBeatState
// Per song treatment since some songs will only have the 'Hey' at certain times
switch(curSong)
{
case 'Philly':
case 'Philly Nice':
{
// General duration of the song
if(curBeat < 250)
@ -2498,9 +2530,29 @@ class PlayState extends MusicBeatState
difficulty = '-hard';
trace('LOADING NEXT SONG');
trace(PlayState.storyPlaylist[0].toLowerCase() + difficulty);
// 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();
}
trace(nextSongLowercase + difficulty);
if (SONG.song.toLowerCase() == 'eggnog')
// 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();
}
if (songLowercase == 'eggnog')
{
var blackShit:FlxSprite = new FlxSprite(-FlxG.width * FlxG.camera.zoom,
-FlxG.height * FlxG.camera.zoom).makeGraphic(FlxG.width * 3, FlxG.height * 3, FlxColor.BLACK);

View File

@ -46,9 +46,23 @@ class Song
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
{
trace('loading ' + StringTools.replace(folder," ", "-").toLowerCase() + '/' + StringTools.replace(jsonInput," ", "-").toLowerCase());
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)
{
case 'Dad Battle':
StringTools.replace(folder," ", "").toLowerCase();
case 'Philly Nice':
StringTools.replace(folder," Nice", "").toLowerCase();
default:
StringTools.replace(folder," ", "-").toLowerCase();
}
// pre lowercasing the jsonInput name
var jsonInputLowercase = folderLowercase + StringTools.replace(jsonInput,folder.toLowerCase(), "").toLowerCase();
trace('loading ' + folderLowercase + '/' + jsonInputLowercase);
var rawJson = Assets.getText(Paths.json(folderLowercase + '/' + jsonInputLowercase)).trim();
while (!rawJson.endsWith("}"))
{

View File

@ -27,7 +27,7 @@ class StoryMenuState extends MusicBeatState
['Tutorial'],
['Bopeebo', 'Fresh', 'Dad Battle'],
['Spookeez', 'South', "Monster"],
['Pico', 'Philly', "Blammed"],
['Pico', 'Philly Nice', "Blammed"],
['Satin Panties', "High", "Milf"],
['Cocoa', 'Eggnog', 'Winter Horrorland'],
['Senpai', 'Roses', 'Thorns']