fixed replay + updated replay to 1.1
replay 1.1 still has 1.0 support
This commit is contained in:
parent
e664da2e36
commit
c31f76e37a
@ -148,9 +148,19 @@ class LoadReplayState extends MusicBeatState
|
||||
|
||||
PlayState.loadRep = true;
|
||||
|
||||
var poop:String = Highscore.formatSong(PlayState.rep.replay.songName.toLowerCase(), PlayState.rep.replay.songDiff);
|
||||
// adjusting the song name to be compatible
|
||||
var songFormat = StringTools.replace(PlayState.rep.replay.songName, " ", "-");
|
||||
switch (songFormat) {
|
||||
case 'Dad-Battle': songFormat = 'Dadbattle';
|
||||
case 'Philly-Nice': songFormat = 'Philly';
|
||||
// Replay v1.0 support
|
||||
case 'dad-battle': songFormat = 'Dadbattle';
|
||||
case 'philly-nice': songFormat = 'Philly';
|
||||
}
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName.toLowerCase());
|
||||
var poop:String = Highscore.formatSong(songFormat, PlayState.rep.replay.songDiff);
|
||||
|
||||
PlayState.SONG = Song.loadFromJson(poop, PlayState.rep.replay.songName);
|
||||
PlayState.isStoryMode = false;
|
||||
PlayState.storyDifficulty = PlayState.rep.replay.songDiff;
|
||||
PlayState.storyWeek = getWeekNumbFromSong(PlayState.rep.replay.songName);
|
||||
|
@ -24,7 +24,7 @@ typedef ReplayJSON =
|
||||
|
||||
class Replay
|
||||
{
|
||||
public static var version:String = "1.0"; // replay file version
|
||||
public static var version:String = "1.1"; // replay file version
|
||||
|
||||
public var path:String = "";
|
||||
public var replay:ReplayJSON;
|
||||
@ -56,7 +56,7 @@ class Replay
|
||||
public function SaveReplay(notearray:Array<Float>)
|
||||
{
|
||||
var json = {
|
||||
"songName": PlayState.SONG.song.toLowerCase(),
|
||||
"songName": PlayState.SONG.song,
|
||||
"songDiff": PlayState.storyDifficulty,
|
||||
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
||||
"isDownscroll": FlxG.save.data.downscroll,
|
||||
|
Loading…
x
Reference in New Issue
Block a user